private void AppVersionComboBox_SelectedIndexChanged(object sender, EventArgs e) { string AppVersion = AppVersionComboBox.Text; if (AppVersion.Length < 1) { AppLogoPictureBox.Image = Image.FromFile(@"logo\PLM-Integration.png"); } else { AppLogoPictureBox.Image = Image.FromFile(DatabaseAppQuery.QueryLogo(AppVersion)); } }
private void AppComboBox_SelectedIndexChanged(object sender, EventArgs e) { string AppNameSelected = AppComboBox.Text; if (AppNameSelected.Length < 2) { AppVersionComboBox.SelectedIndex = -1; if (AppNameSelected.Length == 0) { AppVersionComboBox.DataSource = null; } } else { AppVersionComboBox.DataSource = DatabaseAppQuery.QueryAppVersion(AppNameSelected); } }
private void ButtonAddAppTab_Click_1(object sender, EventArgs e) { DatabaseAppQuery.SqlAccountInfo(); if (AppComboBox.Text.Length < 1) { MessageBox.Show("You have to choose an Application.", "Warning", MessageBoxButtons.OK, MessageBoxIcon.Warning); } else { MessageBox.Show(DatabaseAppQuery.QueryAppCommandLine(AppComboBox.Text, AppVersionComboBox.Text)); if (!AppList.Items.Contains(AppComboBox.Text + " - " + AppVersionComboBox.Text)) { AppList.Items.Add(AppComboBox.Text + " - " + AppVersionComboBox.Text); AppComboBox.SelectedIndex = -1; } else { MessageBox.Show("The App you are trying to add is already in the list.", "Warning", MessageBoxButtons.OK, MessageBoxIcon.Warning); } } }
private void Form1_Load(object sender, EventArgs e) { AppComboBox.DataSource = DatabaseAppQuery.QueryAppDistinct(); AppComboBox.SelectedIndex = -1; AppLogoPictureBox.Image = Image.FromFile(@"logo\PLM-Integration.png"); }
private void ButtonCleanAppTab_Click_1(object sender, EventArgs e) { DatabaseAppQuery.QueryAll(); AppList.Items.Clear(); }