public void New(Func <bool> askIfSure)
        {
            if (UnsavedChanges)
            {
                if (!askIfSure())
                {
                    return;
                }
            }

            _addressManager.DeleteAll();
            _estateManager.DeleteAll();
            UnsavedChanges = false;
        }
Esempio n. 2
0
        private void mnuNew_Click(object sender, EventArgs e)
        {
            DialogResult NewDialog = MessageBox.Show("Are u sure u want to do this?", "New", MessageBoxButtons.OK);

            if (NewDialog == DialogResult.OK)
            {
                Em.DeleteAll();
                fileName = null;
                Update();
            }
            else
            {
                Update();
            }
        }
Esempio n. 3
0
 /// <summary>
 /// Deletes all the estates in the estates ArrayList.
 /// </summary>
 /// <param name="sender"></param>
 /// <param name="e"></param>
 private void btnDeleteAll_Click(object sender, EventArgs e)
 {
     estateManager.DeleteAll();
     dictionaryHandler.ClearAll();
 }