Exemple #1
0
        private void ComPortRefreshButton_Click(object sender, RoutedEventArgs e)
        {
            Button button            = sender as Button;
            EditSettingsViewModel vm = button.DataContext as EditSettingsViewModel;

            vm.RefreshComPorts();
        }
Exemple #2
0
        private void EditSettingsDialogClosingEventHandler(object sender, DialogClosingEventArgs e)
        {
            if ((e.Parameter as bool?) == true)
            {
                EditSettingsViewModel vm = e.Content as EditSettingsViewModel;
                TournamentManager.ComPort  = vm.ComPort;
                TournamentManager.Simulate = vm.Simulate;
            }

            MenuToggleButton.IsChecked = false;
        }
Exemple #3
0
        public void EditSettings_Click(object sender, RoutedEventArgs e)
        {
            EditSettingsViewModel editVm = new EditSettingsViewModel();

            DialogHost.Show(editVm, "RootDialog", EditSettingsDialogClosingEventHandler);
        }