Exemple #1
0
        /// <summary>
        /// 保存窗口状态
        /// </summary>
        private void SaveWindow()
        {
            if (this.WindowState != WindowState.Minimized)
            {
                if (this.WindowState == WindowState.Normal)
                {
                    WinState = JvedioWindowState.Normal;
                }
                else if (this.WindowState == WindowState.Maximized)
                {
                    WinState = JvedioWindowState.FullScreen;
                }

                if (this.Width == SystemParameters.WorkArea.Width & this.Height == SystemParameters.WorkArea.Height)
                {
                    WinState = JvedioWindowState.Maximized;
                }

                WindowConfig cj = new WindowConfig(this.GetType().Name);
                cj.Save(new WindowProperty()
                {
                    Location = new Point(this.Left, this.Top), Size = new Size(this.Width, this.Height), WinState = WinState
                });
            }
        }
Exemple #2
0
        private void Button_Click_1(object sender, RoutedEventArgs e)
        {
            WindowConfig windowConfig = new WindowConfig("Main");

            windowConfig.Save(new WindowProperty()
            {
                Location = new Point(123, 456), Size = new Size(789, 777), WinState = StaticVariable.JvedioWindowState.FullScreen
            });

            WindowProperty windowProperty = windowConfig.Read();

            Console.WriteLine(123);
        }
Exemple #3
0
        private void SaveWindow()
        {
            if (this.WindowState != WindowState.Minimized)
            {
                if (this.WindowState == WindowState.Normal)
                {
                    WinState = JvedioWindowState.Normal;
                }
                else if (this.WindowState == WindowState.Maximized)
                {
                    WinState = JvedioWindowState.FullScreen;
                }
                else if (this.Width == SystemParameters.WorkArea.Width & this.Height == SystemParameters.WorkArea.Height)
                {
                    WinState = JvedioWindowState.Maximized;
                }

                WindowConfig cj   = new WindowConfig(this.GetType().Name);
                Rect         rect = new Rect(this.Left, this.Top, this.Width, this.Height);
                cj.Save(rect, WinState);
            }
        }
Exemple #4
0
        private void Window_Closing(object sender, System.ComponentModel.CancelEventArgs e)
        {
            StopDownLoad();
            if (this.WindowState != WindowState.Minimized)
            {
                if (this.WindowState == WindowState.Normal)
                {
                    WinState = JvedioWindowState.Normal;
                }
                else if (this.WindowState == WindowState.Maximized)
                {
                    WinState = JvedioWindowState.FullScreen;
                }
                else if (this.Width == SystemParameters.WorkArea.Width & this.Height == SystemParameters.WorkArea.Height)
                {
                    WinState = JvedioWindowState.Maximized;
                }


                WindowConfig cj   = new WindowConfig(this.GetType().Name);
                Rect         rect = new Rect(this.Left, this.Top, this.Width, this.Height);
                cj.Save(rect, WinState);
            }
        }