private void Application_Exit(object sender, ExitEventArgs e) { List <string> def_cards = Globals.GetListOfDefectiveCards(); if (def_cards.Count != 0) { MessageBox.Show("There are some defective cards detected. Please check them up."); frmDefectiveCards f = new frmDefectiveCards(); f.ShowDialog(); } }
public MainWindow() { InitializeComponent(); //FrmTest t = new FrmTest(); //t.ShowDialog(); //return; List <string> def_cards = Globals.GetListOfDefectiveCards(); if (def_cards.Count != 0) { MessageBox.Show("There are some defective cards detected. Please check them up."); frmDefectiveCards f = new frmDefectiveCards(); f.ShowDialog(); } Init(); }