public void LoadView(ViewType typeView) { switch (typeView) { case ViewType.LearnWords: LearnWords view = new LearnWords(); VMLearnWords vmLearnWords = new VMLearnWords(this); LoadUserControl(view, vmLearnWords); break; case ViewType.TestWords: Test test = new Test(); TestVM vmTest = new TestVM(this); LoadUserControl(test, vmTest); break; case ViewType.DesignWords: DesignerWord designerWord = new DesignerWord(); DesignerWordsVM vmdesignerWor = new DesignerWordsVM(this); LoadUserControl(designerWord, vmdesignerWor); break; case ViewType.Lisening: Lisening lisening = new Lisening(); LiseningVM vmLisening = new LiseningVM(this); LoadUserControl(lisening, vmLisening); break; case ViewType.ShooseThems: SettingView settingView = new SettingView(); ShooseStyleVM vmShooseStyle = new ShooseStyleVM(this); LoadUserControl(settingView, vmShooseStyle); break; case ViewType.ResultLearning: ResultLearning resultLearning = new ResultLearning(); ResultLearningVM vmResultLearning = new ResultLearningVM(); LoadUserControl(resultLearning, vmResultLearning); break; case ViewType.Translate: Translate translate = new Translate(); TranslateVM translateVM = new TranslateVM(); LoadUserControl(translate, translateVM); break; case ViewType.AddWords: AddWordsVM addWordsVM = new AddWordsVM(); AddWordsUC addWordsUC = new AddWordsUC(); LoadUserControl(addWordsUC, addWordsVM); break; } }
public void OpenLearnWordsWindow() { LearnWords learnWords = new LearnWords(); learnWords.Show(); }