/** * Window_Closing */ private void Window_Closing(object sender, System.ComponentModel.CancelEventArgs e) { // operations Operations.GetInstance().Final(); // window WindowConfig config = WindowConfig.GetInstance(); WindowConfigValues values = config.GetValues(); if (WindowState == WindowState.Normal) { values.WindowX = Left; values.WindowY = Top; values.WindowWidth = ActualWidth; values.WindowHeight = ActualHeight; values.WindowMaximized = false; } else if (WindowState == WindowState.Maximized) { values.WindowMaximized = true; } else { values.WindowMaximized = false; } }
/** * Window_Initialized */ private void Window_Initialized(object sender, EventArgs e) { // window WindowConfig config = WindowConfig.GetInstance(); WindowConfigValues values = config.GetValues(); Left = values.WindowX; Top = values.WindowY; Width = values.WindowWidth; Height = values.WindowHeight; if (values.WindowMaximized == true) { WindowState = WindowState.Maximized; } // operations Operations.GetInstance().Init(); }