public bool Close(FormClosingMode closeMode) { //сохраняем все переводы, если мы в режиме правки if (BaseSettings.TranslationMode && DCManager != null && DCManager.HasChanges) { if (!DCManager.SaveTranslations()) { return(false); } } Close(); return(true); }
public virtual bool Close(FormClosingMode closeMode) { //if (LifeTimeState == LifeTimeState.Closing) // return; if (closeMode != FormClosingMode.NoSave) { if (closeMode == FormClosingMode.SaveWithConfirmation) { if (!BaseActionPanel.ConfirmCancel(BusinessObject, FindForm())) { return(false); } ClearLastExecutedAction(); } else if (!Post()) { return(false); } } //сохраняем все переводы, если мы в режиме правки if (BaseSettings.TranslationMode && DCManager != null && DCManager.HasChanges) { if (!DCManager.SaveTranslations()) { return(false); } //ttForm.DCManager.Release(); } SaveGridLayout(); Release(); var form = FindForm(); if (form != null && form != BaseFormManager.MainForm) { form.Close(); return(true); } if (ParentLayout != null) { ParentLayout.Dispose(); } Dispose(); return(true); }