void btnUp_MouseDown(object sender, MouseEventArgs e) { RoundedButton bt = (RoundedButton)sender; if (bt.Name.Contains("Up")) { bt.Image = Properties.Resources.ico_list_up_P; } else { bt.Image = Properties.Resources.ico_list_dn_P; } }
void btnUp_MouseUp(object sender, MouseEventArgs e) { RoundedButton bt = (RoundedButton)sender; if (bt.Name.Contains("Up")) { bt.Image = Properties.Resources.ico_list_up; DoScroll(true); } else { bt.Image = Properties.Resources.ico_list_dn; DoScroll(false); } }
private void InitializeComponent() { this.btnUp = new WSWD.WmallPos.POS.FX.Win.Controls.RoundedButton(); this.btnDown = new WSWD.WmallPos.POS.FX.Win.Controls.RoundedButton(); this.pnlUpDn = new System.Windows.Forms.Panel(); this.pnlContainer = new System.Windows.Forms.Panel(); this.pnlUpDn.SuspendLayout(); this.SuspendLayout(); // // btnUp // this.btnUp.BorderSize = 1; this.btnUp.ButtonType = WSWD.WmallPos.POS.FX.Shared.ButtonTypes.Type04; this.btnUp.Corner = 0; this.btnUp.Dock = System.Windows.Forms.DockStyle.Top; this.btnUp.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(92)))), ((int)(((byte)(59)))), ((int)(((byte)(152))))); this.btnUp.Image = global::WSWD.WmallPos.POS.FX.Win.Properties.Resources.ico_list_up; this.btnUp.Location = new System.Drawing.Point(0, 0); this.btnUp.Name = "btnUp"; this.btnUp.Selected = false; this.btnUp.Size = new System.Drawing.Size(33, 135); this.btnUp.TabIndex = 0; this.btnUp.TextAlign = System.Drawing.ContentAlignment.MiddleLeft; this.btnUp.MouseDown += new System.Windows.Forms.MouseEventHandler(this.btnUp_MouseDown); this.btnUp.MouseUp += new System.Windows.Forms.MouseEventHandler(this.btnUp_MouseUp); // // btnDown // this.btnDown.BorderSize = 1; this.btnDown.ButtonType = WSWD.WmallPos.POS.FX.Shared.ButtonTypes.Type04; this.btnDown.Corner = 0; this.btnDown.Dock = System.Windows.Forms.DockStyle.Fill; this.btnDown.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(92)))), ((int)(((byte)(59)))), ((int)(((byte)(152))))); this.btnDown.Image = global::WSWD.WmallPos.POS.FX.Win.Properties.Resources.ico_list_dn; this.btnDown.Location = new System.Drawing.Point(0, 135); this.btnDown.Name = "btnDown"; this.btnDown.Padding = new System.Windows.Forms.Padding(1); this.btnDown.Selected = false; this.btnDown.Size = new System.Drawing.Size(33, 133); this.btnDown.TabIndex = 0; this.btnDown.TextAlign = System.Drawing.ContentAlignment.MiddleLeft; this.btnDown.Click += new System.EventHandler(this.UpDown_Click); // // pnlUpDn // this.pnlUpDn.Controls.Add(this.btnDown); this.pnlUpDn.Controls.Add(this.btnUp); this.pnlUpDn.Dock = System.Windows.Forms.DockStyle.Right; this.pnlUpDn.Location = new System.Drawing.Point(423, 1); this.pnlUpDn.Name = "pnlUpDn"; this.pnlUpDn.Size = new System.Drawing.Size(33, 268); this.pnlUpDn.TabIndex = 1; this.pnlUpDn.SizeChanged += new System.EventHandler(this.pnlUpDn_SizeChanged); // // pnlContainer // this.pnlContainer.Dock = System.Windows.Forms.DockStyle.Fill; this.pnlContainer.Location = new System.Drawing.Point(1, 1); this.pnlContainer.Name = "pnlContainer"; this.pnlContainer.Size = new System.Drawing.Size(422, 268); this.pnlContainer.TabIndex = 2; this.pnlContainer.ControlAdded += new System.Windows.Forms.ControlEventHandler(this.pnlContainer_ControlAdded); // // ScrollablePanel // this.Controls.Add(this.pnlContainer); this.Controls.Add(this.pnlUpDn); this.Name = "ScrollablePanel"; this.Padding = new System.Windows.Forms.Padding(1); this.Size = new System.Drawing.Size(457, 270); this.Load += new System.EventHandler(this.ScrollablePanel_Load); this.pnlUpDn.ResumeLayout(false); this.ResumeLayout(false); }