Пример #1
0
        private async void SetInitialSettingsUi()
        {
            // Set NLogger

            NLogger.Setconfig();
            SayLog = LogManager.GetLogger("SPECTER:");

            // CHECK IF ITS THE FIRST TIME OPENING SPECTER

            if (UserGlobalConfiguration.MessageWelcome)
            {
                frmWelcome openGreetings = new frmWelcome();
                openGreetings.Show();
            }
            if (PokemonRaro.PokemonRaro.IsPaidUserver == 0)
            {
                cbIv100.Enabled = false;
            }

            //VERIFY THE LIMIT OF POKEMON BEFORE CONTINUE
            if (await PokemonRaro.PokemonRaro.VerificaLimitePokemon())
            {
                btnProcurarPokemon.Enabled = false;
                menuSnipe.Enabled          = false;
            }

            //--------------------------------------------
            //SET VALUES ON SCREEEN
            cbPokebola.SelectedIndex = 0;                                   // Select Pokeball
            lblVersionValue.Text     =
                string.Format($"{PokemonRaro.PokemonRaro.SpecterVersion}"); //Print Specter Version on screen

            lblApiValue.Text = PogoGlobalSettings.SpecterApiVersion;

            lblTotalCapturado.Text =
                string.Format(
                    $"{PokemonRaro.PokemonRaro.PokemonCaught} Total | {PokemonRaro.PokemonRaro.PokemonMax} Max");
            lblEscapadoValue.Text =
                string.Format($"{PokemonRaro.PokemonRaro.PokemonFlee}");

            UpdateLastPokemonCaught(true);

            // ---------------------------------------------
            // LOAD INFORMATION FROM .JSON

            txtPogoUsername.Text = UserGlobalConfiguration.Username;
            txtPogoPassword.Text = UserGlobalConfiguration.Password;
            if (UserGlobalConfiguration.TypeAcc.ToString().ToUpper() == "PTC")
            {
                rbPTC.Checked = true;
            }
            else
            {
                rbGoogle.Checked = true;
            }


            //----------------------------------------------

            //PRINT THE MESSAGE FROM THE SERVER
            await PokemonRaro.PokemonRaro.GetStartMessagesFromTheServer(1);

            //----------------------------------------------

            // Check if the gameversion its updated.
            CheckGameVersion();

            // Works with auto complete textbox
            AutoCompleteStringCollection collectionNamesPokemon = new AutoCompleteStringCollection();

            collectionNamesPokemon.AddRange(PokemonNames);
            txtProcuraPoke.AutoCompleteCustomSource = collectionNamesPokemon;

            FrmCapturaManual.ThresholdReached += FrmCapturaManual_ThresholdReached;
        }