private void button1_Click(object sender, EventArgs e) { if (textBoxTopicNam.Text.Length <= 0) { ErrorInforDialog errorInforDialog = new ErrorInforDialog("Please provide a name for creating quiz...!!"); errorInforDialog.ShowDialog(); } else if (comboBoxSubjects.SelectedIndex >= 0) { GlobalStaticVariablesAndMethods.currentTopicName = textBoxTopicNam.Text; GlobalStaticVariablesAndMethods.currentSubjectName = comboBoxSubjects.SelectedItem.ToString(); this.Hide(); } else { ErrorInforDialog errorInforDialog = new ErrorInforDialog("Please select any subject...!!"); errorInforDialog.ShowDialog(); } }
public static void CreateErrorMessage(String message) { ErrorInforDialog errorInforDialog = new ErrorInforDialog(message); errorInforDialog.ShowDialog(); }