private void ExitToolStripMenuItem_Click(object sender, EventArgs e)
 {
     client.Disconnect();
     Logger(DateTime.Now.ToString() + " Programm close" + Environment.NewLine);
     client.Dispose();
     ActiveForm.Dispose();
 }
Example #2
0
 private void button1_Click(object sender, EventArgs e)
 {
     Globals.latitute  = map.Position.Lat;
     Globals.longitude = map.Position.Lng;
     Globals.altitude  = alt;
     close             = false;
     ActiveForm.Dispose();
 }
Example #3
0
        private void btnActualizar_Click(object sender, EventArgs e)
        {
            ActiveForm.Dispose();
            frmCitas cargar = new frmCitas();

            cargar.Show();
            btnConfirmarCita.Enabled = false;
        }
Example #4
0
        private void button1_Click(object sender, EventArgs e)
        {
            maVar = textBox1.Text;
            ActiveForm.Dispose();
            CheckBoxEtRadioBoutons checkBoxEtRadioBoutons = new CheckBoxEtRadioBoutons();

            checkBoxEtRadioBoutons.Show();
        }
Example #5
0
 private void ButtonSelectSheet_Click(object sender, EventArgs e)
 {
     if (ListData.Text != "")
     {
         CurrentData = ListData.Text;
         ActiveForm.Close();
         ActiveForm.Dispose();
     }
     else
     {
         MessageBox.Show("Имя не должно быть пустым!");
     }
 }
        private void button1_Click(object sender, EventArgs e)
        {
            int a = 5;

            a = User.Check(tBuser.Text, tBpass.Text);
            if (a == 0 && (tBuser.Text != "" && tBpass.Text != ""))
            {
                User.CreateUser(tBuser.Text, tBpass.Text);
                ActiveForm.Hide();
                ActiveForm.Dispose();
                Form fLogin = new Login();
                fLogin.Show();
                fLogin.Location = this.Location;
                MessageBox.Show("Dodan novi user!");
            }
            else
            {
                MessageBox.Show("Korisnicko ime vec postoji ili pogresan unos!");
            }
        }
