public void DragHandler(object Sender, MouseEventArgs e) { if (e.Button == MouseButtons.Left) { ReleaseCapture(); StickyForm.SendMessage(Handle, WM_NCLBUTTONDOWN, HT_CAPTION, 0); } }
public StickyPanel(StickyForm sticky) { this.sticky = sticky; this.RowCount = 1; this.ColumnCount = 1; this.textBox = new StickyTextBox(this); this.SetCellPosition(this.textBox, new TableLayoutPanelCellPosition(0, 0)); this.Location = new Point(offset, this.sticky.TopPanel.RealHeight); this.Width = this.sticky.Width - (2 * offset); this.Height = this.sticky.Height - this.sticky.TopPanel.RealHeight - offset; this.BackColor = Color.LightSkyBlue; }
public TopPanel(StickyForm stickyForm) { this.sticky = stickyForm; this.RowCount = 1; this.ColumnCount = 4; this.newButton = new NewStickyButton(this.sticky); this.SetCellPosition(this.newButton, new TableLayoutPanelCellPosition(0, 0)); this.Controls.Add(this.newButton); this.colorButton = new ColorButton(this.sticky); this.SetCellPosition(this.colorButton, new TableLayoutPanelCellPosition(1, 0)); this.Controls.Add(this.colorButton); this.settingsButton = new SettingsButton(this.sticky); this.SetCellPosition(this.settingsButton, new TableLayoutPanelCellPosition(2, 0)); this.Controls.Add(this.settingsButton); this.closeButton = new CloseStickyButton(this.sticky); this.SetCellPosition(this.closeButton, new TableLayoutPanelCellPosition(3, 0)); this.Controls.Add(this.closeButton); this.BackColor = Color.Purple; this.Height = 25; this.Width = this.sticky.Width - (2 * Offset); this.Location = new Point(Offset, Offset); this.MouseMove += this.sticky.DragHandler; }
public CloseStickyButton(StickyForm sticky) : base(sticky) { this.Image = Image.FromFile("F:/Programming/sticky-plus-plus/Resources/close.png"); }
public ColorButton(StickyForm sticky) : base(sticky) { this.Text = "COLOR"; }
public SettingsButton(StickyForm sticky) : base(sticky) { this.Text = "SETTINGS"; }
public StickyButton(StickyForm sticky) : base() { this.sticky = sticky; this.Click += new EventHandler(clickHandlerMediator); }