private void Execute(object parameter) { if ((string)parameter == "Vision") { var window = new VisionWindow(); window.ShowDialog(); } else if ((string)parameter == "Speech") { var window = new SpeechWindow(); window.ShowDialog(); } else if ((string)parameter == "Knowledge") { var window = new KnowledgeWindow(); window.ShowDialog(); } else if ((string)parameter == "Language") { var window = new LanguageWindow(); window.ShowDialog(); } else if ((string)parameter == "Search") { var window = new SearchWindow(); window.ShowDialog(); } }
private void Language_Click(object sender, RoutedEventArgs e) { //var win = new LanguageChange(); var win = new LanguageWindow(); win.ShowDialog(); ButtonsPanel.GetHomePopup.IsOpen = false; }
public MainViewModel() { notify = new NotificationDialogService(); log = new Log(); CheckPowerStatusCommand = new RelayCommand <object>((p) => { return(true); }, (p) => { MainModel = MainProcessor.getPowerStatus(); }); GetHDDInfoCommand = new RelayCommand <object>((p) => { return(true); }, (p) => { hddCollection = MainProcessor.getHardDriveInfo(); }); CheckInternetCommand = new RelayCommand <object>((p) => { return(true); }, (p) => { MainModel.IsConnectedInternet = Helper.IsNetworkAvailable(); }); EnglishCommand = new RelayCommand <FrameworkElement>((e) => { return(true); }, (e) => { LocUtil.SwitchLanguage(e, "en-US"); LanguageCollection = MainProcessor.getLanguages(); LanguageWindow lw = new LanguageWindow(); lw.ShowDialog(); }); ChinaCommand = new RelayCommand <FrameworkElement>((e) => { return(true); }, (e) => { LocUtil.SwitchLanguage(e, "zh-CN"); //AboutWindow aw = new AboutWindow(); //aw.ShowDialog(); var newNotification = new Notification() { Title = "Test Fail", Message = "Test one Fail Please check your Machine Code and Try Again" // ,ImgURL = "pack://application:,,,a/Resources/Images/warning.png" }; var notificationConfiguration = NotificationConfiguration.DefaultConfiguration; notify.Show(newNotification, notificationConfiguration); }); SaveLanguageCommand = new RelayCommand <object>((p) => { return(true); }, (p) => { MainProcessor.SaveLanguage(this.LanguageCollection); }); //Log.Error("Test2", "Test2"); //var lst = Log.GetListErrors(); initData(); //iup.UnInstall("{c166523c-fe0c-4a94-a586-f1a80cfbbf3e}"); }