public override void OnNavigationOpenPage(ParametersOfForms param_)
 {
     UnderstandingTest_parameters param = (UnderstandingTest_parameters)param_;
     LearningItem = param.LearningItem;
     CurrentSub = param.SubtitleItem;
     AddButtons();
 }
        public void OnNavigation(ParametersOfForms param_)
        {
            UnderstandingTest_parameters param = (UnderstandingTest_parameters)param_;
            LearningItem = param.LearningItem;

            CurrentSub = LearningItem.CurrentSub;
            AddButtons();
        }
 override public void OnNavigationOpenPage(ParametersOfForms param_)
 {
     WebBrowserForm_parameters Params = (WebBrowserForm_parameters)param_;
     //Address = Params.Address;
     Address = Params.Address;
     Title = Params.Title;
     if (string.IsNullOrEmpty(Title)) Title = Address;
 }
        override public void OnNavigationOpenPage(ParametersOfForms param_)
        {
            LearningItemSetting_parameters param = (LearningItemSetting_parameters)param_;
            LearningItem = param.LearningItem;

            LearningItem.PropertyChanged += LearningItem_PropertyChanged;

            SetVisualState();
        }
        public void OnNavigation(ParametersOfForms param_)
        {
            if(param_ != null)
            {
                LanguageEditor_parameters prms_ = (LanguageEditor_parameters)param_;
                CurrentLanguage = prms_.language;
            }

            if(Languages.Count > 0) CurrentLanguage = Languages[0];

        }
        override public void OnNavigationOpenPage(ParametersOfForms param_)
        {
            StandartDialog_parameters param = (StandartDialog_parameters)param_;

            ButtonOk.Visibility  = (param.Buttons & (byte)enButtons.ButtonOk) > 0 ? VisualState.Visible : VisualState.Collapsed;
            ButtonYes.Visibility = (param.Buttons & (byte)enButtons.ButtonYes) > 0 ? VisualState.Visible: VisualState.Collapsed;
            ButtonNo.Visibility  = (param.Buttons & (byte)enButtons.ButtonNo) > 0 ? VisualState.Visible : VisualState.Collapsed;

            Title = param.Title;
            TitleModel.Visibility = string.IsNullOrEmpty(Title) ? VisualState.Collapsed : VisualState.Visible;
            Body = param.Body;
        }
        public void OnNavigation(ParametersOfForms param_)
        {

            List<Guid> list = DBConnect.GetGuidListStatic("select id from "+Language.TableName);
            foreach(Guid id in list)
            {
                EFDbContext.DataBase.Language.Find(id);
            }

            InitialWizard_parameters Params = (InitialWizard_parameters)param_;
            AppSetting = Params.AppSetting;
        }
        override public void OnNavigationOpenPage(ParametersOfForms param_)
        {
            ListOfWordsOfDictionary_parameters Params = (ListOfWordsOfDictionary_parameters)param_;
            Dictionary = Params.Dictionary;
            Subtitles = Params.Subtitles;
            foreach (WordOfDictionary wrd in Params.ListOfWords)
            {
                ListOfWords.Add(
                    new DataGridItem {
                        Word = wrd,
                        Dictionary = wrd.Dictionary,
                        Analogy = Dictionary.FindWord(wrd.word_of_dictionary)
                    });

            }
            
        }
        override public void OnNavigationOpenPage(ParametersOfForms param_)
        {

            AddNewLearningItemWizard_parameters Params = (AddNewLearningItemWizard_parameters)param_;
            LearningItem = Params.LearningItem;

            UpdateButtonState();

            // Default values
            if (!LearningItem.isFirstStartCompleted)
            {
                LearningItem.CollectPhrases = true;
                LearningItem.UnderstandingTest = true;
                LearningItem.ShowNewWords = true;
                LearningItem.TestingUnderstandingNewWords = true;
            }
        }
