Exemplo n.º 1
0
 /// <summary>
 /// Indicates the post message has read. The call ends.
 /// </summary>
 /// <param name="sender"></param>
 /// <param name="e"></param>
 private void narrator_PostIntroductionFinished(object sender, EventArgs e)
 {
     Narrator.Finished -= narrator_PostIntroductionFinished;
     OnIntroductionStoped(Narrator.GetMediaHandler());
     Narrator.Finished += Narrator_IntroductionFinished;
     OnStepIntoMenu(null);
 }
        public override void CommandReceived(int signal)
        {
            Narrator.StopNarration();
            switch (signal)
            {
            case EXIT:
                OnIntroductionStoped(Narrator.GetMediaHandler());
                OnStepIntoMenu(null);
                return;

            case BACK_TO_PARENT_MENU:
                OnIntroductionStoped(Narrator.GetMediaHandler());
                OnStepIntoMenu(Parent);
                return;
            }
            for (int i = 1; i < 10; i++)
            {
                if (signal == i && !string.IsNullOrEmpty(TransferDestinations[i - 1].Destination))
                {
                    OnCallTransferRequired(TransferDestinations[i - 1].Destination);
                    return;
                }
            }
            RestartIntroduction();
        }
Exemplo n.º 3
0
        public override void CommandReceived(int signal)
        {
            Narrator.StopNarration();
            switch (signal)
            {
            case EXIT:
                OnIntroductionStoped(Narrator.GetMediaHandler());
                OnStepIntoMenu(null);
                return;

            case BACK_TO_PARENT_MENU:
                OnIntroductionStoped(Narrator.GetMediaHandler());
                OnStepIntoMenu(Parent);
                return;
            }

            foreach (var child in ChildMenus)
            {
                if (child.TouchToneKey == signal.ToString())
                {
                    OnIntroductionStoped(Narrator.GetMediaHandler());
                    OnStepIntoMenu(child);
                    return;
                }
            }

            //Wrong signal received so it restarts the playing.
            Narrator.Finished += Narrator_IntroductionFinished;
            RestartIntroduction();
        }
Exemplo n.º 4
0
 void Narrator_Starting(object sender, EventArgs e)
 {
     OnIntroductionStarting(Narrator.GetMediaHandler());
 }
Exemplo n.º 5
0
 /// <summary>
 /// Release the reader object.
 /// </summary>
 private void CloseNarrator()
 {
     Narrator.StopNarration();
     OnIntroductionStoped(Narrator.GetMediaHandler());
 }
 void Narrator_IntroductionStoped(object sender, EventArgs e)
 {
     OnIntroductionStoped(Narrator.GetMediaHandler());
 }