public GUIForWindowsGUISettings(IObjectData data) : base(data) { // prepare settings bool chaseLastLog = Defaults.ChaseLastLog; MainWindowSettings mainWindow = null; if (data != null) { // get settings from data chaseLastLog = data.GetBooleanValue(SettingNames.ChaseLastLog, chaseLastLog); mainWindow = data.GetObjectValue(SettingNames.MainWindow, mainWindow, this.CreateMainWindowSettings); } if (mainWindow == null) { mainWindow = CreateMainWindowSettings(null); } // set settings try { // may throw ArgumentException for an invalid value this.ChaseLastLog = chaseLastLog; this.mainWindow = mainWindow; } catch (Exception exception) { throw new FormatException(exception.Message); } return; }
public GUIForWindowsGUISettings(GUIForWindowsGUISettings src) : base(src) { // argument checks if (src == null) { throw new ArgumentNullException(nameof(src)); } // clone members this.ChaseLastLog = src.ChaseLastLog; this.MainWindow = Clone(src.MainWindow); return; }
public MainWindowSettings(MainWindowSettings src) : base(src) { // argument checks if (src == null) { throw new ArgumentNullException(nameof(src)); } // clone members this.LogListViewColumnWidths = (src.LogListViewColumnWidths == null)? null: (double[])src.LogListViewColumnWidths.Clone(); this.Placement = src.Placement; return; }