Esempio n. 10
0
        public void NavigateForward(string classname,ParametersOfForms param)
        {

            // saves previous page status
            if (AppWnd_VM.CurrentView != null)
            {
                NavigationItem item = new NavigationItem();
                item.View = AppWnd_VM.CurrentView;
                item.CurrentMenu = AppWnd_VM.CurrentMenu;
                item.RightWndMenu = AppWnd_VM.RightWindowMenu;
                NavigationStack.Push(item);
            }

            switch (classname)
            {
                case Form.MainWindow:
                    break;
            }

            AppWnd_VM.CurrentView = (UserControl)Activator.CreateInstance(Type.GetType(classname));

            // Setup Current menu
            Menu CurrentMenu = null;
            if (AppWnd_VM.CurrentView.Resources.Contains("CurrentMenu"))
            {
                CurrentMenu = (Menu)AppWnd_VM.CurrentView.FindResource("CurrentMenu");
                CurrentMenu.DataContext = AppWnd_VM.CurrentView.DataContext;
            }
            AppWnd_VM.CurrentMenu = CurrentMenu;

            // Setup right window menu
            StackPanel rightmenu = null;
            if (AppWnd_VM.CurrentView.Resources.Contains("RightWndMenu"))
            {
                rightmenu = (StackPanel)AppWnd_VM.CurrentView.FindResource("RightWndMenu");
                rightmenu.DataContext = AppWnd_VM.CurrentView.DataContext;
            }
            AppWnd_VM.RightWindowMenu = rightmenu;

            ((INavigate)AppWnd_VM.CurrentView.DataContext).OnNavigation(param);

            AppWnd_VM.CanNavigateBack =  NavigationStack.Count > 0 ? true : false; 
        }
        override public void OnNavigationOpenPage(ParametersOfForms param_)
        {
            ExceptionForm_parameters param = (ExceptionForm_parameters)param_;

            Exception ex = param.ex;
            Title = null;
            Message = null;
            if (ex.Data.Contains("Title"))
            {
                Title = ex.Data["Title"].ToString();
                Message = ex.Message;
            }
            if (!string.IsNullOrEmpty(param.title))
            {
                Title = param.title;
                Message = ex.Message;
            }
            if(Title==null) Title = ex.Message;
            BodyOfException = ex.StackTrace;
        }
Esempio n. 12
0
 override public void OnNavigationOpenPage(ParametersOfForms param_)
 {
     Backup_parameters param = (Backup_parameters)param_;
     switch (Params.mode)
     {
         case Backup_parameters.Mode.AppSetting:
             path = FileService.GetPathToGlobalBackup();
             break;
         case Backup_parameters.Mode.LearningItem:
             path = FileService.GetPathToGlobalBackup();
             path += "\\"+Params.learningitem.id.ToString();
             if (!FileService.DirectoryExists(path))
             {
                 FileService.CreateDirectory(path);
             }
             break;
         default:
             throw new NotImplementedException();
     }
     FindFiles(path);
 }
 override public void OnNavigationOpenPage(ParametersOfForms param_)
 {
     SaveChanges_parameters param = (SaveChanges_parameters)param_;
     Changes = new ObservableCollection<Entity>(EFDbContext.Context.ChangedEntities);
 }
        override public void OnNavigationOpenPage(ParametersOfForms  param_)
        {
            EditLearningItem_parameters param = (EditLearningItem_parameters)param_;

            if (param.CreateNewItem)
            {
                LearningItem = new LearningItem();
                EFDbContext.Context.AddNewItemToDBContext(LearningItem);
            }
            else
            {
                LearningItem = param.LearningItem;
            }

            Task.Run(()=> {
                try
                {
                    Player.StartVideo(LearningItem);
                    Player.Pause();
                } catch (Exception ex)
                {
                    if (ex.IsFatal()) throw;
                }
                });

            LearningItem.PropertyChanged += LearningItem_PropertyChanged;

        }
 public void OnNavigation(ParametersOfForms param_)
 {
     AppSettingEdit_parameters param = (AppSettingEdit_parameters)param_;
     AppSetting = param.AppSetting;
     if(param.language != null)
     {
         CurrentLanguage = param.language;
         TabItemLanguageSelection = true;
     } else
     {
         if(Languages.Count > 0) CurrentLanguage = Languages[0];
     }
 }
        public void OnNavigation(ParametersOfForms param_)
        {
            EditLearningItem_parameters param = (EditLearningItem_parameters)param_;
            LearningItem = param.LearningItem;

            //Player.StartVideo(LearningItem);
            LearningItem.PropertyChanged += LearningItem_PropertyChanged;

            Messenger.Default.Register<DialogsEvent>(this, DialogsEventFunc);
        }
 public void OnNavigation(ParametersOfForms param_)
 {
     ListOfWordsOfDictionary_parameters Params = (ListOfWordsOfDictionary_parameters)param_;
     ListOfWords = Params.ListOfWords;
     Dictionary = Params.Dictionary;
 }
        public override void OnNavigationOpenPage(ParametersOfForms param_)
        {
            ReferencesToWord_parameters param = (ReferencesToWord_parameters)param_;
            Word = param.Word;
            Title = param.Title ?? Word.word_of_dictionary;

            UdpateReferences();
        }
 override public void OnNavigationOpenPage(ParametersOfForms param_)
 {
     SubWordEditor_parameters param = (SubWordEditor_parameters)param_;
     Word = param.Word;
 }
