Ejemplo n.º 1
0
        private void Window_LoadSettings()
        {
            if (Keyboard.IsKeyDown(Key.LeftShift))
            {
                App.Settings.ARCLWindow = new ApplicationSettings_Serializer.ApplicationSettings.WindowSettings();
            }

            if (double.IsNaN(App.Settings.ARCLWindow.Left))
            {
                App.Settings.ARCLWindow.Left   = Owner.Left;
                App.Settings.ARCLWindow.Top    = Owner.Top + Owner.Height;
                App.Settings.ARCLWindow.Height = 768;
                App.Settings.ARCLWindow.Width  = 1024;
            }

            this.Left   = App.Settings.ARCLWindow.Left;
            this.Top    = App.Settings.ARCLWindow.Top;
            this.Height = App.Settings.ARCLWindow.Height;
            this.Width  = App.Settings.ARCLWindow.Width;

            if (!CheckOnScreen.IsOnScreen(this))
            {
                App.Settings.ARCLWindow.Left   = Owner.Left;
                App.Settings.ARCLWindow.Top    = Owner.Top + Owner.Height;
                App.Settings.ARCLWindow.Height = 768;
                App.Settings.ARCLWindow.Width  = 1024;

                this.Left   = App.Settings.ARCLWindow.Left;
                this.Top    = App.Settings.ARCLWindow.Top;
                this.Height = App.Settings.ARCLWindow.Height;
                this.Width  = App.Settings.ARCLWindow.Width;
            }

            TxtConnectionString.Text = App.Settings.ARCLConnectionString;
        }
Ejemplo n.º 2
0
        public MainWindow()
        {
            InitializeComponent();

            if (Keyboard.IsKeyDown(Key.LeftShift))
            {
                App.Settings.MainWindow = new ApplicationSettings_Serializer.ApplicationSettings.WindowSettings();
                App.Settings.ARCLWindow = new ApplicationSettings_Serializer.ApplicationSettings.WindowSettings();
                App.Settings.RESTWindow = new ApplicationSettings_Serializer.ApplicationSettings.WindowSettings();
            }

            if (double.IsNaN(App.Settings.MainWindow.Left))
            {
                this.WindowStartupLocation = WindowStartupLocation.CenterScreen;
            }
            else
            {
                this.Left = App.Settings.MainWindow.Left;
                this.Top  = App.Settings.MainWindow.Top;

                if (!CheckOnScreen.IsOnScreen(this))
                {
                    this.WindowStartupLocation = WindowStartupLocation.CenterScreen;
                }
            }
        }
Ejemplo n.º 3
0
        private void Window_LoadSettings()
        {
            if (double.IsNaN(App.Settings.RESTWindow.Left) ||
                !CheckOnScreen.IsOnScreen(this) ||
                Keyboard.IsKeyDown(Key.LeftShift))
            {
                Left   = Owner.Left;
                Top    = Owner.Top + Owner.Height;
                Height = 768;
                Width  = 1024;
            }

            TxtPassword.Password = App.Settings.RESTPassword;
        }