예제 #1
0
 public void DragHandler(object Sender, MouseEventArgs e)
 {
     if (e.Button == MouseButtons.Left)
     {
         ReleaseCapture();
         StickyForm.SendMessage(Handle, WM_NCLBUTTONDOWN, HT_CAPTION, 0);
     }
 }
예제 #2
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;
        }
예제 #3
0
        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;
        }
예제 #4
0
 public CloseStickyButton(StickyForm sticky) : base(sticky)
 {
     this.Image = Image.FromFile("F:/Programming/sticky-plus-plus/Resources/close.png");
 }
예제 #5
0
 public ColorButton(StickyForm sticky) : base(sticky)
 {
     this.Text = "COLOR";
 }
예제 #6
0
 public SettingsButton(StickyForm sticky) : base(sticky)
 {
     this.Text = "SETTINGS";
 }
예제 #7
0
 public StickyButton(StickyForm sticky) : base()
 {
     this.sticky = sticky;
     this.Click += new EventHandler(clickHandlerMediator);
 }