Example #1
0
        //Timers para animacion
        private void Timer1_Tick(object sender, EventArgs e)
        {
            circularProgressBar1.Value  += 1;
            circularProgressBar1.Text    = circularProgressBar1.Value.ToString();
            circularProgressBar1.Minimum = 0;
            circularProgressBar1.Maximum = 100;
            if (circularProgressBar1.Value == 100)
            {
                timer1.Stop();
                circularProgressBar1.Value = 0;
                circularProgressBar1.Text  = circularProgressBar1.Value.ToString();
                PictureBox1.Show();
                circularProgressBar1.Hide();
                Button13.Show();
                Button6.Hide();
                Button4.Hide();

                OpenFileDialog buscar = new OpenFileDialog
                {
                    InitialDirectory = @"C:\Program Files\Game_Booster\Juegos",
                    Title            = "Game Booster",

                    CheckFileExists = true,
                    CheckPathExists = true,

                    DefaultExt  = "url",
                    Filter      = "Ver mas juegos (*.url)|*.url|Todos los juegos (*.lnk)|*.lnk",
                    FilterIndex = 1,
                };

                if (buscar.ShowDialog() == DialogResult.OK)
                {
                    Process.Start(buscar.FileName);
                    Process          process   = new Process();
                    ProcessStartInfo startInfo = new ProcessStartInfo
                    {
                        WindowStyle = ProcessWindowStyle.Hidden,
                        FileName    = "cmd.exe",
                        Arguments   = @"/C timeout /t 3 /nobreak & TASKKILL /IM explorer.exe /F & exit"
                    };
                    process.StartInfo = startInfo;
                    process.Start();
                }
            }
        }
Example #2
0
        private void checkUnit()
        {
            PictureBox1.Hide();
            var fBold   = new Font("Segoe UI", 11f, FontStyle.Bold);
            var fNormal = new Font("Segoe UI", 11f, FontStyle.Regular);

            if (dontAsnRadioButton.Checked)
            {
                dontAsnLabel.Font       = fBold;
                chageUnitCustLabel.Font = fNormal;
                warningLabel.Text       = "";
                openFormLinkLabel.Text  = "";
                saveButton.Enabled      = true;
            }
            else if (changeUnitCustRadioButton.Checked)
            {
                dontAsnLabel.Font       = fNormal;
                chageUnitCustLabel.Font = fBold;
                if (MdlBookingManagement.isAssignedToOthersMBs(_muID))
                {
                    PictureBox1.Show();
                    warningLabel.Text      = "This unit is already assigned to another booking so the customer can not be changed. Please " + "create a Mini Unit with the desired customer.";
                    openFormLinkLabel.Text = "Edit Unit Source";
                    PictureBox1.Image      = My.Resources.Resources.icon_not_available;
                    saveButton.Enabled     = false;
                }
                else
                {
                    PictureBox1.Show();
                    warningLabel.Text      = "Able to change Customer Name";
                    openFormLinkLabel.Text = "";
                    PictureBox1.Image      = My.Resources.Resources.icon_available;
                    saveButton.Enabled     = true;
                }
            }
        }