Пример #1
0
        public MainWindow( )
        {
            RenderOptions.SetBitmapScalingMode(this, BitmapScalingMode.Fant);

            MainWindow.Instance    = this;
            App.Current.MainWindow = this;

            InitializeComponent( );

            Globals.Instance.LoadSettings();

            this.m_toMini   = (Storyboard)this.Resources["ToMini"];
            this.m_toNormal = (Storyboard)this.Resources["ToNormal"];

            this.m_formatOK   = (Brush)this.FindResource("BlackColorBrush");
            this.m_formatErr  = Brushes.Red;
            this.m_formatEdit = Brushes.Blue;

            this.ctlVersion.Text      = App.Version.ToString();
            this.ctlFormat.Foreground = this.m_formatOK;

            this.ctlElements.Visibility = Visibility.Collapsed;

            var g = !Globals.Instance.MiniMode;

            this.Width         = g ? 240 : 110;
            this.Height        = g ? 400 : 80;
            this.ShowMinButton = g;

            this.ctlTray.Visibility = Globals.Instance.TrayVisible ? Visibility.Visible : Visibility.Collapsed;
            if (Globals.Instance.TrayStart)
            {
                this.HideWindow();
            }

            this.m_wnc = new MainWindowWnc(this);
        }
Пример #2
0
        public MainWindow( )
        {
            RenderOptions.SetBitmapScalingMode(this, BitmapScalingMode.Fant);

            MainWindow.Instance = this;
            App.Current.MainWindow = this;
            
            InitializeComponent( );

            Globals.Instance.LoadSettings();

            this.m_toMini   = (Storyboard)this.Resources["ToMini"];
            this.m_toNormal = (Storyboard)this.Resources["ToNormal"];

            this.m_formatOK = (Brush)this.FindResource("BlackColorBrush");
            this.m_formatErr = Brushes.Red;
            this.m_formatEdit = Brushes.Blue;

            this.ctlVersion.Text = App.Version.ToString();
            this.ctlFormat.Foreground = this.m_formatOK;

            this.ctlElements.Visibility = Visibility.Collapsed;

            var g = !Globals.Instance.MiniMode;
            this.Width  = g ? 240 : 110;
            this.Height = g ? 400 : 80;
            this.ShowMinButton = g;

            this.ctlTray.Visibility = Globals.Instance.TrayVisible ? Visibility.Visible : Visibility.Collapsed;
            if (Globals.Instance.TrayStart)
                this.HideWindow();

            this.m_wnc = new MainWindowWnc(this);
        }