Exemplo n.º 1
0
        }//------------------------------

        //event is raised when the class is clossing
        private void ClassClossing(object sender, FormClosingEventArgs e)
        {
            if (this.btnRecord.Enabled)
            {
                String strMsg = "There has been changes made in the current schedule information. \nExiting will not save this changes." +
                                "\n\nAre you sure you want to exit?";
                DialogResult msgResult = MessageBox.Show(strMsg, "Confirm Exit", MessageBoxButtons.YesNo, MessageBoxIcon.Question);

                if (msgResult == DialogResult.No)
                {
                    e.Cancel = true;
                }
                else
                {
                    _teacherLoadingManager.DeleteImageDirectory(Application.StartupPath);
                }
            }
        }//-------------------------------