Esempio n. 20
0
        public async void OpenDialog(string classname, ParametersOfForms param,string Template="")
        {
            Messenger.Default.Send(new DialogsEvent() {status=DialogsEvent.Status.Open});

            BaseMetroDialog dialog = (BaseMetroDialog)ViewModelLocator.Instance.MainMetroWindow.Resources[Template == "" ? "CustomDialog":Template];
            UserControl userctrl = (UserControl)Activator.CreateInstance(Type.GetType(classname));
            dialog.Content = userctrl;
            ((INavigate)userctrl.DataContext).OnNavigation(param);
            DialogsStack.Push(new NavigationItem() { dialog = dialog,userctrl=userctrl});
            await ViewModelLocator.Instance.MainMetroWindow.ShowMetroDialogAsync(dialog);
            
            //await Task.Delay(5000);
            //await ViewModelLocator.Instance.MainMetroWindow.HideMetroDialogAsync(dialog);
        }
 override public void OnNavigationOpenPage(ParametersOfForms param_)
 {
     DictionaryEditor_parameters param = (DictionaryEditor_parameters)param_;
     LearningItem = param.LearningItem;
 }
 override public void OnNavigationOpenPage(ParametersOfForms param_)
 {
     LoggerForm_parameters param = (LoggerForm_parameters)param_;
     LogList = Logger.GetMessages();
 }
Esempio n. 23
0
 override public void OnNavigationOpenPage(ParametersOfForms param)
 {
     //Initialization ini = new Initialization();
     //ini.StartInitialization();
 }
 override async public void OnNavigationOpenPage(ParametersOfForms param_)
 {
     Download_parameters param = (Download_parameters)param_;
     GetStoreItems();
 }
 override public void OnNavigationOpenPage(ParametersOfForms param_)
 {
     Publish_parameters Params = (Publish_parameters)param_;
     LearningItem = Params.LearningItem;
 }
 public void OnNavigation(ParametersOfForms param)
 {
 }
        public void OnNavigation(ParametersOfForms param_)
        {

            //ViewModelLocator.Instance.DataBase.ProcessingWordsRules.Load();

            SubtitleEditor_parameters param = (SubtitleEditor_parameters)param_;
            Subtitles = param.subtitles;
            LearningItem = Subtitles.LearningItem;
            
            //CurrentDictionary = Subtitles.Dictionary;
           
            Player.StartVideo(LearningItem);
            Player.SetAudioTrack(Subtitles.AudioTrack);
            Player.Pause();

            // 
            Subtitles.PropertyChanged += Subtitles_PropertyChanged;

            Messenger.Default.Register<DialogsEvent>(this, DialogsEventFunc);

            OnLanguageChange();

        }
 override public void OnNavigationOpenPage(ParametersOfForms param_)
 {
     AppSettings_parameters param = (AppSettings_parameters)param_;
     AppSetting = App.AppSetting;
     if (param != null && param.language != null)
     {
         CurrentLanguage = param.language;
         TabItemLanguageSelection = true;
     } else
     {
         if(Languages.Count > 0) CurrentLanguage = Languages[0];
     }
 }
Esempio n. 29
0
 override public void OnNavigationOpenPage(ParametersOfForms param)
 {
     RaisePropertyChanged("CanNavigateBack");
 }
Esempio n. 30
0
        public void OnNavigation(ParametersOfForms param)
        {
            Initialization ini = new Initialization();
            ini.StartInitialization();

        }