-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
added settings flyout; moved all calculations to transactions wrapper…
… and separate sub-controls
- Loading branch information
Showing
23 changed files
with
443 additions
and
135 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
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
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
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,13 @@ | ||
<UserControl x:Class="Hearthstone_Treasury.Controls.ReportControl" | ||
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" | ||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" | ||
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" | ||
xmlns:d="http://schemas.microsoft.com/expression/blend/2008" | ||
xmlns:local="clr-namespace:Hearthstone_Treasury.Controls" | ||
mc:Ignorable="d" | ||
d:DesignHeight="300" d:DesignWidth="300"> | ||
<WrapPanel> | ||
<local:DistributionChart DataContext="{Binding IncomeDistributionChart}" ></local:DistributionChart> | ||
<local:DistributionChart DataContext="{Binding OutcomeDistributionChart}" ></local:DistributionChart> | ||
</WrapPanel> | ||
</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 Hearthstone_Treasury.Controls | ||
{ | ||
/// <summary> | ||
/// Interaction logic for ReportControl.xaml | ||
/// </summary> | ||
public partial class ReportControl : UserControl | ||
{ | ||
public ReportControl() | ||
{ | ||
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,30 @@ | ||
<UserControl x:Class="Hearthstone_Treasury.Controls.SettingsControl" | ||
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" | ||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" | ||
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" | ||
xmlns:d="http://schemas.microsoft.com/expression/blend/2008" | ||
xmlns:local="clr-namespace:Hearthstone_Treasury.Controls" | ||
mc:Ignorable="d" | ||
d:DesignHeight="300" d:DesignWidth="300"> | ||
<Grid> | ||
<Grid.RowDefinitions> | ||
<RowDefinition Height="Auto"/> | ||
</Grid.RowDefinitions> | ||
<Grid.ColumnDefinitions> | ||
<ColumnDefinition Width="Auto"/> | ||
<ColumnDefinition Width="*"/> | ||
<ColumnDefinition Width="*"/> | ||
</Grid.ColumnDefinitions> | ||
<Label Content="Initial Balance" /> | ||
<TextBox Grid.Column="1" Width="50" Margin="2"> | ||
<TextBox.Text> | ||
<Binding Path="InitialBalance" Mode="TwoWay" NotifyOnValidationError="True"> | ||
<Binding.ValidationRules> | ||
<DataErrorValidationRule ValidatesOnTargetUpdated="True"/> | ||
</Binding.ValidationRules> | ||
</Binding> | ||
</TextBox.Text> | ||
</TextBox> | ||
<Button Grid.Column="2" Content="Apply" Margin="2" /> | ||
</Grid> | ||
</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 Hearthstone_Treasury.Controls | ||
{ | ||
/// <summary> | ||
/// Interaction logic for SettingsControl.xaml | ||
/// </summary> | ||
public partial class SettingsControl : UserControl | ||
{ | ||
public SettingsControl() | ||
{ | ||
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
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 @@ | ||
<UserControl x:Class="Hearthstone_Treasury.Controls.StatisticsControl" | ||
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" | ||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" | ||
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" | ||
xmlns:d="http://schemas.microsoft.com/expression/blend/2008" | ||
xmlns:local="clr-namespace:Hearthstone_Treasury.Controls" | ||
mc:Ignorable="d" | ||
d:DesignHeight="300" d:DesignWidth="300"> | ||
<WrapPanel> | ||
<StackPanel Orientation="Horizontal"> | ||
<Label Content="{Binding Balance}" ContentStringFormat="Balance: {0}"></Label> | ||
</StackPanel> | ||
<StackPanel Orientation="Horizontal"> | ||
<Label>Stats: </Label> | ||
<Label Content="{Binding GoldIncomeVelocity}" ContentStringFormat="In {0:N2}"></Label> | ||
<Label> / </Label> | ||
<Label Content="{Binding GoldOutcomeVelocity}" ContentStringFormat="Out {0:N2}"></Label> | ||
<Label> / </Label> | ||
<Label Content="{Binding GoldTotalVelocity}" ContentStringFormat="Total {0:N2}"></Label> | ||
</StackPanel> | ||
<StackPanel Orientation="Horizontal"> | ||
<Label Content="{Binding TransactionList.ReportingDays}" ContentStringFormat="Period {0:N2} days"></Label> | ||
</StackPanel> | ||
</WrapPanel> | ||
</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 Hearthstone_Treasury.Controls | ||
{ | ||
/// <summary> | ||
/// Interaction logic for StatisticsControl.xaml | ||
/// </summary> | ||
public partial class StatisticsControl : UserControl | ||
{ | ||
public StatisticsControl() | ||
{ | ||
InitializeComponent(); | ||
} | ||
} | ||
} |
26 changes: 26 additions & 0 deletions
26
Hearthstone Treasury/Controls/TransactionsListingControl.xaml
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,26 @@ | ||
<UserControl x:Class="Hearthstone_Treasury.Controls.TransactionsListingControl" | ||
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" | ||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" | ||
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" | ||
xmlns:d="http://schemas.microsoft.com/expression/blend/2008" | ||
xmlns:local="clr-namespace:Hearthstone_Treasury.Controls" | ||
xmlns:sys="clr-namespace:System;assembly=mscorlib" | ||
xmlns:Models="clr-namespace:Hearthstone_Treasury.ViewModels" | ||
mc:Ignorable="d" | ||
d:DesignHeight="300" d:DesignWidth="300"> | ||
<DataGrid ItemsSource="{Binding Transactions}" AutoGenerateColumns="False" CanUserReorderColumns="False"> | ||
<DataGrid.Resources> | ||
<ObjectDataProvider x:Key="categoryEnum" MethodName="GetValues" ObjectType="{x:Type sys:Enum}"> | ||
<ObjectDataProvider.MethodParameters> | ||
<x:Type Type="Models:CategoryEnum"/> | ||
</ObjectDataProvider.MethodParameters> | ||
</ObjectDataProvider> | ||
</DataGrid.Resources> | ||
<DataGrid.Columns> | ||
<DataGridTextColumn Binding="{Binding Moment}" Header="When" SortDirection="Ascending"/> | ||
<DataGridComboBoxColumn Header="Category" SelectedItemBinding="{Binding Category}" ItemsSource="{Binding Source={StaticResource categoryEnum}}"/> | ||
<DataGridTextColumn Binding="{Binding Difference}" Header="Difference"/> | ||
<DataGridTextColumn Binding="{Binding Comment}" Header="Comments" /> | ||
</DataGrid.Columns> | ||
</DataGrid> | ||
</UserControl> |
28 changes: 28 additions & 0 deletions
28
Hearthstone Treasury/Controls/TransactionsListingControl.xaml.cs
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 Hearthstone_Treasury.Controls | ||
{ | ||
/// <summary> | ||
/// Interaction logic for TransactionsListingControl.xaml | ||
/// </summary> | ||
public partial class TransactionsListingControl : UserControl | ||
{ | ||
public TransactionsListingControl() | ||
{ | ||
InitializeComponent(); | ||
} | ||
} | ||
} |
Oops, something went wrong.