Пример #1
0
        public void InitializeComponent2()
        {
            this.webBrowser1.Url = new System.Uri(GuiController.UPDATENOTES, System.UriKind.Absolute);

            this.backgroundWorkerScan = new BackgroundWorker();
               		this.backgroundWorkerScan.WorkerReportsProgress = true;
            this.backgroundWorkerScan.WorkerSupportsCancellation = true;
            this.backgroundWorkerScan.DoWork += new System.ComponentModel.DoWorkEventHandler(this.backgroundWorkerScan_DoWork);
            //this.backgroundWorkerScan.ProgressChanged += new System.ComponentModel.ProgressChangedEventHandler(this.backgroundWorkerScan_ProgressChanged);
            //FIXME
            this.backgroundWorkerScan.ProgressChanged += new System.ComponentModel.ProgressChangedEventHandler(this.backgroundWorker2_ProgressChanged);
            this.backgroundWorkerScan.RunWorkerCompleted += new System.ComponentModel.RunWorkerCompletedEventHandler(this.backgroundWorkerScan_RunWorkerCompleted);

            this.backgroundWorkerScanManual = new BackgroundWorker();
               		this.backgroundWorkerScanManual.WorkerReportsProgress = true;
            this.backgroundWorkerScanManual.WorkerSupportsCancellation = true;
            this.backgroundWorkerScanManual.DoWork += new System.ComponentModel.DoWorkEventHandler(this.backgroundWorkerScanManual_DoWork);
            //this.backgroundWorkerScanManual.ProgressChanged += new System.ComponentModel.ProgressChangedEventHandler(this.backgroundWorkerScanManual_ProgressChanged);
            //FIXME
            this.backgroundWorkerScanManual.ProgressChanged += new System.ComponentModel.ProgressChangedEventHandler(this.backgroundWorker2_ProgressChanged);
            this.backgroundWorkerScanManual.RunWorkerCompleted += new System.ComponentModel.RunWorkerCompletedEventHandler(this.backgroundWorkerScanManual_RunWorkerCompleted);

               		this.backgroundWorkerUpdate = new BackgroundWorker();
               		this.backgroundWorkerUpdate.WorkerReportsProgress = true;
            this.backgroundWorkerUpdate.WorkerSupportsCancellation = true;
            this.backgroundWorkerUpdate.DoWork += new System.ComponentModel.DoWorkEventHandler(this.backgroundWorkerUpdate_DoWork);
            //this.backgroundWorkerUpdate.ProgressChanged += new System.ComponentModel.ProgressChangedEventHandler(this.backgroundWorkerUpdate_ProgressChanged);
            //FIXME
            this.backgroundWorkerUpdate.ProgressChanged += new System.ComponentModel.ProgressChangedEventHandler(this.backgroundWorker2_ProgressChanged);
            this.backgroundWorkerUpdate.RunWorkerCompleted += new System.ComponentModel.RunWorkerCompletedEventHandler(this.backgroundWorkerUpdate_RunWorkerCompleted);

            // modify existing components from designer

            this.Region = System.Drawing.Region.FromHrgn(GuiController.CreateRoundRectRgn( 0, 0, Width, Height, 24, 24));
            this.Icon= Controller.GetAppIcon();
            this.BackgroundImage = Controller.GetResourceImage("Background_Launcher");

            MinimizeButton = Controller.SpawnMinimizeButton(new Point(535, 20));
            CloseButton = Controller.SpawnCloseButton(new Point(562, 8));

            MinimizeButton.Click += MinimizeClick;
            CloseButton.Click += CloseClick;

            this.Controls.Add(MinimizeButton);
            this.Controls.Add(CloseButton);

            //add new components

            launcherProgressBar1 = Controller.SpawnProgressBar(new System.Drawing.Point(23, 452), new System.Drawing.Size(441, 17));
            this.Controls.Add(launcherProgressBar1);

            AcctButton = Controller.SpawnStandardButton("My Account", new Point(10, 365	));
            OptButton = Controller.SpawnStandardButton("Game options", new Point(126, 365 ));
            ScanButton = Controller.SpawnStandardButton("Scan", new Point(242, 365 ));
            LOptButton = Controller.SpawnStandardButton("Launcher options", new Point(358, 365));
            DonateButton = Controller.SpawnStandardButton("Donate", new Point(474, 365));

            PlayButton = Controller.SpawnPlayButton("Play", new Point(484,434));

            AcctButton.Click += acct_Click_1;
            OptButton.Click += options_Click_1;
            ScanButton.Click += Scan_Click;
            LOptButton.Click += button2_Click;
            DonateButton.Click += Donate_Click;
            PlayButton.Click += PLAY_Click_1;

            this.Controls.Add(AcctButton);
            this.Controls.Add(OptButton);
            this.Controls.Add(ScanButton);
            this.Controls.Add(LOptButton);
            this.Controls.Add(DonateButton);
            this.Controls.Add(PlayButton);

            label1 = Controller.SpawnLabel("", new Point(23, 415), new Size(260, 15));
            this.Controls.Add(label1);

            labelError = Controller.SpawnLabel("", new Point(23, 430), new Size(260, 15));
            this.Controls.Add(labelError);
        }
