コード例 #1
0
        public void New(Func <bool> askIfSure)
        {
            if (UnsavedChanges)
            {
                if (!askIfSure())
                {
                    return;
                }
            }

            _addressManager.DeleteAll();
            _estateManager.DeleteAll();
            UnsavedChanges = false;
        }
コード例 #2
0
ファイル: Form1.cs プロジェクト: AlperKilic8467/Realestateapp
        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();
            }
        }
コード例 #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();
 }