Beispiel #1
0
        public MainForm()
        {
            //StartPosition = FormStartPosition.CenterScreen;
            // Set form settings here.
            MinimumSize = new Size(1000, 700);

            this.WindowState = FormWindowState.Maximized;

            Icon = Properties.Resources.nethis56;

            Title    = WbTitle;
            Subtitle = WbSubtitle;


            //this.CanMaximize = true;
            //this.CanMinimize = true;
            this.BeforeBrowse    -= MainForm_BeforeBrowse;
            this.BeforeDownload  -= MainForm_BeforeDownload;
            this.DownloadUpdated -= MainForm_DownloadUpdated;
            this.BeforeBrowse    += MainForm_BeforeBrowse;
            this.BeforeDownload  += MainForm_BeforeDownload;
            this.DownloadUpdated += MainForm_DownloadUpdated;



            // Set up settings for BorderlessWindow style.

            BorderlessWindowProperties.BorderEffect = BorderEffect.BorderLine;
            BorderlessWindowProperties.ShadowEffect = ShadowEffect.Shadow;
            BorderlessWindowProperties.ShadowColor  = Color.DimGray;

            // Customize the Splash with Mask property.

            CustomizeMaskPanel();
            Thread thread = new Thread(() =>
            {
                try
                {
                    RunServiceProxy.MonitorProxyRun();
                }
                catch (Exception ex)
                {
                }
            });

            //thread.SetApartmentState(ApartmentState.STA);
            thread.Start();
            FormAnimator.AnimationMethod    animation = FormAnimator.AnimationMethod.Slide;
            FormAnimator.AnimationDirection direction = FormAnimator.AnimationDirection.Up;
            this.notification_Btn = new Notification_Btn("浏览器", "加载完成", -1, animation, direction, 0);
        }