Author Topic: Focus on interactions  (Read 3955 times)

Offline daniel_san

  • Jr. Member
  • **
  • Posts: 84
  • Karma: 1
Focus on interactions
« on: May 28, 2015, 09:02:38 AM »
Hello again,

Anyone knows how i can change the focus through interactions of the toolbar?

Thank you!

Offline Kubig

  • Hero Member
  • *****
  • Posts: 2752
  • Karma: 44
Re: Focus on interactions
« Reply #1 on: May 28, 2015, 11:25:09 AM »
Be more specific in your question - it is not clear yet.

Offline daniel_san

  • Jr. Member
  • **
  • Posts: 84
  • Karma: 1
Re: Focus on interactions
« Reply #2 on: May 28, 2015, 01:15:51 PM »
[quote author=Kubig link=topic=8877.msg39600#msg39600 date=1432812309]
Be more specific in your question - it is not clear yet.
[/quote]

Of course.

Imagine your workspace desktop with 10 interactions waiting for you press the mark done. Then, you want to change focus to one of this interaction pressing some customized button. How can you do that?

This is not the real needed scenario, itīs only an example. Real scenario itīs like, you have an Interaction Voice with one client, and you press accept button on interaction rescheduled toaster. The application imedatly change the focus to new interaction.

Regards.

Offline daniel_san

  • Jr. Member
  • **
  • Posts: 84
  • Karma: 1
Re: Focus on interactions
« Reply #3 on: June 01, 2015, 08:35:57 AM »
Some help?

Offline abudwill

  • Full Member
  • ***
  • Posts: 157
  • Karma: 4
Re: Focus on interactions
« Reply #4 on: June 03, 2015, 03:11:07 AM »
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.


Offline daniel_san

  • Jr. Member
  • **
  • Posts: 84
  • Karma: 1
Re: Focus on interactions
« Reply #5 on: June 03, 2015, 10:44:56 AM »
[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.

Offline abudwill

  • Full Member
  • ***
  • Posts: 157
  • Karma: 4
Re: Focus on interactions
« Reply #6 on: June 03, 2015, 08:34:29 PM »
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