Пример #1
0
 private void btnBorder_Click(object sender, EventArgs e)
 {
     if (CurrentStyle == null)
     {
         return;
     }
     using (BorderEditorForm editor = new BorderEditorForm())
     {
         editor.Border = CurrentStyle.Border.Clone();
         if (editor.ShowDialog() == DialogResult.OK)
         {
             foreach (ListViewItem li in lvStyles.SelectedItems)
             {
                 (li.Tag as Style).Border = editor.Border.Clone();
             }
             RefreshSample();
         }
     }
 }
Пример #2
0
        private void btnBorder_Click(object sender, EventArgs e)
        {
            if (CurrentCondition == null)
            {
                return;
            }

            using (BorderEditorForm editor = new BorderEditorForm())
            {
                editor.Border = CurrentCondition.Border.Clone();
                if (editor.ShowDialog() == DialogResult.OK)
                {
                    foreach (ListViewItem li in lvConditions.SelectedItems)
                    {
                        HighlightCondition c = li.Tag as HighlightCondition;
                        c.Border      = editor.Border.Clone();
                        li.ImageIndex = GetImageIndex(c);
                    }
                    RefreshSample();
                }
            }
        }