예제 #1
0
 void chgBtnClick(object sender, EventArgs e)
 {
     using (EditHighlightingColorDialog dlg = new EditHighlightingColorDialog(color)) {
         if (dlg.ShowDialog(this) == DialogResult.OK)
         {
             color = dlg.Color;
             PreviewUpdate(sampleLabel, color);
         }
     }
 }
예제 #2
0
 void chgEndClick(object sender, EventArgs e)
 {
     using (EditHighlightingColorDialog dlg = new EditHighlightingColorDialog(endColor)) {
         if (dlg.ShowDialog(this) == DialogResult.OK)
         {
             endColor = dlg.Color;
             PreviewUpdate(samEnd, endColor);
         }
     }
 }
예제 #3
0
        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();
                }
            }
        }