public void Apply(MainWindow mainWindow)
 {
     mainWindow.Top = Top;
     mainWindow.Left = Left;
     mainWindow.Height = Height;
     mainWindow.Width = Width;
     mainWindow.WindowState = IsMaximized ? WindowState.Maximized : WindowState.Normal;
 }
 public static WindowSettings Create(MainWindow mainWindow)
 {
     return new WindowSettings
     {
         Top = mainWindow.Top,
         Left = mainWindow.Left,
         Height = mainWindow.Height,
         Width = mainWindow.Width,
         IsMaximized = mainWindow.WindowState == WindowState.Maximized
     };
 }