private void Save_Window_State() { Properties.Settings.Default.WindowState = WindowState.ToString(); if (Properties.Settings.Default.WindowState.Equals("Normal", StringComparison.OrdinalIgnoreCase)) { Properties.Settings.Default.WindowHeight = Height; Properties.Settings.Default.WindowWidth = Width; Properties.Settings.Default.WindowXLoc = Left; Properties.Settings.Default.WindowYLoc = Top; } else { Properties.Settings.Default.WindowHeight = RestoreBounds.Height; Properties.Settings.Default.WindowWidth = RestoreBounds.Width; Properties.Settings.Default.WindowXLoc = RestoreBounds.X; Properties.Settings.Default.WindowYLoc = RestoreBounds.Y; } try { Properties.Settings.Default.Save(); } catch (Exception e) { throw (e); }}
private void Save_Window_State() { Properties.Settings.Default.WindowState = WindowState.ToString();
if (Properties.Settings.Default.WindowState.Equals("Normal", StringComparison.OrdinalIgnoreCase)) { Properties.Settings.Default.WindowHeight = Height; Properties.Settings.Default.WindowWidth = Width; Properties.Settings.Default.WindowXLoc = Left; Properties.Settings.Default.WindowYLoc = Top; } else { Properties.Settings.Default.WindowHeight = RestoreBounds.Height; Properties.Settings.Default.WindowWidth = RestoreBounds.Width; Properties.Settings.Default.WindowXLoc = RestoreBounds.X; Properties.Settings.Default.WindowYLoc = RestoreBounds.Y; } try { Properties.Settings.Default.Save(); } catch (Exception e) { throw (e); }
}