void chgEndClick(object sender, EventArgs e) { using (EditHighlightingColorDialog dlg = new EditHighlightingColorDialog(endColor)) { if (dlg.ShowDialog(this) == DialogResult.OK) { endColor = dlg.Color; PreviewUpdate(samEnd, endColor); } } }
void chgBtnClick(object sender, EventArgs e) { using (EditHighlightingColorDialog dlg = new EditHighlightingColorDialog(color)) { if (dlg.ShowDialog(this) == DialogResult.OK) { color = dlg.Color; PreviewUpdate(sampleLabel, color); } } }
void EditButtonClicked(object sender, EventArgs e) { if (listView.SelectedItems.Count != 1) return; EnvironmentItem item = (EnvironmentItem)listView.SelectedItems[0]; using (EditHighlightingColorDialog dlg = new EditHighlightingColorDialog(item.Color)) { if (dlg.ShowDialog(this) == DialogResult.OK) { item.Color = dlg.Color; item.ColorUpdate(); } } }