Skip to content

Commit

Permalink
Added Pokemon tab
Browse files Browse the repository at this point in the history
  • Loading branch information
jurannus committed Aug 9, 2016
1 parent 7cdc3c4 commit e39c939
Show file tree
Hide file tree
Showing 3 changed files with 252 additions and 30 deletions.
68 changes: 67 additions & 1 deletion PoGo.NecroBot.ConfigUI/MainWindow.xaml
Original file line number Diff line number Diff line change
Expand Up @@ -248,7 +248,73 @@

<TabItem Header="Pokemon">
<ScrollViewer HorizontalScrollBarVisibility="Hidden" VerticalScrollBarVisibility="Visible">
<StackPanel></StackPanel>
<StackPanel>
<StackPanel Orientation="Horizontal" Style="{StaticResource LineItemPanel}">
<CheckBox Content="Rename Pokemon" IsChecked="{Binding Settings.RenamePokemon}" ToolTip="Check this box to enable automatic renaming of your Pokemon." />
</StackPanel>
<StackPanel Visibility="{Binding Settings.RenamePokemon, Converter={StaticResource VisConv}}">
<StackPanel Orientation="Horizontal" Style="{StaticResource LineItemPanel}">
<CheckBox Content="Rename only above IV" IsChecked="{Binding Settings.RenameOnlyAboveIv}" ToolTip="QED." />
</StackPanel>
<StackPanel Orientation="Horizontal" Style="{StaticResource LineItemPanel}">
<Label Style="{StaticResource LineItemLabel}" Content="Rename Template" ToolTip="A template for how your Pokemon will be renamed. Tokens: {0} is the Pokemon Species, {1} is the IV%" />
<TextBox Style="{StaticResource LineItemTextBoxMd}" Text="{Binding Settings.RenameTemplate}" />
</StackPanel>
</StackPanel>
<StackPanel Orientation="Horizontal" Style="{StaticResource LineItemPanel}">
<CheckBox Content="Automatically Upgrade Pokemon" IsChecked="{Binding Settings.AutomaticallyLevelUpPokemon}" ToolTip="Check this box to have the bot automatically apply upgrades using candies and stardust." />
</StackPanel>
<StackPanel Visibility="{Binding Settings.AutomaticallyLevelUpPokemon, Converter={StaticResource VisConv}}">
<StackPanel Orientation="Horizontal" Style="{StaticResource LineItemPanel}">
<Label Style="{StaticResource LineItemLabel}" Content="Amount Of Times To Upgrade Loop" ToolTip="QED." />
<TextBox Style="{StaticResource LineItemTextBoxSm}" Text="{Binding Settings.AmountOfTimesToUpgradeLoop}" />
</StackPanel>
<StackPanel Orientation="Horizontal" Style="{StaticResource LineItemPanel}">
<Label Style="{StaticResource LineItemLabel}" Content="Minimum Stardust Reserve for Upgrade" ToolTip="If you have less stardust than this, upgrades will not be performed." />
<TextBox Style="{StaticResource LineItemTextBoxMd}" Text="{Binding Settings.GetMinStarDustForLevelUp}" />
</StackPanel>
<StackPanel Orientation="Horizontal" Style="{StaticResource LineItemPanel}">
<Label Style="{StaticResource LineItemLabel}" Content="Upgrade by CP or IV" ToolTip="Should the CP or IV of Pokemon be used as the upgrade priority?" />
<ComboBox ItemsSource="{Binding IpCvCollection}" SelectedItem="{Binding Settings.LevelUpByCPorIv}" />
</StackPanel>
<StackPanel Orientation="Horizontal" Style="{StaticResource LineItemPanel}">
<Label Style="{StaticResource LineItemLabel}" Content="Upgrade Pokemon Above CP" ToolTip="QED." />
<TextBox Style="{StaticResource LineItemTextBoxMd}" Text="{Binding Settings.UpgradePokemonCpMinimum}" />
</StackPanel>
<StackPanel Orientation="Horizontal" Style="{StaticResource LineItemPanel}">
<Label Style="{StaticResource LineItemLabel}" Content="Upgrade Pokemon Above IV" ToolTip="QED." />
<TextBox Style="{StaticResource LineItemTextBoxMd}" Text="{Binding Settings.UpgradePokemonIvMinimum}" />
</StackPanel>
<StackPanel Orientation="Horizontal" Style="{StaticResource LineItemPanel}">
<Label Style="{StaticResource LineItemLabel}" Content="Upgrade Stats Operator" ToolTip="AND means the Pokemon must meet both IP and CV requirements - OR means either." />
<ComboBox ItemsSource="{Binding OperatorsCollection}" SelectedItem="{Binding Settings.UpgradePokemonMinimumStatsOperator}" />
</StackPanel>
</StackPanel>
<StackPanel Orientation="Horizontal" Style="{StaticResource LineItemPanel}">
<CheckBox Content="Evolve All Pokemon Above IV" IsChecked="{Binding Settings.EvolveAllPokemonAboveIv}" ToolTip="QED." />
</StackPanel>
<StackPanel Orientation="Horizontal" Style="{StaticResource LineItemPanel}" Visibility="{Binding Settings.EvolveAllPokemonAboveIv, Converter={StaticResource VisConv}}">
<Label Style="{StaticResource LineItemLabel}" Content="Evolve Above IV%" ToolTip="Decimals allowed." />
<TextBox Style="{StaticResource LineItemTextBoxSm}" Text="{Binding Settings.EvolveAboveIvValue}" />
</StackPanel>
<StackPanel Orientation="Horizontal" Style="{StaticResource LineItemPanel}">
<CheckBox Content="Evolve All Pokemon with Enough Candy" IsChecked="{Binding Settings.EvolveAllPokemonWithEnoughCandy}" ToolTip="QED." />
</StackPanel>
<StackPanel Orientation="Horizontal" Style="{StaticResource LineItemPanel}">
<Label Style="{StaticResource LineItemLabel}" Content="Evolve Pokemon at Storage Usage %" ToolTip="Decimals allowed." />
<TextBox Style="{StaticResource LineItemTextBoxMd}" Text="{Binding Settings.EvolveKeptPokemonsAtStorageUsagePercentage}" />
</StackPanel>
<StackPanel Orientation="Horizontal" Style="{StaticResource LineItemPanel}">
<CheckBox Content="Keep Pokemon which Can Evolve" IsChecked="{Binding Settings.KeepPokemonsThatCanEvolve}" ToolTip="QED." />
</StackPanel>
<StackPanel Orientation="Horizontal" Style="{StaticResource LineItemPanel}">
<CheckBox Content="Auto-Favorite Pokemon" IsChecked="{Binding Settings.AutoFavoritePokemon}" ToolTip="QED." />
</StackPanel>
<StackPanel Orientation="Horizontal" Style="{StaticResource LineItemPanel}" Visibility="{Binding Settings.AutoFavoritePokemon, Converter={StaticResource VisConv}}">
<Label Style="{StaticResource LineItemLabel}" Content="Favorite Pokemon above IV%" ToolTip="If the IV of a Pokemon is at or above this % it will be favorited and not transfered. Decimals allowed." />
<TextBox Style="{StaticResource LineItemTextBoxMd}" Text="{Binding Settings.FavoriteMinIvPercentage}" />
</StackPanel>
</StackPanel>
</ScrollViewer>
</TabItem>