Example #7
0
        private void button1_Click(object sender, EventArgs e)
        {
            if (textBox1.Text == "")
            {
                textBox1.BackColor = Color.Red;
                return;
            }
            else
            {
                Globals.username = textBox1.Text;
            }
            if (textBox2.Text == "")
            {
                textBox2.BackColor = Color.Red;
                return;
            }
            else
            {
                Globals.password = textBox2.Text;
            }

            if (textBox3.Text == "")
            {
                textBox3.BackColor = Color.Red;
                return;
            }
            else
            {
                Globals.latitute = double.Parse(textBox3.Text.Replace(',', '.'), cords, System.Globalization.NumberFormatInfo.InvariantInfo);
            }

            if (textBox4.Text == "")
            {
                textBox4.BackColor = Color.Red;
                return;
            }
            else
            {
                Globals.longitude = double.Parse(textBox4.Text.Replace(',', '.'), cords, System.Globalization.NumberFormatInfo.InvariantInfo);
            }

            if (textBox5.Text == "")
            {
                textBox5.BackColor = Color.Red;
                return;
            }
            else
            {
                Globals.altitude = double.Parse(textBox5.Text.Replace(',', '.'), cords, System.Globalization.NumberFormatInfo.InvariantInfo);
            }

            if (textBox6.Text == "")
            {
                textBox6.BackColor = Color.Red;
                return;
            }
            else
            {
                Globals.speed = double.Parse(textBox6.Text.Replace(',', '.'), cords, System.Globalization.NumberFormatInfo.InvariantInfo);
            }

            if (textBox7.Text == "")
            {
                textBox7.BackColor = Color.Red;
                return;
            }
            else
            {
                Globals.radius = int.Parse(textBox7.Text);
            }

            if (textBox8.Text == "")
            {
                textBox8.BackColor = Color.Red;
                return;
            }
            else
            {
                Globals.duplicate = int.Parse(textBox8.Text);
            }

            if (textBox9.Text == "")
            {
                textBox9.BackColor = Color.Red;
                return;
            }
            else
            {
                Globals.maxCp = int.Parse(textBox9.Text);
            }

            Globals.transfer = checkBox2.Checked;
            Globals.defLoc   = checkBox1.Checked;
            Globals.evolve   = checkBox3.Checked;

            if (textBox10.Text == "")
            {
                textBox10.BackColor = Color.Red;
                return;
            }
            else
            {
                Globals.pokeball = int.Parse(textBox10.Text);
            }

            if (textBox11.Text == "")
            {
                textBox11.BackColor = Color.Red;
                return;
            }
            else
            {
                Globals.greatball = int.Parse(textBox11.Text);
            }

            if (textBox12.Text == "")
            {
                textBox12.BackColor = Color.Red;
                return;
            }
            else
            {
                Globals.ultraball = int.Parse(textBox12.Text);
            }

            if (textBox13.Text == "")
            {
                textBox13.BackColor = Color.Red;
                return;
            }
            else
            {
                Globals.revive = int.Parse(textBox13.Text);
            }

            if (textBox14.Text == "")
            {
                textBox14.BackColor = Color.Red;
                return;
            }
            else
            {
                Globals.potion = int.Parse(textBox14.Text);
            }

            if (textBox15.Text == "")
            {
                textBox15.BackColor = Color.Red;
                return;
            }
            else
            {
                Globals.superpotion = int.Parse(textBox15.Text);
            }

            if (textBox16.Text == "")
            {
                textBox16.BackColor = Color.Red;
                return;
            }
            else
            {
                Globals.hyperpotion = int.Parse(textBox16.Text);
            }

            if (textBox17.Text == "")
            {
                textBox17.BackColor = Color.Red;
                return;
            }
            else
            {
                Globals.berry = int.Parse(textBox17.Text);
            }

            if (textBox18.Text != "")
            {
                Globals.telAPI = textBox18.Text;
            }

            if (textBox19.Text != "")
            {
                Globals.telName = textBox19.Text;
            }

            if (textBox20.Text == "")
            {
                textBox20.BackColor = Color.Red;
                return;
            }
            else
            {
                Globals.telDelay = int.Parse(textBox20.Text);
            }

            if (textBox21.Text == "")
            {
                textBox21.BackColor = Color.Red;
            }
            else
            {
                Globals.toppotion = int.Parse(textBox21.Text);
            }

            if (textBox22.Text == "")
            {
                textBox22.BackColor = Color.Red;
            }
            else
            {
                Globals.masterball = int.Parse(textBox22.Text);
            }

            if (textBox23.Text == "")
            {
                textBox23.BackColor = Color.Red;
            }
            else
            {
                Globals.toprevive = int.Parse(textBox23.Text);
            }

            if (textBox24.Text == "")
            {
                textBox24.BackColor = Color.Red;
            }
            else
            {
                Globals.ivmaxpercent = int.Parse(textBox24.Text);
            }

            Globals.gerNames   = checkBox8.Checked;
            Globals.useincense = checkBox9.Checked;
            Globals.pokeList   = checkBox10.Checked;
            Globals.keepPokemonsThatCanEvolve = checkBox11.Checked;
            //Globals.pokevision = checkBox12.Checked;
            Globals.useLuckyEggIfNotRunning = checkBox12.Checked;

            foreach (string pokemon in checkedListBox1.CheckedItems)
            {
                if (checkBox8.Checked)
                {
                    Globals.noTransfer.Add((PokemonId)Enum.Parse(typeof(PokemonId), gerEng[pokemon]));
                }
                else
                {
                    Globals.noTransfer.Add((PokemonId)Enum.Parse(typeof(PokemonId), pokemon));
                }
            }
            foreach (string pokemon in checkedListBox2.CheckedItems)
            {
                if (checkBox8.Checked)
                {
                    Globals.noCatch.Add((PokemonId)Enum.Parse(typeof(PokemonId), gerEng[pokemon]));
                }
                else
                {
                    Globals.noCatch.Add((PokemonId)Enum.Parse(typeof(PokemonId), pokemon));
                }
            }
            foreach (string pokemon in checkedListBox3.CheckedItems)
            {
                if (checkBox8.Checked)
                {
                    Globals.doEvolve.Add((PokemonId)Enum.Parse(typeof(PokemonId), gerEng[pokemon]));
                }
                else
                {
                    Globals.doEvolve.Add((PokemonId)Enum.Parse(typeof(PokemonId), pokemon));
                }
            }

            string[] accFile =
            {
                Globals.acc.ToString(),
                Globals.username,
                Globals.password,
                Globals.latitute.ToString(),
                Globals.longitude.ToString(),
                Globals.altitude.ToString(),
                Globals.speed.ToString(),
                Globals.radius.ToString(),
                Globals.defLoc.ToString(),
                Globals.transfer.ToString(),
                Globals.duplicate.ToString(),
                Globals.evolve.ToString(),
                Globals.maxCp.ToString(),
                Globals.telAPI,
                Globals.telName,
                Globals.telDelay.ToString(),
                Globals.navigation_option.ToString(),
                Globals.useluckyegg.ToString(),
                Globals.gerNames.ToString(),
                Globals.useincense.ToString(),
                Globals.ivmaxpercent.ToString(),
                Globals.pokeList.ToString(),
                Globals.keepPokemonsThatCanEvolve.ToString(),
                Globals.useLuckyEggIfNotRunning.ToString()
            };
            System.IO.File.WriteAllLines(@Program.account, accFile);

            string[] itemsFile =
            {
                Globals.pokeball.ToString(),
                Globals.greatball.ToString(),
                Globals.ultraball.ToString(),
                Globals.revive.ToString(),
                Globals.potion.ToString(),
                Globals.superpotion.ToString(),
                Globals.hyperpotion.ToString(),
                Globals.berry.ToString(),
                Globals.masterball.ToString(),
                Globals.toppotion.ToString(),
                Globals.toprevive.ToString()
            };
            System.IO.File.WriteAllLines(@Program.items, itemsFile);

            string[] temp = new string[200];
            int      i    = 0;

            foreach (PokemonId pokemon in Globals.noTransfer)
            {
                if (checkBox8.Checked)
                {
                    temp.SetValue(StringUtils.getPokemonNameGer(pokemon), i);
                }
                else
                {
                    temp.SetValue(pokemon.ToString(), i);
                }
                i++;
            }
            string[] noTransFile = temp.Where(x => !String.IsNullOrEmpty(x)).ToArray();
            System.IO.File.WriteAllLines(Program.@keep, noTransFile);

            i = 0;
            Array.Clear(temp, 0, temp.Length);
            foreach (PokemonId pokemon in Globals.noCatch)
            {
                if (checkBox8.Checked)
                {
                    temp.SetValue(StringUtils.getPokemonNameGer(pokemon), i);
                }
                else
                {
                    temp.SetValue(pokemon.ToString(), i);
                }
                i++;
            }
            string[] noCatchFile = temp.Where(x => !String.IsNullOrEmpty(x)).ToArray();
            System.IO.File.WriteAllLines(@Program.ignore, noCatchFile);

            Array.Clear(temp, 0, temp.Length);
            i = 0;
            foreach (PokemonId pokemon in Globals.doEvolve)
            {
                if (checkBox8.Checked)
                {
                    temp.SetValue(StringUtils.getPokemonNameGer(pokemon), i);
                }
                else
                {
                    temp.SetValue(pokemon.ToString(), i);
                }
                i++;
            }
            string[] EvolveFile = temp.Where(x => !String.IsNullOrEmpty(x)).ToArray();
            File.WriteAllLines(@Program.evolve, EvolveFile);

            ActiveForm.Dispose();
        }
Example #8
0
 private void btnClose_Click(object sender, EventArgs e)
 {
     ActiveForm.Dispose();
 }
Example #9
0
 private void NC_StartScreen_FormClosed(object sender, FormClosedEventArgs e)
 {
     ActiveForm.Dispose();
 }
Example #10
0
 private void ENDbutton_Click(object sender, EventArgs e) => ActiveForm.Dispose();