Пример #1
0
 private void Form1_Resize(object sender, EventArgs e)
 {
     dbf.SetBounds(0, ScreenHeight / 3, 2 * ScreenWidth / 3, 2 * ScreenHeight / 3);
     abf.SetBounds(2 * ScreenWidth / 3, ScreenHeight / 3, ScreenWidth / 3, 2 * ScreenHeight / 3);
     aab.SetBounds((int)(Width / 12 * 10.75) - 5, Height / 3 - (int)(1.5 * Height / 12), Width / 12, Height / 12);
     sab.SetBounds((int)(Width / 12 * 8.75) - 5, Height / 3 - (int)(1.5 * Height / 12), Width / 9, Height / 12);
     this.Refresh();
 }
Пример #2
0
        private void InitOwnFormComponents()
        {
            abf = new AppointmentButtonField(this);
            dbf = new DayButtonField(this, abf);
            dbf.SetBounds(0, ScreenHeight / 3, 2 * ScreenWidth / 3, 2 * ScreenHeight / 3);
            abf.SetBounds(2 * ScreenWidth / 3, ScreenHeight / 3, ScreenWidth / 3, 2 * ScreenHeight / 3);
            Controls.Add(dbf);
            Controls.Add(abf);

            aab = new AddAppointmentButton();
            sab = new SaveAppoitmentsButton();
            aab.SetBounds((int)(Width / 12 * 10.75) - 5, Height / 3 - (int)(1.5 * Height / 12), Width / 12, Height / 12);
            sab.SetBounds((int)(Width / 12 * 8.75) - 5, Height / 3 - (int)(1.5 * Height / 12), Width / 9, Height / 12);
            Controls.Add(aab);
            Controls.Add(sab);
        }