Expand Down
15 changes: 14 additions & 1 deletion PoGo.NecroBot.ConfigUI/MainWindow.xaml.cs
Original file line number Diff line number Diff line change
Expand Up @@ -48,8 +48,21 @@ public List<string> DevicePackageCollection
public static readonly DependencyProperty DevicePackageCollectionProperty =
DependencyProperty.Register("DevicePackageCollection", typeof(List<string>), typeof(MainWindow), new PropertyMetadata(new List<string>()));

public List<string> OperatorsCollection
{
get { return (List<string>)GetValue(OperatorsCollectionProperty); }
set { SetValue(OperatorsCollectionProperty, value); }
}
public static readonly DependencyProperty OperatorsCollectionProperty =
DependencyProperty.Register("OperatorsCollection", typeof(List<string>), typeof(MainWindow), new PropertyMetadata(new List<string>() { "or", "and" }));


public List<string> IpCvCollection
{
get { return (List<string>)GetValue(IpCvCollectionProperty); }
set { SetValue(IpCvCollectionProperty, value); }
}
public static readonly DependencyProperty IpCvCollectionProperty =
DependencyProperty.Register("IpCvCollection", typeof(List<string>), typeof(MainWindow), new PropertyMetadata(new List<string>() { "iv", "cp" }));



Expand Down

0 comments on commit e39c939

Please sign in to comment.