상속: System.EventArgs
예제 #1
0
        void HandleCloseTab(object sender, TdiTabCloseEventArgs e)
        {
            if (CheckClosingSlaveTabs ((ITdiTab)sender))
                return;

            if (!e.AskSave || SaveIfNeed ((ITdiTab)sender))
                CloseTab ((ITdiTab)sender);
        }
예제 #2
0
 protected void OnJournalClose(object sender, TdiTabCloseEventArgs arg)
 {
     if (CloseTab != null)
         CloseTab (this, arg);
 }
예제 #3
0
 void TdiTab_CloseTab(object sender, TdiTabCloseEventArgs e)
 {
     Respond (ResponseType.Close);
 }
예제 #4
0
        protected void OnDialogClose(object sender, TdiTabCloseEventArgs arg)
        {
            if (TabParent.CheckClosingSlaveTabs (this as ITdiTab))
                return;

            ITdiDialog dlg = sender as ITdiDialog;
            if (arg.AskSave && dlg.HasChanges) {
                string Message = "Объект изменён. Сохранить изменения перед закрытием?";
                MessageDialog md = new MessageDialog ((Window)this.Toplevel, DialogFlags.Modal,
                                       MessageType.Question,
                                       ButtonsType.YesNo,
                                       Message);
                md.AddButton ("Отмена", ResponseType.Cancel);
                int result = md.Run ();
                md.Destroy ();
                if (result == (int)ResponseType.Cancel)
                    return;
                if (result == (int)ResponseType.Yes) {
                    if (!dlg.Save ()) {
                        logger.Warn ("Объект не сохранён. Отмена закрытия...");
                        return;
                    }
                }
            }
            ActiveDialog = null;
            (dlg as Widget).Destroy ();
            OnSladerTabChanged ();
        }