private FormStateDTO formStateDTO; // состояние формы для передачи /// <summary> /// Конструктор /// </summary> public FrmMain() { InitializeComponent(); appData = AppData.GetAppData(); log = appData.Log; editor = appData.Editor; mutex = null; compTypesChanging = false; schCompChanging = false; formStateDTO = null; editor.ModifiedChanged += Editor_ModifiedChanged; editor.PointerModeChanged += Editor_PointerModeChanged; editor.StatusChanged += Editor_StatusChanged; editor.SelectionChanged += Editor_SelectionChanged; editor.SelectionPropsChanged += Editor_SelectionPropsChanged; editor.ClipboardChanged += Editor_ClipboardChanged; editor.History.HistoryChanged += History_HistoryChanged; }
/// <summary> /// Обновить объект состояния формы /// </summary> private void UpdateFormStateDTO(FormState formState) { formStateDTO = formState.GetFormStateDTO(WindowState != FormWindowState.Minimized); }