protected void Navigate(InterViewModelPackage package)
 {
     if (StepFinished != null)
     {
         StepFinished.Invoke(package);
     }
     StepFinished = null;
 }
Beispiel #2
0
        public void Navigate(InterViewModelPackage package)
        {
            if (package.Code == NavigationCodes.Start)
            {
                GoHome();
            }
            else
            {
                ViewHome = true;
                switch (state)
                {
                case State.AudioSelecting:
                    state          = State.AlgorithmSelecting;
                    Audio          = package.Data as DigitalAudio;
                    navigationLine = package.Code;
                    CurrentPage    = GetAlgorithmPage();
                    break;

                case State.AlgorithmSelecting:
                    state        = State.MessageCoding;
                    ViewBack     = true;
                    hidingMethod = package.Data as IHidingMethod;
                    CurrentPage  = new Pages.CodingPage
                    {
                        DataContext = new CodingViewModel(navigationLine, hidingMethod, Audio)
                    };
                    ((ISupportParameter)CurrentPage.DataContext).Parameter = (Action <InterViewModelPackage>)Navigate;
                    break;

                case State.MessageCoding:
                    break;

                default:
                    break;
                }
            }
        }