Genesys CTI User Forum
Genesys CTI User Forum => Genesys-related Development => Topic started by: MJaskowski on March 07, 2019, 10:33:24 AM
-
I'm looking for command or method which is firing while starting application, while we get main window.
What I need to reach? I want to open My Workspace after login agent immediately. I need something Create() method for MyWorkplaceContainerView.
To open MyWorkplace window I use this code
[code]
viewEventManager.Publish(new GenericEvent()
{
Target = GenericContainerView.ContainerView,
Context = "ToolbarWorksheet",
Action = new GenericAction[]
{
new GenericAction ()
{
Action = ActionGenericContainerView.ShowHidePanelRight,
Parameters = new object[] { Visibility.Visible, "MyWorkplaceContainerView" }
},
new GenericAction ()
{
Action = ActionGenericContainerView.ActivateThisPanel,
Parameters = new object[] { "MyWorkplaceContainerView" }
}
}
});
[/code]
but I can use above code only when MyWorkplaceContainer is prepared so this is possible only after login. I can't find any command like ApplicationOpenCommand or something, do you know how can I reach it?
Thank you for all answers.
-
Could you help me anyone?
I found ShowMainWindowEvent but I can't subscribe to this correctly - is here someone who knows something about how to do?
Matt
-
Have you tried this ??
[code]//Constructor of my module
public CustomModule(IEventAggregator eventAggregator)
{
eventAggregator.GetEvent<ShowMainWindowEvent>().Subscribe(new Action<object>(ShowMainWindowEvents), ThreadOption.PublisherThread, true);
}
public void ShowMainWindowEvents(object obj)
{
//Here my logic
}[/code]