Ejemplo n.º 1
0
        public void Add(Action action)
        {
            ActionRowControl container = new ActionRowControl()
            {
                Caption = string.Empty, Width = this.Width, BackColor = Color.WhiteSmoke, Action = action, Height = 22, BorderStyle = System.Windows.Forms.BorderStyle.None
            };

            Windows8CheckBox checkbox = new Windows8CheckBox()
            {
                Tag       = action,
                FlatStyle = System.Windows.Forms.FlatStyle.Flat,
                Text      = action.Name,
                ForeColor = Color.Gray,
                BackColor = Color.Transparent,
                Padding   = new Padding(25, 0, 0, 0),
                Width     = 200,
                Left      = 20
            };

            _tooltip.SetToolTip(checkbox, action.Description);
            container.Controls.Add(checkbox);

            Windows8Button button = new Windows8Button()
            {
                Left = container.Controls[0].Width + 24, Top = 2, DrawingColor = Windows8DrawingColor.AlternativeColor, Caption = "Execute", Width = 55, Height = 22
            };

            button.Click += new EventHandler(button_Click);
            container.Controls.Add(button);

            Windows8Panel progressPanel = new Windows8Panel()
            {
                BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle, Visible = false, Top = 5, Left = container.Controls[1].Left + container.Controls[1].Width + 6, Text = string.Empty, Width = 120, Height = 14
            };

            container.Controls.Add(progressPanel);

            LinkLabel linkLabel = new LinkLabel()
            {
                Visible = false, Top = 2, Left = container.Controls[2].Left + container.Controls[2].Width + 4, Text = "Details", AutoSize = true
            };

            linkLabel.Click += new EventHandler(linkLabel_Click);
            linkLabel.Tag    = action;
            container.Controls.Add(linkLabel);

            action.HeaderPanel = container;

            action.Container = container;

            this.Controls.Add(container);
        }
Ejemplo n.º 2
0
        public void Add(ActionGroup group)
        {
            ActionRowControl header = new ActionRowControl()
            {
                Text = string.Empty, Width = this.Width, BackColor = Color.Chartreuse, BackColor2 = Color.Green, ActionGroup = group
            };
            CheckBox chk = new CheckBox()
            {
                Dock = DockStyle.Left, Text = group.Name, ForeColor = Color.WhiteSmoke, BackColor = Color.Transparent, Padding = new Padding(5, 0, 0, 0), Width = 200
            };

            chk.CheckedChanged += new EventHandler(chk_CheckedChanged);
            header.Controls.Add(chk);

            this.Controls.Add(header);
        }
Ejemplo n.º 3
0
        public void Add(ActionGroup group)
        {
            ActionRowControl header = new ActionRowControl()
            {
                Caption = string.Empty, Width = this.Width, BackColor = Color.Chartreuse, ActionGroup = group, Height = 20, BorderStyle = System.Windows.Forms.BorderStyle.None
            };
            Windows8CheckBox chk = new Windows8CheckBox()
            {
                Dock = DockStyle.Left, Text = group.Name, ForeColor = Color.WhiteSmoke, BackColor = Color.Transparent, Padding = new Padding(5, 0, 0, 0), Width = 180, Font = new Font(Font.Name, Font.Size, FontStyle.Bold)
            };

            chk.CheckedChanged += new EventHandler(chk_CheckedChanged);
            header.Controls.Add(chk);

            this.Controls.Add(header);
        }