Example #1
0
        private void refreshTableLayoutPanel(TableLayoutPanel p, string[] logsPaths)
        {
            p.Controls.Clear();
            if (logsPaths != null && logsPaths.Length > 0)
            {
                p.RowCount = logsPaths.Length;
                for (int i = 0; i < logsPaths.Length; i++)
                {
                    TableLayoutPanel subPanel = new TableLayoutPanel();
                    subPanel.Width       = 610;
                    subPanel.Height      = 70;
                    subPanel.RowCount    = 1;
                    subPanel.ColumnCount = 2;
                    CheckBox_Square cb = new CheckBox_Square();
                    cb.Width  = 60;
                    cb.Height = 60;
                    Label   label    = new Label();
                    Padding lPadding = label.Padding;
                    lPadding.Top    = 7;
                    label.Padding   = lPadding;
                    label.Text      = getLogFileName(logsPaths[i]);
                    label.Height    = 70;
                    label.Width     = 550;
                    label.Click    += new System.EventHandler(this.labelClickHandler);
                    label.ForeColor = Color.FromArgb(95, 96, 98);
                    label.Font      = new Font("Arial", 15);
                    subPanel.Controls.Add(cb, 0, 0);
                    subPanel.Controls.Add(label, 1, 0);

                    p.Controls.Add(subPanel, 0, i);
                }
            }
            selectAllCheckBox.Check = false;
        }
Example #2
0
 private void labelClickHandler(object sender, EventArgs e)
 {
     if (sender != null)
     {
         TableLayoutPanel p  = (sender as Label).Parent as TableLayoutPanel;
         CheckBox_Square  cb = p.GetControlFromPosition(0, 0) as CheckBox_Square;
         cb.Check = !cb.Check;
     }
 }
Example #3
0
        private void selectUnselectAll(bool isSelect)
        {
            TableLayoutPanel p;

            if (logTabs.TabActive == HorizontalTabs.tabs.Tab1)
            {
                p = videoLogPanel;
            }
            else
            {
                p = videoErrorLogPanel;
            }
            for (int i = 0; i < p.RowCount; i++)
            {
                TableLayoutPanel subPanel = p.GetControlFromPosition(0, i) as TableLayoutPanel;
                CheckBox_Square  cb       = subPanel.GetControlFromPosition(0, 0) as CheckBox_Square;
                cb.Check = isSelect;
            }
        }