Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
a283d57
commit 7870524
Showing
30 changed files
with
1,647 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
|
||
Microsoft Visual Studio Solution File, Format Version 12.00 | ||
# Visual Studio 15 | ||
VisualStudioVersion = 15.0.27428.2043 | ||
MinimumVisualStudioVersion = 10.0.40219.1 | ||
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "DrawPool", "DrawPool\DrawPool.csproj", "{456D95B9-55E4-4350-9AF5-E13EEA64FBCA}" | ||
EndProject | ||
Global | ||
GlobalSection(SolutionConfigurationPlatforms) = preSolution | ||
Debug|Any CPU = Debug|Any CPU | ||
Release|Any CPU = Release|Any CPU | ||
EndGlobalSection | ||
GlobalSection(ProjectConfigurationPlatforms) = postSolution | ||
{456D95B9-55E4-4350-9AF5-E13EEA64FBCA}.Debug|Any CPU.ActiveCfg = Debug|Any CPU | ||
{456D95B9-55E4-4350-9AF5-E13EEA64FBCA}.Debug|Any CPU.Build.0 = Debug|Any CPU | ||
{456D95B9-55E4-4350-9AF5-E13EEA64FBCA}.Release|Any CPU.ActiveCfg = Release|Any CPU | ||
{456D95B9-55E4-4350-9AF5-E13EEA64FBCA}.Release|Any CPU.Build.0 = Release|Any CPU | ||
EndGlobalSection | ||
GlobalSection(SolutionProperties) = preSolution | ||
HideSolutionNode = FALSE | ||
EndGlobalSection | ||
GlobalSection(ExtensibilityGlobals) = postSolution | ||
SolutionGuid = {7615A9F8-0DBE-4842-96EE-FD2E4B7A7342} | ||
EndGlobalSection | ||
EndGlobal |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,68 @@ | ||
<UserControl | ||
x:Class="DrawPool.Controls.OptionsViewControl" | ||
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" | ||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" | ||
xmlns:d="http://schemas.microsoft.com/expression/blend/2008" | ||
xmlns:local="clr-namespace:DrawPool.Controls" | ||
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" | ||
d:DesignHeight="450" | ||
d:DesignWidth="800" | ||
Background="{DynamicResource {x:Static SystemColors.ControlDarkDarkBrushKey}}" | ||
mc:Ignorable="d"> | ||
<StackPanel Name="Options" Visibility="Visible"> | ||
<Label Content="Modes" /> | ||
<Border BorderThickness="1"> | ||
<Grid> | ||
<Grid.RowDefinitions> | ||
<RowDefinition Height="Auto" MinHeight="18" /> | ||
<RowDefinition Height="Auto" MinHeight="18" /> | ||
<RowDefinition Height="Auto" MinHeight="18" /> | ||
<RowDefinition Height="Auto" MinHeight="18" /> | ||
</Grid.RowDefinitions> | ||
<Grid.ColumnDefinitions> | ||
<ColumnDefinition Width="Auto" /> | ||
<ColumnDefinition /> | ||
|
||
</Grid.ColumnDefinitions> | ||
<CheckBox | ||
Name="chkMinstrel" | ||
Grid.Row="0" | ||
Grid.Column="0" | ||
Margin="2" | ||
HorizontalAlignment="Center" | ||
VerticalAlignment="Center" | ||
Grid.IsSharedSizeScope="True" | ||
IsChecked="{Binding Settings.Default.IsMinstrelEnabled}" /> | ||
<Label | ||
Name="lblMinstrel" | ||
Grid.Row="0" | ||
Grid.Column="1" | ||
Grid.ColumnSpan="1" | ||
Margin="2" | ||
Content="Elven Minstrel" | ||
Grid.IsSharedSizeScope="True" | ||
TextOptions.TextFormattingMode="Display" /> | ||
<CheckBox | ||
Name="chkPiper" | ||
Grid.Row="1" | ||
Grid.Column="0" | ||
HorizontalAlignment="Center" | ||
VerticalAlignment="Center" | ||
Grid.IsSharedSizeScope="True" | ||
IsChecked="{Binding Settings.Default.IsPiperEnabled}" /> | ||
|
||
<Label | ||
Name="lblPiper" | ||
Grid.Row="1" | ||
Grid.Column="1" | ||
Grid.ColumnSpan="1" | ||
Margin="2" | ||
Content="Witchwood Piper" | ||
TextOptions.TextFormattingMode="Display" /> | ||
|
||
|
||
|
||
</Grid> | ||
</Border> | ||
</StackPanel> | ||
</UserControl> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
using System; | ||
using System.Collections.Generic; | ||
using System.Linq; | ||
using System.Text; | ||
using System.Threading.Tasks; | ||
using System.Windows; | ||
using System.Windows.Controls; | ||
using System.Windows.Data; | ||
using System.Windows.Documents; | ||
using System.Windows.Input; | ||
using System.Windows.Media; | ||
using System.Windows.Media.Imaging; | ||
using System.Windows.Navigation; | ||
using System.Windows.Shapes; | ||
|
||
namespace DrawPool.Controls | ||
{ | ||
/// <summary> | ||
/// Interaction logic for OptionsViewControl.xaml | ||
/// </summary> | ||
public partial class OptionsViewControl : UserControl | ||
{ | ||
public OptionsViewControl() | ||
{ | ||
InitializeComponent(); | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,41 @@ | ||
<UserControl | ||
x:Class="DrawPool.Controls.ScopedDrawViewControl" | ||
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" | ||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" | ||
xmlns:d="http://schemas.microsoft.com/expression/blend/2008" | ||
xmlns:hdtc="clr-namespace:Hearthstone_Deck_Tracker.Controls;assembly=HearthstoneDeckTracker" | ||
xmlns:local="clr-namespace:DrawPool.Controls" | ||
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" | ||
Background="{DynamicResource {x:Static SystemColors.ControlDarkDarkBrushKey}}"> | ||
<StackPanel Visibility="Visible"> | ||
<hdtc:AnimatedCardList x:Name="DrawPoolCards" MinHeight="20" /> | ||
<Grid Margin="0"> | ||
<Grid.RowDefinitions> | ||
<RowDefinition Height="Auto" MinHeight="18" /> | ||
</Grid.RowDefinitions> | ||
<Grid.ColumnDefinitions> | ||
<ColumnDefinition Width="2*" MinWidth="100" /> | ||
<ColumnDefinition Width="*" MinWidth="100" /> | ||
</Grid.ColumnDefinitions> | ||
<Label | ||
x:Name="lblProbability" | ||
Grid.Row="0" | ||
Grid.Column="0" | ||
MinWidth="100" | ||
Margin="4,0,0,0" | ||
HorizontalAlignment="Left" | ||
Content="{Binding ProbabilityLabel}" | ||
FontSize="14" /> | ||
<Label | ||
Name="lblDeckMix" | ||
Grid.Row="0" | ||
Grid.Column="1" | ||
MinWidth="50" | ||
MaxWidth="75" | ||
Margin="0,0,4,0" | ||
HorizontalAlignment="Right" | ||
Content="{Binding DeckMixLabel}" | ||
FontSize="14" /> | ||
</Grid> | ||
</StackPanel> | ||
</UserControl> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
namespace DrawPool | ||
{ | ||
using DrawPool.Models; | ||
using System; | ||
using System.Collections.Generic; | ||
using System.Linq; | ||
using System.Text; | ||
using System.Threading.Tasks; | ||
using System.Windows; | ||
using System.Windows.Controls; | ||
using System.Windows.Data; | ||
using System.Windows.Documents; | ||
using System.Windows.Input; | ||
using System.Windows.Media; | ||
using System.Windows.Media.Imaging; | ||
using System.Windows.Navigation; | ||
using System.Windows.Shapes; | ||
|
||
/// <summary> | ||
/// Interaction logic for ScopedDrawViewControl.xaml | ||
/// </summary> | ||
public partial class ScopedDrawViewControl : UserControl | ||
{ | ||
private DrawDataModel ddm; | ||
|
||
public ScopedDrawViewControl() | ||
{ | ||
//InitializeComponent(); | ||
} | ||
|
||
public DrawDataModel DrawData { get; set; } | ||
|
||
// | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,46 @@ | ||
namespace DrawPool | ||
{ | ||
using System; | ||
using System.Collections.Generic; | ||
using Card = Hearthstone_Deck_Tracker.Hearthstone.Card; | ||
using Core = Hearthstone_Deck_Tracker.API.Core; | ||
|
||
/// <summary> | ||
/// Interface for a card that invokes a draw, as opposed to a mechanic | ||
/// </summary> | ||
public interface IDraw | ||
{ | ||
/// <summary> | ||
/// Gets the unique card identifier. | ||
/// </summary> | ||
/// <value>The card identifier.</value> | ||
string CardId(); | ||
|
||
/// <summary> | ||
/// Does the math. | ||
/// </summary> | ||
void DoMath(); | ||
|
||
/// <summary> | ||
/// Loads the cards, sorts and filters as needed. | ||
/// </summary> | ||
void LoadCards(); | ||
|
||
/// <summary> | ||
/// When the Player mouses over a <see cref="Card"/> in his hand. | ||
/// </summary> | ||
/// <param name="card">The <see cref="Card"/>.</param> | ||
void PlayerHandMouseOver(Card card); | ||
|
||
/// <summary> | ||
/// Queries the <see cref="PlayerCardList">Deck</see> for specific scoped <see cref="Card">Cards</see>. | ||
/// </summary> | ||
/// <returns>The scoped list of <see cref="Card">Cards</see></returns> | ||
List<Card> QueryDeck(); | ||
|
||
/// <summary> | ||
/// Resets this instance's <see cref="Card"/> lists. | ||
/// </summary> | ||
void Reset(); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
namespace DrawPool | ||
{ | ||
using Core = Hearthstone_Deck_Tracker.API.Core; | ||
|
||
public interface IRecruit | ||
{ | ||
string MechanicId { get; set; } | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
using System; | ||
using System.Collections.Generic; | ||
using System.Linq; | ||
using System.Text; | ||
using System.Threading.Tasks; | ||
|
||
namespace DrawPool | ||
{ | ||
/// <summary> | ||
/// The list of possible Displays | ||
/// </summary> | ||
public enum ViewModes | ||
{ | ||
/// <summary> | ||
/// The Witchwood Piper | ||
/// </summary> | ||
Options = 0, | ||
|
||
/// <summary> | ||
/// The Witchwood Piper | ||
/// </summary> | ||
ElvenMinstrel = 1, | ||
|
||
/// <summary> | ||
/// The Witchwood Piper | ||
/// </summary> | ||
WitchWoodPiper = 2 | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,56 @@ | ||
namespace DrawPool | ||
{ | ||
using MahApps.Metro.Controls; | ||
using System; | ||
using System.Windows; | ||
using System.Windows.Controls; | ||
using Hearthstone_Deck_Tracker.Controls; | ||
using System.Collections.Generic; | ||
using System.Linq; | ||
using Card = Hearthstone_Deck_Tracker.Hearthstone.Card; | ||
using Core = Hearthstone_Deck_Tracker.API.Core; | ||
using Helper = Hearthstone_Deck_Tracker.Helper; | ||
using Hearthstone_Deck_Tracker; | ||
using Hearthstone_Deck_Tracker.API; | ||
using static Hearthstone_Deck_Tracker.Windows.MessageDialogs; | ||
using Settings = DrawPool.Properties.Settings; | ||
using System.ComponentModel; | ||
using Hearthstone_Deck_Tracker.Hearthstone; | ||
using System.Security.Cryptography; | ||
using DrawPool.Models; | ||
|
||
public partial class DisplayControl : UserControl | ||
{ | ||
/// <summary> | ||
/// Occurs when [raise curtain] There is a display with data. | ||
/// </summary> | ||
public event EventHandler RaiseCurtain; | ||
|
||
/// <summary> | ||
/// Calculates the Draw the probability. | ||
/// </summary> | ||
/// <param name="poolsize">The pool size you will draw from.</param> | ||
/// <param name="copies">The number of copies of a card.</param> | ||
/// <param name="draw">The number of cards to draw.</param> | ||
/// <param name="dec">The decimal place to round to.</param> | ||
/// <returns>The Draw the probability.</returns> | ||
public Double DrawProbability(int poolsize, int copies = 1, int draw = 1, int dec = 0) | ||
{ | ||
return Math.Round( | ||
Helper.DrawProbability(copies, poolsize, draw) * 100, dec); | ||
} | ||
|
||
/// <summary> | ||
/// Checks the panel to see if there is data to display. | ||
/// </summary> | ||
/// <param name="sender">The sender.</param> | ||
/// <param name="e">The <see cref="EventArgs"/> instance containing the event data.</param> | ||
internal void ShowDisplay(object sender, EventArgs e) | ||
{ | ||
if (this.RaiseCurtain != null && this.CardList.Items.Count > 0) | ||
{ | ||
RaiseCurtain(sender, e); | ||
} | ||
} | ||
} | ||
} |
Oops, something went wrong.