Inheritance: System.Windows.Window
Beispiel #1
0
        private void AddCommand_Executed(object o, ExecutedRoutedEventArgs args)
        {
            AddVariableView view = new AddVariableView()
            {
                Owner = this
            };
            if (view.ShowDialog() == true)
            {
                processor.Parameters.Add(new Parameter(view.VariableName, view.Value, view.IsReadOnly ? ParameterType.ReadOnly : ParameterType.Normal));

                RefreshList();
            }
        }
Beispiel #2
0
        private void AddCommand_Executed(object o, ExecutedRoutedEventArgs args)
        {
            var view = new AddVariableView
            {
                Owner = this
            };

            if (view.ShowDialog() == true)
            {
                processor.Parameters.Variables.Add(new Parameter(view.VariableName, view.Value, view.IsReadOnly ? ParameterType.ReadOnly : ParameterType.Normal));

                RefreshList();
            }
        }
Beispiel #3
0
        private void EditCommand_Executed(object o, ExecutedRoutedEventArgs args)
        {
            var item = varList.SelectedItem as VariableViewModel;

            var view = new AddVariableView(item)
            {
                Owner = this
            };

            if (view.ShowDialog() == true)
            {
                var variable = processor.Parameters.Variables.First(v => v.Key == view.VariableName);
                variable.Value = view.Value;

                RefreshList();
            }
        }
Beispiel #4
0
        private void EditCommand_Executed(object o, ExecutedRoutedEventArgs args)
        {
            var item = varList.SelectedItem as VariableViewModel;

            AddVariableView view = new AddVariableView(item)
            {
                Owner = this
            };
            if (view.ShowDialog() == true)
            {
                var variable = processor.Parameters.First(v => v.Key == view.VariableName);
                variable.Value = view.Value;
                variable.Type = view.IsReadOnly ? ParameterType.ReadOnly : ParameterType.Normal;

                RefreshList();
            }
        }