Пример #2
0
        private void InitializeComponent2()
        {
            this.Region = System.Drawing.Region.FromHrgn(GuiController.CreateRoundRectRgn( 0, 0, Width, Height, 24, 24));
            this.Icon= Controller.GetAppIcon();
            this.BackgroundImage = Controller.GetResourceImage("Background_Options");

            MinimizeButton = Controller.SpawnMinimizeButton(new Point(502, 20));
            CloseButton = Controller.SpawnCloseButton(new Point(526, 8));
            MinimizeButton.Click += MinimizeClick;
            CloseButton.Click += CloseClick;
            this.Controls.Add(MinimizeButton);
            this.Controls.Add(CloseButton);

            SupportButton = Controller.SpawnStandardButton("Support", new Point(125, 58));
            SupportButton.Click += Support_Click;
            this.Controls.Add(SupportButton);

            TrefixButton = Controller.SpawnStandardButton("Run Trefix.exe", new Point(300, 58));
            TrefixButton.Click += button2_Click;
            TrefixButton.Disable = true;
            this.Controls.Add(TrefixButton);

            AboutButton = Controller.SpawnStandardButton("About", new Point(125, 115));
            AboutButton.Click += About_Click;
            this.Controls.Add(AboutButton);

            NetworkButton = Controller.SpawnStandardButton("Network Diag", new Point(300, 115));
            NetworkButton.Click += Network_Click;
            this.Controls.Add(NetworkButton);

            AdminButton = Controller.SpawnStandardButton("Admin Settings", new Point(125, 172));
            AdminButton.Click += Admin_Click;
            AdminButton.Disable = true;
            this.Controls.Add(AdminButton);

            SwgDirButton = Controller.SpawnStandardButton("open PSWGDir", new Point(300, 172));
            SwgDirButton.Click += SwgDir_Click;
            this.Controls.Add(SwgDirButton);

            RefreshButtonState();
        }
Пример #3
0
        public LauncherButton SpawnMinimizeButton(Point p)
        {
            LauncherButton lb = new LauncherButton();
            if (p != null) { lb.Location = p; }

            lb.BackColor = System.Drawing.Color.Transparent;

            lb.ImageClick = GetResource2Image("MinimizeClick");
            lb.ImageHover = GetResource2Image("MinimizeHighlighted");
            lb.ImageNormal = GetResource2Image("MinimizeNormal");
            lb.ImageDisable = GetResource2Image("MinimizeNormal");

            lb.Size = new Size(27, 20);

            return lb;
        }
Пример #4
0
        private void InitializeComponent2()
        {
            this.Region = System.Drawing.Region.FromHrgn(GuiController.CreateRoundRectRgn( 0, 0, Width, Height, 24, 24));
            this.Icon= Controller.GetAppIcon();
            this.BackgroundImage = Controller.GetResourceImage("Background_DirSearch");

            MinimizeButton = Controller.SpawnMinimizeButton(new Point(this.Width - 60, 20));
            CloseButton = Controller.SpawnCloseButton(new Point(this.Width - 40, 8));
            MinimizeButton.Click += MinimizeClick;
            CloseButton.Click += CloseClick;
            this.Controls.Add(MinimizeButton);
            this.Controls.Add(CloseButton);

            DirButton = Controller.SpawnStandardButton("Browse", new Point(128, 305	));
            NextButton = Controller.SpawnStandardButton("Next", new Point(251, 355 ));
            NextButton.Enabled = false;

            DirButton.Click += BrowseButton_Click;
            NextButton.Click += NextButton1_Click;

            this.Controls.Add(DirButton);
            this.Controls.Add(NextButton);
        }
Пример #5
0
        public LauncherButton SpawnBaseButton(String text, Point p)
        {
            LauncherButton lb = new LauncherButton();

            if (text != null) { lb.Text = text; }
            if (p != null) { lb.Location = p; }

            lb.BackColor = System.Drawing.Color.Transparent;
            //lb.BackColor = Color.FromArgb(0, 255, 255, 255);

            //lb.TextColorNormal = System.Drawing.ColorTranslator.FromHtml("#ffa838");

            lb.TextColorNormal = System.Drawing.ColorTranslator.FromHtml("#fffba7");
            lb.TextColorClick = System.Drawing.ColorTranslator.FromHtml("#ffea3b");
            lb.TextColorHover = System.Drawing.ColorTranslator.FromHtml("#ffea3b");
            lb.TextColorDisable = System.Drawing.ColorTranslator.FromHtml("#72502e");

            if (HasFont) {
                lb.Font = new Font(pfc.Families[0], 22);
            }

            return lb;
        }