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(); } }
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(); } }
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(); } }
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(); } }