Genesys CTI User Forum > Genesys-related Development

Focus on interactions

<< < (2/2)

daniel_san:
[quote author=abudwill link=topic=8877.msg39679#msg39679 date=1433301067]
You could implement some sort of event/action system where interactions in question register and listen for events from an object responsible for sending those events.  When whatever your action/trigger is, have the event system publish something to all the subscribers. The subscribers would be your interactions. You can get a reference to the current window from within those interactions and then focus on one.

There may be a more appropriate genesys centric way to do this. I would need to look at the IWS APIs again - but I think one of the interfaces provides a way of getting references to interactions via an identifier like case guid.
[/quote]

First part itīs ok.

The second part itīs what iīm trying to do.

IInteractionManager im = container.Resolve<IInteractionManager>();
im.GetCaseById

I canīt see method like "setFocus" or something similar.

Thank you for your help.

abudwill:
Off the top of my head I also don't know how to get a reference to the current WPF window using native Genesys APIs.

When I have had the need to get a reference to a window, it has always been when I have placed a custom control on the window/interaction.  When I do this I am able to execute the following:

[code]
Window parentWindow = Window.GetWindow(this);
parentWindow.WindowState = WindowState.Maximized;           
parentWindow.Focus();
[/code]

This being said you could hide an empty bogus control on each interaction and subscribe to events you would send (sort of a hacky approach).  When you receive the event your custom control code could get a reference to the window similar to above and set focus.  Alternatively, you can keep trying to determine how to get a reference to the Window of the interaction through Genesys APIs. 

Regards,
Andrew

Navigation

[0] Message Index

[*] Previous page

Go to full version