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); }
public void SaveAppoitmentsButton_Click(SaveAppoitmentsButton saveAppoitmentsButton, EventArgs e) { AppoitmentDataHandler.WriteAllAppoitmentsToFile(Environment.CurrentDirectory + APPOINTMENT_DATA_FILE); }