protected override void OnLoad(EventArgs e) { base.OnLoad(e); if (!base.DesignMode) { FormPositionStorer.Load(this, Settings.Default.FileNameExcludesWordsEditorPositionJson); } }
protected override void OnClosed(EventArgs e) { base.OnClosed(e); if (!base.DesignMode) { Settings.Default.FileNameExcludesWordsEditorPositionJson = FormPositionStorer.SaveOnlyPos(this); Settings.Default.SaveNoThrow(); } }
protected override void OnLoad(EventArgs e) { base.OnLoad(e); if (!base.DesignMode) { var json = (logPanel.Visible ? _Settings.AddNewDownloadFormPositionLogVisibleJson : _Settings.AddNewDownloadFormPositionJson); FormPositionStorer.Load(this, json); } }
private void logPanel_VisibleChanged(object sender, EventArgs e) { var json = _Settings.AddNewDownloadFormPositionLogVisibleJson; if (!json.IsNullOrEmpty()) { FormPositionStorer.LoadOnlyHeight(this, json); } else { this.Height += 250; } }
protected override void OnClosed(EventArgs e) { base.OnClosed(e); if (!base.DesignMode) { if (logPanel.Visible) { _Settings.AddNewDownloadFormPositionLogVisibleJson = FormPositionStorer.SaveOnlyPos(this); _Settings.AddNewDownloadFormPositionJson = FormPositionStorer.SaveOnlyPos(this, (this.Height - logPanel.Height)); } else { _Settings.AddNewDownloadFormPositionJson = FormPositionStorer.SaveOnlyPos(this); } if (DialogResult != DialogResult.Cancel) { _Settings.OutputFileDirectory = this.OutputDirectory; } _Settings.SaveNoThrow(); } }