Пример #1
0
 private void AddVariableForm_Closing(object sender, CancelEventArgs e){
     if (DialogResult == DialogResult.Cancel)
         return;
     txtName.Text = txtName.Text.Trim();
     string name = txtName.Text;
     if (!CheckNameIsValid(name)){
         e.Cancel = true;
         return;
     }
     txtValue.Text = txtValue.Text.Trim();
     string value = txtValue.Text;
     if (!CheckValueIsValid(value)){
         e.Cancel = true;
         return;
     }
     NewActivity = new VariableActivity();
     NewActivity.Name = name;
     NewActivity.Value = Settings.GetValueBy(value);
     _variableActivityFactory.ServiceProvider.Variables.Add(NewActivity);
 }
Пример #2
0
 public BaseActivity InitBy(OperationsCommandBase operationCommand, VariableActivity variable) {
     _operationCommand = operationCommand;
     _variableOrData = variable;
     return this;
 }
Пример #3
0
 public VariableIsNotDefinedException(VariableActivity activity)
     :base(string.Format("{0}: {1}", activity.Name, Lang.Res.Value_is_not_defined)){
     
 }