Skip to content

Commit

Permalink
Removed Extra Files
Browse files Browse the repository at this point in the history
  • Loading branch information
VeXHarbinger committed Dec 24, 2023
1 parent e7c913a commit 8c47652
Show file tree
Hide file tree
Showing 10 changed files with 193 additions and 71 deletions.
4 changes: 2 additions & 2 deletions DrawPool/Controls/PoolView.xaml
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@
Width="35"
Height="20"
FontSize="12"
Text="0%"
Text=""
TextAlignment="Right" />
<hdt:HearthstoneTextBlock
x:Name="LblDrawChance2"
Expand All @@ -94,7 +94,7 @@
HorizontalAlignment="Center"
VerticalAlignment="Top"
FontSize="12"
Text="0%"
Text=""
TextAlignment="Right" />
</Canvas>
</Grid>
Expand Down
2 changes: 1 addition & 1 deletion DrawPool/Controls/SettingsView.xaml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
xmlns:props="clr-namespace:DrawPool.Properties"
lex:LocalizeDictionary.DesignCulture="en"
lex:ResxLocalizationProvider.DefaultAssembly="DrawPool"
lex:ResxLocalizationProvider.DefaultDictionary="DrawPoolStringTools"
lex:ResxLocalizationProvider.DefaultDictionary="DrawPool.Logic.StringTools"
BorderThickness="1"
VerticalScrollBarVisibility="Hidden"
mc:Ignorable="d">
Expand Down
6 changes: 3 additions & 3 deletions DrawPool/Controls/SettingsView.xaml.cs
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
namespace DrawPool.Controls
{
using DrawPool.DrawLogic;
using DrawPool.Logic;
using global::DrawPool.DrawLogic;
using global::DrawPool.Logic;
using MahApps.Metro.Controls;
using System;
using System.Collections.Generic;
Expand Down Expand Up @@ -67,7 +67,7 @@ private void BtnShowHide_Click(object sender, RoutedEventArgs e)

private void BtnUnlock_Click(object sender, RoutedEventArgs e)
{
IsUnlocked = PluginInstance.inputMoveManager.Toggle();
IsUnlocked = DrawPool.inputMoveManager.Toggle();
if (!IsUnlocked)
{
BtnUnlock.Content = StringTools.GetLocalized("UnlockLabel");
Expand Down
6 changes: 2 additions & 4 deletions DrawPool/PluginInstance.cs → DrawPool/DrawPool.cs
Original file line number Diff line number Diff line change
Expand Up @@ -9,17 +9,15 @@

namespace DrawPool
{
public class PluginInstance : IDisposable
public class DrawPool : IDisposable
{
public static InputMoveManager inputMoveManager;
public MinstrelPool minstrelPool;

public PluginInstance()
public DrawPool()
{
minstrelPool = new MinstrelPool();
minstrelPool.Name = "MinstrelPoolView";
// minstrelPool.Height = minstrelPool.ActualHeight;
// minstrelPool.Width = minstrelPool.ActualWidth;
Core.OverlayCanvas.Children.Add(minstrelPool);

Settings.Default.DrawPoolTop = CheckDefault(Settings.Default.DrawPoolTop);
Expand Down
3 changes: 1 addition & 2 deletions DrawPool/DrawPool.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -63,12 +63,11 @@
<DependentUpon>SettingsView.xaml</DependentUpon>
</Compile>
<Compile Include="Logic\InputMoveManager.cs" />
<Compile Include="Logic\PluginManager.cs" />
<Compile Include="Logic\DrawPoolHelpers.cs" />
<Compile Include="Logic\ICommonView.cs" />
<Compile Include="DrawViews\MinstrelPool.cs" />
<Compile Include="DrawPoolPlugin.cs" />
<Compile Include="PluginInstance.cs" />
<Compile Include="DrawPool.cs" />
<Compile Include="Properties\AssemblyInfo.cs" />
<Compile Include="Properties\Settings.Designer.cs">
<AutoGen>True</AutoGen>
Expand Down
12 changes: 6 additions & 6 deletions DrawPool/DrawPoolPlugin.cs
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
namespace DrawPool
{
using DrawPool.DrawViews;
using DrawPool.Logic;

using global::DrawPool.Logic;
using global::DrawPool.Controls;
using Hearthstone_Deck_Tracker.Plugins;
using System;
Expand All @@ -16,7 +16,7 @@
/// <seealso cref="Hearthstone_Deck_Tracker.Plugins.IPlugin" />
public class DrawPoolPlugin : IPlugin
{
public PluginInstance pluginInstance;
public DrawPool drawPoolInstance;

/// <summary>
/// The author.
Expand Down Expand Up @@ -94,7 +94,7 @@ protected void CheckForDefaultSettings()

public void OnLoad()
{
pluginInstance = new PluginInstance();
drawPoolInstance = new DrawPool();
AddMenuItem();
}

Expand All @@ -105,8 +105,8 @@ public void OnUnload()
{
Settings.Default.Save();

pluginInstance?.CleanUp();
pluginInstance = null;
drawPoolInstance?.CleanUp();
drawPoolInstance = null;
}

/// <summary>
Expand Down
8 changes: 4 additions & 4 deletions DrawPool/DrawViews/MinstrelPool.cs
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,8 @@
/// <summary>
/// The Minstrel DrawPool View
/// </summary>
/// <seealso cref="DrawPool.Controls.PoolView" />
/// <seealso cref="DrawPool.DrawLogic.ICommonView" />
/// <seealso cref="global::DrawPool.Controls.PoolView" />
/// <seealso cref="global::DrawPool.DrawLogic.ICommonView" />
public class MinstrelPool : PoolView, ICommonView
{
public MinstrelPool()
Expand All @@ -28,8 +28,8 @@ public MinstrelPool()
/// </summary>
public void DoMath()
{
this.Chance1.Text = "0%";
this.Chance2.Text = "0%";
this.Chance1.Text = "";
this.Chance2.Text = "";
if (MinionCount() >= 1)
{
var gm = GroupedMinion();
Expand Down
27 changes: 18 additions & 9 deletions DrawPool/Logic/InputMoveManager.cs
Original file line number Diff line number Diff line change
Expand Up @@ -13,9 +13,9 @@ public class InputMoveManager
private bool _selected = false;
private StackPanel _StackPanel;

public InputMoveManager(StackPanel player)
public InputMoveManager(StackPanel panel)
{
_StackPanel = player;
_StackPanel = panel;
}

private void MouseInputOnLmbDown(object sender, EventArgs eventArgs)
Expand All @@ -35,14 +35,18 @@ private void MouseInputOnLmbDown(object sender, EventArgs eventArgs)
private void MouseInputOnLmbUp(object sender, EventArgs eventArgs)
{
var pos = User32.GetMousePos();

var _mousePos = new Point(pos.X, pos.Y);
if (_selected)
{
var p = Core.OverlayCanvas.PointFromScreen(new Point(pos.X, pos.Y));

Settings.Default.DrawPoolTop = p.Y;
Settings.Default.DrawPoolLeft = p.X;
if (pos.X > Core.OverlayCanvas.Width)
{
Settings.Default.DrawPoolLeft = p.X;
}
if (pos.Y > Core.OverlayCanvas.Height)
{
Settings.Default.DrawPoolTop = p.Y;
}
}

_selected = false;
Expand All @@ -57,9 +61,14 @@ private void MouseInputOnMouseMoved(object sender, EventArgs eventArgs)

var pos = User32.GetMousePos();
var p = Core.OverlayCanvas.PointFromScreen(new Point(pos.X, pos.Y));

Canvas.SetTop(_StackPanel, p.Y);
Canvas.SetLeft(_StackPanel, p.X);
if (pos.X > Core.OverlayCanvas.Width)
{
Canvas.SetLeft(_StackPanel, p.X);
}
if (pos.Y > Core.OverlayCanvas.Height)
{
Canvas.SetTop(_StackPanel, p.Y);
}
}

private bool PointInsideControl(Point p, FrameworkElement control)
Expand Down
40 changes: 0 additions & 40 deletions DrawPool/Logic/PluginManager.cs

This file was deleted.

156 changes: 156 additions & 0 deletions DrawPool/Resources/DrawPoolStrings.en.resx
Original file line number Diff line number Diff line change
@@ -0,0 +1,156 @@
<?xml version="1.0" encoding="utf-8"?>
<root>
<!--
Microsoft ResX Schema
Version 2.0
The primary goals of this format is to allow a simple XML format
that is mostly human readable. The generation and parsing of the
various data types are done through the TypeConverter classes
associated with the data types.
Example:
... ado.net/XML headers & schema ...
<resheader name="resmimetype">text/microsoft-resx</resheader>
<resheader name="version">2.0</resheader>
<resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
<resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
<data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
<data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
<data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
<value>[base64 mime encoded serialized .NET Framework object]</value>
</data>
<data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
<value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
<comment>This is a comment</comment>
</data>
There are any number of "resheader" rows that contain simple
name/value pairs.
Each data row contains a name, and value. The row also contains a
type or mimetype. Type corresponds to a .NET class that support
text/value conversion through the TypeConverter architecture.
Classes that don't support this are serialized and stored with the
mimetype set.
The mimetype is used for serialized objects, and tells the
ResXResourceReader how to depersist the object. This is currently not
extensible. For a given mimetype the value must be set accordingly:
Note - application/x-microsoft.net.object.binary.base64 is the format
that the ResXResourceWriter will generate, however the reader can
read any of the formats listed below.
mimetype: application/x-microsoft.net.object.binary.base64
value : The object must be serialized with
: System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
: and then encoded with base64 encoding.
mimetype: application/x-microsoft.net.object.soap.base64
value : The object must be serialized with
: System.Runtime.Serialization.Formatters.Soap.SoapFormatter
: and then encoded with base64 encoding.
mimetype: application/x-microsoft.net.object.bytearray.base64
value : The object must be serialized into a byte array
: using a System.ComponentModel.TypeConverter
: and then encoded with base64 encoding.
-->
<xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
<xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
<xsd:element name="root" msdata:IsDataSet="true">
<xsd:complexType>
<xsd:choice maxOccurs="unbounded">
<xsd:element name="metadata">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" />
</xsd:sequence>
<xsd:attribute name="name" use="required" type="xsd:string" />
<xsd:attribute name="type" type="xsd:string" />
<xsd:attribute name="mimetype" type="xsd:string" />
<xsd:attribute ref="xml:space" />
</xsd:complexType>
</xsd:element>
<xsd:element name="assembly">
<xsd:complexType>
<xsd:attribute name="alias" type="xsd:string" />
<xsd:attribute name="name" type="xsd:string" />
</xsd:complexType>
</xsd:element>
<xsd:element name="data">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
<xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" />
<xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
<xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
<xsd:attribute ref="xml:space" />
</xsd:complexType>
</xsd:element>
<xsd:element name="resheader">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" use="required" />
</xsd:complexType>
</xsd:element>
</xsd:choice>
</xsd:complexType>
</xsd:element>
</xsd:schema>
<resheader name="resmimetype">
<value>text/microsoft-resx</value>
</resheader>
<resheader name="version">
<value>2.0</value>
</resheader>
<resheader name="reader">
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
<resheader name="writer">
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
<data name="HideLabel" xml:space="preserve">
<value>Hide</value>
</data>
<data name="LockLabel" xml:space="preserve">
<value>Lock</value>
</data>
<data name="MinstrelLabel" xml:space="preserve">
<value>Minstrel</value>
</data>
<data name="MoveLabel" xml:space="preserve">
<value>Lock</value>
</data>
<data name="OpacityLabel" xml:space="preserve">
<value>Opacity</value>
</data>
<data name="PiperLabel" xml:space="preserve">
<value>Piper</value>
</data>
<data name="PluginDescription" xml:space="preserve">
<value>Helps to see scoped draw pools from the current cards in your deck.</value>
</data>
<data name="PluginName" xml:space="preserve">
<value>DrawPool</value>
</data>
<data name="ScaleLabel" xml:space="preserve">
<value>Scale</value>
</data>
<data name="SettingsLabel" xml:space="preserve">
<value>Settings</value>
</data>
<data name="ShowLabel" xml:space="preserve">
<value>Show</value>
</data>
<data name="UnlockLabel" xml:space="preserve">
<value>Unlock</value>
</data>
</root>

0 comments on commit 8c47652

Please sign in to comment.