示例#1
0
        private void Label_MouseDoubleClick(object sender, MouseButtonEventArgs e)
        {
            var label   = (Label)sender;
            var process = (ProcessViewModel)label.DataContext;

            if (!process.InProgress)
            {
                var  window = new WatcherSettingsWindow(process);
                bool?shw    = window.ShowDialog();
                if (window.ClosingOptionSelected == ClosingOptionEnum.SaveClose)
                {
                    VM.SaveToJsonFile();
                }
            }
        }
示例#2
0
        private void MenuItem_Click(object sender, RoutedEventArgs e)
        {
            if (ProcessesListBox.SelectedItem == null)
            {
                return;
            }

            var process = ProcessesListBox.SelectedItem as ProcessViewModel;

            if (process != null && !process.InProgress)
            {
                var  window = new WatcherSettingsWindow(process);
                bool?shw    = window.ShowDialog();
                if (window.ClosingOptionSelected == ClosingOptionEnum.SaveClose)
                {
                    VM.SaveToJsonFile();
                }
            }
        }