public MainForm() { InitializeComponent(); this.AutoScaleMode = AutoScaleMode.Dpi; this.BackColor = Color.White; var screenBounds = Screen.PrimaryScreen.WorkingArea; int width = screenBounds.Width; int height = screenBounds.Height; if (width > 1200) { this.Width = 1200; } else { this.Width = (int)(Math.Min(1200, width) * 0.80); } this.Height = (int)(Math.Min(1080, height) * 0.90); _optionSettings = new OptionSettings(); _testSettingsPath = Path.GetFullPath(Path.Combine("..\\", SvgTestSettings)); if (!string.IsNullOrWhiteSpace(_testSettingsPath) && File.Exists(_testSettingsPath)) { _optionSettings.Load(_testSettingsPath, this); } _currentTheme = DockingTheme.LightTheme; InitializePanels(); }
public OptionSettings(OptionSettings source) { if (source == null) { return; } _hidePathsRoot = source._hidePathsRoot; _webSuitePath = source._webSuitePath; _localSuitePath = source._localSuitePath; _theme = source._theme; _winPosition = source._winPosition; }
public OptionSettings Clone() { OptionSettings optSettings = new OptionSettings(this); if (_webSuitePath != null) { optSettings._webSuitePath = string.Copy(_webSuitePath); } if (_localSuitePath != null) { optSettings._localSuitePath = string.Copy(_localSuitePath); } if (_winPosition != null) { optSettings._winPosition = _winPosition.Clone(); } return(optSettings); }
public OptionSettings Clone() { OptionSettings optSettings = new OptionSettings(this); if (_webSuitePath != null) { optSettings._webSuitePath = new string(_webSuitePath.ToCharArray()); } if (_localSuitePath != null) { optSettings._localSuitePath = new string(_localSuitePath.ToCharArray()); } if (_winPosition != null) { optSettings._winPosition = _winPosition.Clone(); } return(optSettings); }
public void InitializePanel(MainForm mainForm, OptionSettings optionSettings, ThemeBase theme) { _mainForm = mainForm; _optionSettings = optionSettings; _theme = theme; }