public SearchForm(OrganizerForm organizerForm) { of = organizerForm; InitializeComponent(); metroLabel1.Location = new Point((metroPanel1.Width - metroLabel1.Width) / 2, metroPanel1.Height / 3); metroTextBox1.Location = new Point((metroPanel1.Width - metroLabel1.Width) / 2, metroPanel1.Height / 3 + metroLabel1.Height * 2); metroButton1.Location = new Point((metroPanel1.Width - metroLabel1.Width) / 2, metroPanel1.Height / 2 + metroTextBox1.Height * 2); }
public AddEvent(OrganizerForm organizerForm) { of = organizerForm; InitializeComponent(); this.monthCalendar1.MinDate = monthCalendar1.TodayDate; //this.metroDateTime1.MinDate = DateTime.Now; this.metroDateTime1.ShowUpDown = true; metroDateTime1.Format = DateTimePickerFormat.Custom; metroDateTime1.CustomFormat = "HH:mm"; metroTextBox1.Text = "Event"; this.metroComboBox1.Text = "Memo"; }
private void buttonLogIn_Click(object sender, EventArgs e) { if (this.textBoxLogin.Text.ToLower().Equals(login)) { if (this.textBoxPassword.Text.Equals(password)) { this.Hide(); OrganizerForm organizerForm = new OrganizerForm(); organizerForm.Closed += (s, args) => this.Close(); organizerForm.Show(); } else { MessageBox.Show("Incorrect password!"); } } else { MessageBox.Show("Incorrect login!"); } }