Esempio n. 1
0
 private Color GetCodeItemBackColor(CustomCheckedListBox listbox, DrawItemEventArgs e)
 {
     if (e.Index == selectedLine)
     {
         return(Color.Orange);
     }
     else if (listbox.GetItemChecked(e.Index))
     {
         return(Color.DarkRed);
     }
     else
     {
         return(listbox.BackColor);
     }
 }
Esempio n. 2
0
        private void CodeView_Load(object sender, EventArgs e)
        {
            clbCode = new CustomCheckedListBox(GetCodeItemBackColor, GetCodeItemForeColor);
            Controls.Add(clbCode);
            clbCode.BackColor    = Color.DimGray;
            clbCode.ForeColor    = Color.Black;
            clbCode.CheckOnClick = true;
            clbCode.Dock         = DockStyle.Fill;
            Closing += CodeView_Closing;

            lbInternalBuffers.MouseDoubleClick += LbInternalBuffersOnMouseDoubleClick;
            lbBuffers.MouseDoubleClick         += LbBuffers_MouseDoubleClick;
            DoubleBuffered = true;
            ignoreChanged  = true;



            clbCode.Items.AddRange(Source.Split(new[] { '\n' }));

            UpdateSidePanel();
            btnContinue.Text    = "Start";
            btnContinue.Enabled = true;
        }
Esempio n. 3
0
 private Color GetCodeItemForeColor(CustomCheckedListBox listbox, DrawItemEventArgs e)
 {
     return(listbox.ForeColor);
 }