private void LoadVariable(EnvironmentVariable variable) { ListViewItem item = new ListViewItem(); item.Text = variable.Name; item.SubItems.Add(variable.Value); item.ImageIndex = 0; item.Tag = variable; VariablesList.Items.Add(item); }
private void AddVariable() { if(_action.Variables == null) { _action.Variables = new List<EnvironmentVariable>(); } EnvironmentVariable variable = new EnvironmentVariable(); _action.Variables.Add(variable); LoadVariable(variable); if(VariablesList.Items.Count > 0) { VariablesList.Items[VariablesList.Items.Count - 1].BeginEdit(); } UpdateVariableInfo(); }