Example #1
0
        private void gbaCartTypeBox_SelectedIndexChanged(object sender, EventArgs e)
        {
            if (gbaCartTypeBox.Text == "Flash Cart")
            {
                gbaflashchiplabel.Visible = true;
                gbaflashchipbox.Visible   = true;
                gbaflashpcblabel.Visible  = true;
                gbaflashpcbbox.Visible    = true;

                // Default
                gbaflashchipbox.Text = "MSP55LV128";
                gbaromsizebox.Text   = "16 MByte";
                memorytypebox.Text   = "SRAM";
                gbaramsizebox.Text   = "512Kbit";

                TopMostMessageBox.Show("We recommend you use the dedicated Flasher software instead of the GUI as the GUI is more likely to stall and it's quicker to use too.", "GBxCart RW Dedicated Flasher", MessageBoxButtons.OK);
            }
            else
            {
                gbaflashchiplabel.Visible = false;
                gbaflashchipbox.Visible   = false;
                gbaflashpcblabel.Visible  = false;
                gbaflashpcbbox.Visible    = false;
            }
        }
Example #2
0
        private void cartTypeBox_SelectedIndexChanged(object sender, EventArgs e)
        {
            if (cartTypeBox.Text == "Flash Cart")
            {
                gbflashchiplabel.Visible = true;
                gbflashchipbox.Visible   = true;
                gbflashpcblabel.Visible  = true;
                gbflashpcbbox.Visible    = true;
                gbflashwelabel.Visible   = true;
                gbflashwebox.Visible     = true;

                // Default
                gbflashchipbox.Text = "iG 32KB Cart";
                romsizebox.Text     = "32KByte (no ROM banking)";
                ramsizebox.Text     = "None";
                gbflashpcbbox.Text  = "N/A";
                gbflashwebox.Text   = "Audio";

                TopMostMessageBox.Show("We recommend you use the dedicated Flasher software instead of the GUI as the GUI is more likely to stall and it's quicker to use too.", "GBxCart RW Dedicated Flasher", MessageBoxButtons.OK);
            }
            else
            {
                gbflashchiplabel.Visible = false;
                gbflashchipbox.Visible   = false;
                gbflashpcblabel.Visible  = false;
                gbflashpcbbox.Visible    = false;
                gbflashwelabel.Visible   = false;
                gbflashwebox.Visible     = false;
            }
        }
Example #3
0
        // Progress bar
        void backgroundWorker1_DoWork(object sender, DoWorkEventArgs e)
        {
            while (true)
            {
                double progress_percent = progress;

                if (progress_percent >= 100)
                {
                    progress_percent = 100;
                }

                backgroundWorker1.ReportProgress(Convert.ToInt32(progress_percent));
                System.Threading.Thread.Sleep(100);
                //Console.WriteLine(progress);

                // Check if progress has stalled after 30 seconds
                if (commandReceived != 0 && comConnected == true)
                {
                    if (progressPreviousCounter >= 300)
                    {
                        if (progress != progressPrevious)
                        {
                            progressPrevious        = progress;
                            progressPreviousCounter = 0;
                        }
                        else if (progressStalled == 0)
                        {
                            statuslabel.Invoke((MethodInvoker)(() => {
                                statuslabel.Text = statuslabel.Text + " Stalled";
                            }));
                            progressStalled = 1;

                            if (formMinimised == true)
                            {
                                notifyIcon1.BalloonTipIcon  = ToolTipIcon.Info;
                                notifyIcon1.BalloonTipText  = "Stalled";
                                notifyIcon1.BalloonTipTitle = "GBxCart RW";
                                notifyIcon1.ShowBalloonTip(4000);
                            }
                            //Functions.MessageBoxHelper.PrepToCenterMessageBoxOnForm(this);
                            //TopMost = true;
                            //System.Windows.Forms.MessageBox.Show("Progress has stalled. Please unplug GBxCart RW, re-seat your game cartridge and try again.");

                            TopMostMessageBox.Show("Progress has stalled. Please unplug GBxCart RW, re-seat your game cartridge and try again. This program will close when you press Ok.", "GBxCart RW Stalled", MessageBoxButtons.OK);
                            //MessageBox.Show("Progress has stalled. Please unplug GBxCart RW, re-seat your game cartridge and try again.", "GBxCart RW Stalled", MessageBoxButtons.OK, MessageBoxIcon.None,
                            // MessageBoxDefaultButton.Button1, (MessageBoxOptions)0x40000);  // MB_TOPMOST
                            Application.Exit();
                        }
                    }
                    progressPreviousCounter++;
                }
                else
                {
                    progressPrevious        = 0;
                    progressPreviousCounter = 0;
                    progressStalled         = 0;
                }
            }
        }