Inheritance: System.Windows.Window
コード例 #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();
            }
        }
コード例 #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();
            }
        }
コード例 #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();
            }
        }
コード例 #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();
            }
        }