Author Topic: Interaction and InteractionVoice in MySampleView.xaml.cs  (Read 2484 times)

Offline innspiron

  • Newbie
  • *
  • Posts: 10
  • Karma: -1
Interaction and InteractionVoice in MySampleView.xaml.cs
« on: April 28, 2015, 01:38:31 PM »
I am new, so please be polite  :)
I am trying to get IInteractionVoice and IInteraction thisinteraction inside this sample class. Provided by genesys. But struggling with it lots and lots.
Code is here http : //prntscr . com/6z50z3
And lets say I have new method private void ccancel_Click(object sender, RoutedEventArgs e) {IInteraction i = .....[here should go some code] ; i.SetAttachedData.....}
« Last Edit: April 28, 2015, 01:41:15 PM by innspiron »

Offline Kubig

  • Hero Member
  • *****
  • Posts: 2752
  • Karma: 44
Re: Interaction and InteractionVoice in MySampleView.xaml.cs
« Reply #1 on: April 29, 2015, 08:48:35 AM »
And what is the problem or question?

Offline PeteHoyle

  • Full Member
  • ***
  • Posts: 126
  • Karma: 13
Re: Interaction and InteractionVoice in MySampleView.xaml.cs
« Reply #2 on: May 01, 2015, 10:50:18 AM »
Hi,

To get the Interaction you would need to do something like this:

ICase myCase = (Extensions.TryGetValue<string, object>(this.Context as IDictionary<string, object>, "Case") as ICase);
if (myCase.MainInteraction is IInteractionVoice)
                {
                    IInteractionVoice iv = myCase.MainInteraction as IInteractionVoice;

                }