예제 #1
0
 private void Window_Closing(object sender, System.ComponentModel.CancelEventArgs e)
 {
     if (isModified)
     {
         Boolean result = CHelper.AskConfirmSave();
         if (result)
         {
             //Yes, save it
             Boolean r = SaveData("N");
             e.Cancel = !r;
         }
     }
 }
 private void Window_Closing(object sender, System.ComponentModel.CancelEventArgs e)
 {
     cmdOK.Focus();
     if (vw.IsModified)
     {
         Boolean result = CHelper.AskConfirmSave();
         if (result)
         {
             Boolean r = SaveData();
             e.Cancel = !r;
         }
     }
 }
예제 #3
0
 private void rootElement_Closing(object sender, System.ComponentModel.CancelEventArgs e)
 {
     if (vw.IsModified)
     {
         Boolean result = CHelper.AskConfirmSave();
         if (result)
         {
             Boolean r = SaveData();
             if (r)
             {
                 HasModified = true;
                 CUtil.EnableForm(true, this);
             }
         }
     }
 }
예제 #4
0
        private void rootElement_Closing(object sender, System.ComponentModel.CancelEventArgs e)
        {
            if (fc.IsModified)
            {
                Boolean result = CHelper.AskConfirmSave();
                if (result)
                {
                    //Yes, save it
                    Boolean r = SaveData();
                    e.Cancel = !r;

                    if (r)
                    {
                        IsOK = true;
                    }
                }
            }
        }
예제 #5
0
        private void DefaultItemWindow_Closing(object sender, System.ComponentModel.CancelEventArgs e)
        {
            if (!isEditable())
            {
                return;
            }

            if (vw.IsModified)
            {
                Boolean result = CHelper.AskConfirmSave();
                if (result)
                {
                    //Yes, save it
                    Boolean r = saveDataItem();
                    e.Cancel = !r;
                }
            }
        }
예제 #6
0
 private void RootElement_Closing(object sender, System.ComponentModel.CancelEventArgs e)
 {
     if (cfg.IsModified)
     {
         Boolean result = CHelper.AskConfirmSave();
         if (result)
         {
             //Yes, save it
             Boolean r = ValidateData();
             isOK     = r;
             e.Cancel = !r;
         }
         else
         {
             isOK = false;
         }
     }
 }