void infoObservable_HandleNewPokemonLocation(MapPokemon mapPokemon) { Invoke(new MethodInvoker(() => { if (!_pokemonMarks.ContainsKey(mapPokemon.SpawnPointId)) { GMarkerGoogle pokemonMarker; Bitmap pokebitMap = PokeImgManager.GetPokemonMediumImage(mapPokemon.PokemonId); if (pokebitMap != null) { var ImageSize = new System.Drawing.Size(pokebitMap.Width, pokebitMap.Height); pokemonMarker = new GMarkerGoogle(new PointLatLng(mapPokemon.Latitude, mapPokemon.Longitude), pokebitMap) { Offset = new System.Drawing.Point(-ImageSize.Width / 2, -ImageSize.Height / 2) }; } else { pokemonMarker = new GMarkerGoogle(new PointLatLng(mapPokemon.Latitude, mapPokemon.Longitude), GMarkerGoogleType.green_small); } var expriationTime = StringUtils.TimeMStoString(mapPokemon.ExpirationTimestampMs, "mm:ss"); Logger.Debug("nExpires in: " + expriationTime); var address = LocationUtils.FindAddress(mapPokemon.Latitude, mapPokemon.Longitude); pokemonMarker.ToolTipText = th.TS("{0}\nExpires in: {1}\n{2}\n{3},{4}", new object[] { mapPokemon.PokemonId, expriationTime, address, mapPokemon.Latitude, mapPokemon.Longitude }); pokemonMarker.ToolTip.Font = new Font("Arial", 12, GraphicsUnit.Pixel); pokemonMarker.ToolTipMode = MarkerTooltipMode.OnMouseOver; _pokemonMarks.Add(mapPokemon.SpawnPointId, pokemonMarker); _pokemonOverlay.Markers.Add(pokemonMarker); } })); }
public void Execute() { SnipePokemonPokeCom.Checked = GlobalVars.SnipePokemon; AvoidRegionLock.Checked = GlobalVars.AvoidRegionLock; var pokemonControlSource = new System.Collections.Generic.List <PokemonId>(); var ie = 1; // seeing line 114 of GUI, must be same value foreach (PokemonId pokemon in Enum.GetValues(typeof(PokemonId))) { if (pokemon.ToString() != "Missingno") { pokeIDS[pokemon.ToString()] = ie; checkedListBox_NotToSnipe.Items.Add(th.TS(pokemon.ToString())); ie++; pokemonControlSource.Add(pokemon); } } comboBox1.DataSource = pokemonControlSource; foreach (PokemonId Id in GlobalVars.NotToSnipe) { string _id = Id.ToString(); try { checkedListBox_NotToSnipe.SetItemChecked(pokeIDS[_id] - 1, true); } catch (Exception e) { Logger.ExceptionInfo(string.Format("Error loading checkedListBox_NotToSnipe id:{0}, pokeIDS[id]:{1}\n{2}", _id, pokeIDS[_id], e)); } } }
public ChangesPanel() { InitializeComponent(); comboLanguage.SelectedIndex = 0; switch (th.GetSelectedLanguage()) { case "default": comboLanguage.SelectedIndex = 1; break; case "de": comboLanguage.SelectedIndex = 2; break; case "es": comboLanguage.SelectedIndex = 3; break; case "ca": comboLanguage.SelectedIndex = 4; break; case "zh": comboLanguage.SelectedIndex = 5; break; } th.Translate(this); comboBoxAttackers.DataSource = new[] { th.TS("Random"), th.TS("Best CP"), th.TS("Favourites"), th.TS("Lower than defenders CP") }; comboBoxAttackers.SelectedIndex = 0; }
public void RefreshTitle() { var txt = th.TS("Eggs"); if (Parent != null) { txt += ": " + listView.Items.Count; } Parent.Text = txt; }
void buttonUpdateClick(object sender, EventArgs e) { var botSettings = GlobalVars.GetSettings(); var ConfigsPath = Path.Combine(AppDomain.CurrentDomain.BaseDirectory, "Configs"); var filenameProf = Path.Combine(ConfigsPath, GlobalVars.ProfileName + ".json"); botSettings.SaveToFile(filenameProf); MessageBox.Show(th.TS("Current Configuration Saved as - ") + GlobalVars.ProfileName); }
void IntializeCombos() { LoadLinks(); comboBoxLinks.DataSource = links; comboBoxLinks.DisplayMember = "Text"; comboBoxLinks.SelectedIndex = 0; var pokemonControlSource = new List <PokemonId>(); checkedListBox_ToSnipe.Items.Clear(); foreach (PokemonId pokemon in Enum.GetValues(typeof(PokemonId))) { if (pokemon.ToString() != "Missingno") { pokemonControlSource.Add(pokemon); checkedListBox_ToSnipe.Items.Add(th.TS(pokemon.ToString())); } } comboBox1.DataSource = pokemonControlSource; }
void ButtonOkClick(object sender, EventArgs e) { if (listView.SelectedItems.Count < 1) { MessageBox.Show(th.TS("Please Select an incubator.")); } else { selected = (EggIncubator)listView.SelectedItems[0].Tag; DialogResult = DialogResult.OK; this.Close(); } }
private void InitialzePokemonListView() { PokemonListView.Columns.Clear(); ColumnHeader columnheader; columnheader = new ColumnHeader(); columnheader.Name = th.TS("Name"); columnheader.Text = columnheader.Name; PokemonListView.Columns.Add(columnheader); columnheader = new ColumnHeader(); columnheader.Name = th.TS("CP"); columnheader.Text = columnheader.Name; PokemonListView.Columns.Add(columnheader); columnheader = new ColumnHeader(); columnheader.Name = th.TS("IV A-D-S"); columnheader.Text = columnheader.Name; PokemonListView.Columns.Add(columnheader); columnheader = new ColumnHeader(); columnheader.Name = th.TS("LVL"); columnheader.Text = columnheader.Name; PokemonListView.Columns.Add(columnheader); columnheader = new ColumnHeader(); columnheader.Name = th.TS("Evolvable?"); columnheader.Text = columnheader.Name; PokemonListView.Columns.Add(columnheader); columnheader = new ColumnHeader(); columnheader.Name = th.TS("Height"); columnheader.Text = columnheader.Name; PokemonListView.Columns.Add(columnheader); columnheader = new ColumnHeader(); columnheader.Name = th.TS("Weight"); columnheader.Text = columnheader.Name; PokemonListView.Columns.Add(columnheader); columnheader = new ColumnHeader(); columnheader.Name = th.TS("HP"); columnheader.Text = columnheader.Name; PokemonListView.Columns.Add(columnheader); columnheader = new ColumnHeader(); columnheader.Name = th.TS("Attack"); columnheader.Text = columnheader.Name; PokemonListView.Columns.Add(columnheader); columnheader = new ColumnHeader(); columnheader.Name = th.TS("SpecialAttack (DPS)"); columnheader.Text = columnheader.Name; PokemonListView.Columns.Add(columnheader); columnheader = new ColumnHeader(); columnheader.Name = "#"; columnheader.Text = columnheader.Name; PokemonListView.Columns.Add(columnheader); columnheader = new ColumnHeader(); columnheader.Name = th.TS("% CP"); columnheader.Text = columnheader.Name; PokemonListView.Columns.Add(columnheader); columnheader = new ColumnHeader(); columnheader.Name = th.TS("Type"); columnheader.Text = columnheader.Name; PokemonListView.Columns.Add(columnheader); columnheader = new ColumnHeader(); columnheader.Name = th.TS("Type 2"); columnheader.Text = columnheader.Name; PokemonListView.Columns.Add(columnheader); PokemonListView.Columns.Add(CreateColumn(th.TS("Catch Date"))); PokemonListView.Columns.Add(CreateColumn(th.TS("Pokeball"))); PokemonListView.Columns.Add(CreateColumn(th.TS("Num Upgrades"))); PokemonListView.Columns.Add(CreateColumn(th.TS("Battles Attacked"))); PokemonListView.Columns.Add(CreateColumn(th.TS("Battles Defended"))); PokemonListView.Columns.Add(CreateColumn(th.TS("In Gym"))); PokemonListView.Columns.Add(CreateColumn(th.TS("Capture Place"))); PokemonListView.Columns["#"].DisplayIndex = 0; PokemonListView.ColumnClick += new ColumnClickEventHandler(PokemonListView_ColumnClick); PokemonListView.ShowItemToolTips = true; PokemonListView.DoubleBuffered(true); PokemonListView.View = View.Details; createImageList(); }
private string GetPokemonName(PokemonId pokemonID) { return(th.TS(pokemonID.ToString())); }
public ItemsPanel() { // // The InitializeComponent() call is required for Windows Forms designer support. // InitializeComponent(); th.Translate(this); this.chID.Text = th.TS("#"); this.chItem.Text = th.TS("Item"); this.chCount.Text = th.TS("Count"); this.chUnseen.Text = th.TS("Unseen"); }
private void InitializeData() { this.listView.Items.AddRange(new [] { new ListViewItem(new string[] { "1", th.TS("Username"), "" }), new ListViewItem(new string[] { "2", th.TS("Coins"), "" }), new ListViewItem(new string[] { "3", th.TS("Stardust"), "" }), new ListViewItem(new string[] { "4", th.TS("Max Items"), "" }), new ListViewItem(new string[] { "5", th.TS("Max Pokemons"), "" }), new ListViewItem(new string[] { "6", th.TS("Battle Lockout End (Ms)"), "" }), new ListViewItem(new string[] { "7", th.TS("Level"), "" }), new ListViewItem(new string[] { "8", th.TS("Pokedex"), "" }), new ListViewItem(new string[] { "9", th.TS("Kms Walked"), "" }), new ListViewItem(new string[] { "10", th.TS("Eggs Hatched"), "" }), new ListViewItem(new string[] { "11", th.TS("Evolutions"), "" }), new ListViewItem(new string[] { "12", th.TS("PokeStop Visits"), "" }), new ListViewItem(new string[] { "13", th.TS("Pokeballs Thrown"), "" }), new ListViewItem(new string[] { "14", th.TS("Battle Attack"), "" }), new ListViewItem(new string[] { "15", th.TS("Battle Defended"), "" }), new ListViewItem(new string[] { "16", th.TS("Battle Training"), "" }), new ListViewItem(new string[] { "17", th.TS("Pokemon Deployed"), "" }), new ListViewItem(new string[] { "18", th.TS("Pokemons Captured"), "" }), new ListViewItem(new string[] { "19", th.TS("Pokemons Encountered"), "" }), new ListViewItem(new string[] { "20", th.TS("Prestige Dropped"), "" }), new ListViewItem(new string[] { "21", th.TS("Prestige Raised"), "" }), new ListViewItem(new string[] { "22", th.TS("Small Rattata Caught"), "" }), new ListViewItem(new string[] { "23", th.TS("Big Magikarp Caught"), "" }), new ListViewItem(new string[] { "24", th.TS("Used Km Pool"), "" }) }); }
private string getItemName(ItemId itemID) { switch (itemID) { case ItemId.ItemPotion: return(th.TS("Potion")); case ItemId.ItemSuperPotion: return(th.TS("Super Potion")); case ItemId.ItemHyperPotion: return(th.TS("Hyper Potion")); case ItemId.ItemMaxPotion: return(th.TS("Max Potion")); case ItemId.ItemRevive: return(th.TS("Revive")); case ItemId.ItemIncenseOrdinary: return(th.TS("Incense")); case ItemId.ItemPokeBall: return(th.TS("Poke Ball")); case ItemId.ItemGreatBall: return(th.TS("Great Ball")); case ItemId.ItemUltraBall: return(th.TS("Ultra Ball")); case ItemId.ItemRazzBerry: return(th.TS("Razz Berry")); case ItemId.ItemIncubatorBasic: return(th.TS("Egg Incubator")); case ItemId.ItemIncubatorBasicUnlimited: return(th.TS("Unlimited Egg Incubator")); default: return(itemID.ToString().Replace("Item", "")); } }