/// <summary> /// Load GUI settings from XML /// </summary> /// <param name="defValue"></param> /// <returns>true - settings loaded, false - no</returns> private bool LoadSettings(frmConnectionSelectionSettings defValue = null) { bool result = false; this._settings = Program.Model.LayoutSettings.GetExtendedSettings <frmConnectionSelectionSettings>( _frmId, preprocessor, Program.Model.Settings.InterfaceLanguage ); result = this._settings != null; if (result) { ApplySettings(); } if (this._settings == null && defValue != null) { this._settings = defValue; } if (this._settings != null) { return(result); } UpdateSettings(); return(result); }
/// <summary> /// Default constructor /// </summary> public frmConnectionSelection() { this._settings = null; this._isLoaded = false; InitializeComponent(); dgvCurrentConnection.DefaultCellStyle.SelectionBackColor = dgvCurrentConnection.DefaultCellStyle.BackColor; dgvCurrentConnection.DefaultCellStyle.SelectionForeColor = dgvCurrentConnection.DefaultCellStyle.ForeColor; }
private void SaveNewColumnChange(string prefix, DataGridViewColumn column) { var id = String.Format("{0}{1}", prefix, column.Name); if (this._settings == null) { this._settings = new frmConnectionSelectionSettings(); } this._settings.SetColumnSettings(id, column.Visible, column.Width); SaveSettings(); }
/// <summary> /// Save GUI settings from XML /// </summary> private void SaveSettings() { if (this._settings == null) { this._settings = new frmConnectionSelectionSettings(); } UpdateSettings(); Program.Model.LayoutSettings.SetExtendedSettings <frmConnectionSelectionSettings>( _frmId, preprocessor, Program.Model.Settings.InterfaceLanguage, this._settings ); }