Exemplo n.º 1
0
        protected override void OnClosing(CancelEventArgs e)
        {
            var lwp = new LastWindowProperties();

            if (Left > 0)
            {
                lwp.Left = 0;
            }
            if (Top > 0)
            {
                lwp.Top = 0;
            }
            if (ActualWidth > 0)
            {
                lwp.Width = 0;
            }
            if (ActualHeight > 0)
            {
                lwp.Height = 0;
            }
            if (WindowState != WindowState.Minimized)
            {
                lwp.WindowState = 0;
            }

            _settingsWrapper.SetLastWindowProperties(lwp);
        }
Exemplo n.º 2
0
 public void SetLastWindowProperties(LastWindowProperties lastWindowProperties)
 {
     CurrentSettings.LastWindowProperties = lastWindowProperties;
     InternalSave();
 }