private void varsListBox_DoubleClick(object sender, EventArgs e) { if (this.varsListBox.SelectedIndex == -1 || this.Colors.Count() == 0) { return; } var f = new ModifyVariableForm(this.Colors, this.VarsDescriptions[this.varsListBox.SelectedIndex]); f.ShowDialog(); if (f.Succesful) { this._isModified = true; this.VarsDescriptions[this.varsListBox.SelectedIndex] = new Tuple<string, string>(f.VarName, f.ColorSetName); this.refreshVars(); } }
private void addVarButton_Click(object sender, EventArgs e) { if (this.Colors.Count() == 0) { return; } var f = new ModifyVariableForm(this.Colors); f.ShowDialog(); if (f.Succesful) { this._isModified = true; this.VarsDescriptions.Add(new Tuple<string, string>(f.VarName, f.ColorSetName)); this.refreshVars(); this.refreshFuncs(); } }