示例#1
0
        /**
         * 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;
            }
        }
示例#2
0
        /**
         * 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();
        }
示例#3
0
 /**
  * Application_Exit
  */
 private void Application_Exit(object sender, ExitEventArgs e)
 {
     WindowConfig.GetInstance().Final();
     ApplicationConfig.GetInstance().Final();
 }
示例#4
0
 /**
  * Application_Startup
  */
 private void Application_Startup(object sender, StartupEventArgs e)
 {
     ApplicationConfig.GetInstance().Init();
     WindowConfig.GetInstance().Init();
 }