private void User_FormClosing1(object sender, FormClosingEventArgs e) { login.Close(); }
// closing form and dialog void ButtonClick(object sender, EventArgs e) { dialog.Close(); form.Close(); }
private void Admin_FormClosing(object sender, FormClosingEventArgs e) { login.Close(); }
private void _annulla_Click(object sender, EventArgs e) { formSessione.Close(); }
public static string MultipleLang(string Description, string Title, Dictionary <int, string> languages) { ComponentResourceManager componentResourceManager = new ComponentResourceManager(typeof(Form1)); MetroForm metroForm = new MetroForm(); metroForm.ShadowType = MetroFormShadowType.AeroShadow; metroForm.Width = 280; metroForm.Height = 135; metroForm.FormBorderStyle = FormBorderStyle.None; metroForm.Resizable = false; metroForm.Icon = (Icon)componentResourceManager.GetObject("notifyIcon1.Icon"); metroForm.ControlBox = false; metroForm.Theme = MetroThemeStyle.Dark; metroForm.DisplayHeader = false; metroForm.TopMost = true; metroForm.Text = Title; metroForm.StartPosition = FormStartPosition.CenterScreen; MetroForm prompt = metroForm; MetroLabel value = new MetroLabel { Left = 5, Top = 20, Text = Description, Width = 270, Height = 40, TextAlign = ContentAlignment.MiddleCenter, Theme = MetroThemeStyle.Dark }; MetroComboBox metroComboBox = new MetroComboBox { Left = 5, Top = 70, Width = 270, Theme = MetroThemeStyle.Dark, ImeMode = ImeMode.NoControl }; MetroButton metroButton = new MetroButton { Text = "Ok", Left = 5, Width = 100, Top = 100, DialogResult = DialogResult.OK, Theme = MetroThemeStyle.Dark }; metroButton.Click += delegate { prompt.Close(); }; metroButton.TabStop = false; metroComboBox.Text = "Choose Game Language"; metroComboBox.Items.Add("Choose Game Language"); metroComboBox.SelectedIndex = 0; metroComboBox.TabStop = false; for (int i = 0; languages.Count > i; i++) { metroComboBox.Items.Add(languages[i]); } prompt.Controls.Add(metroComboBox); prompt.Controls.Add(metroButton); prompt.Controls.Add(value); prompt.AcceptButton = metroButton; prompt.Style = ColorSet; prompt.ShowDialog(); if (metroComboBox.SelectedItem.ToString() == "Choose Game Language") { metroComboBox.SelectedIndex = 1; } return(metroComboBox.SelectedItem.ToString()); }
public static string MultipleInstallation(string Description, string Title, Dictionary <string, string> installs) { ComponentResourceManager componentResourceManager = new ComponentResourceManager(typeof(Form1)); MetroForm metroForm = new MetroForm(); metroForm.ShadowType = MetroFormShadowType.AeroShadow; metroForm.Width = 280; metroForm.Height = 135; metroForm.FormBorderStyle = FormBorderStyle.None; metroForm.Resizable = false; metroForm.Icon = (Icon)componentResourceManager.GetObject("notifyIcon1.Icon"); metroForm.ControlBox = false; metroForm.Theme = MetroThemeStyle.Dark; metroForm.DisplayHeader = false; metroForm.TopMost = true; metroForm.Text = Title; metroForm.StartPosition = FormStartPosition.CenterScreen; MetroForm prompt = metroForm; MetroLabel value = new MetroLabel { Left = 5, Top = 20, Text = Description, Width = 270, Height = 40, TextAlign = ContentAlignment.MiddleCenter, Theme = MetroThemeStyle.Dark }; MetroComboBox metroComboBox = new MetroComboBox { Left = 5, Top = 70, Width = 270, Theme = MetroThemeStyle.Dark, ImeMode = ImeMode.NoControl }; MetroButton metroButton = new MetroButton { Text = "Ok", Left = 5, Width = 100, Top = 100, DialogResult = DialogResult.OK, Theme = MetroThemeStyle.Dark }; metroButton.Click += delegate { prompt.Close(); }; metroButton.TabStop = false; metroComboBox.Items.Add("Choose Default Installation"); if (installs.ContainsKey("NA/EU") && installs["NA/EU"].ToString().Length > 1) { metroComboBox.Items.Add("NA/EU"); } if (installs.ContainsKey("Taiwan") && installs["Taiwan"].ToString().Length > 1) { metroComboBox.Items.Add("Taiwan"); } if (installs.ContainsKey("Japanese") && installs["Japanese"].ToString().Length > 1) { metroComboBox.Items.Add("Japanese"); } if (installs.ContainsKey("Korean") && installs["Korean"].ToString().Length > 1) { metroComboBox.Items.Add("Korean"); } if (installs.ContainsKey("Korean Test") && installs["Korean Test"].ToString().Length > 1) { metroComboBox.Items.Add("Korean Test"); } metroComboBox.TabStop = false; metroComboBox.SelectedIndex = 0; prompt.Controls.Add(metroComboBox); prompt.Controls.Add(metroButton); prompt.Controls.Add(value); prompt.AcceptButton = metroButton; prompt.Style = ColorSet; prompt.ShowDialog(); if (metroComboBox.SelectedItem.ToString() == "Choose Default Installation") { metroComboBox.SelectedIndex = 1; } return(installs[metroComboBox.SelectedItem.ToString()]); }
private void WareHouseManager_FormClosing(object sender, FormClosingEventArgs e) { login.Close(); }