-
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.
advanced transaction listing controls
- Loading branch information
Showing
9 changed files
with
180 additions
and
39 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
33 changes: 33 additions & 0 deletions
33
Hearthstone Treasury/Controls/TransactionTemplateControl.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,33 @@ | ||
<UserControl x:Class="Hearthstone_Treasury.Controls.TransactionTemplateControl" | ||
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"> | ||
<UserControl.Resources> | ||
<ObjectDataProvider x:Key="categoryEnum" MethodName="GetValues" ObjectType="{x:Type sys:Enum}"> | ||
<ObjectDataProvider.MethodParameters> | ||
<x:Type Type="Models:CategoryEnum"/> | ||
</ObjectDataProvider.MethodParameters> | ||
</ObjectDataProvider> | ||
</UserControl.Resources> | ||
<Grid> | ||
<Grid.ColumnDefinitions> | ||
<ColumnDefinition Width="Auto"/> | ||
<ColumnDefinition Width="Auto"/> | ||
<ColumnDefinition Width="Auto"/> | ||
<ColumnDefinition Width="Auto"/> | ||
<ColumnDefinition Width="*"/> | ||
<ColumnDefinition Width="Auto"/> | ||
</Grid.ColumnDefinitions> | ||
<ComboBox Grid.Column="0" SelectedValuePath="{Binding Category}" ItemsSource="{Binding Source={StaticResource categoryEnum}}" Margin="2,0,2,0"/> | ||
<Label Grid.Column="1" Content="Change"/> | ||
<TextBox Grid.Column="2" Text="{Binding Difference}" Margin="2,0,2,0" /> | ||
<Label Grid.Column="3" Content="Comment"/> | ||
<TextBox Grid.Column="4" Text="{Binding Comment}" Margin="2,0,2,0"/> | ||
<Button Grid.Column="5" Margin="2" Content="Add" Command="{Binding CreateTransaction}"/> | ||
</Grid> | ||
</UserControl> |
28 changes: 28 additions & 0 deletions
28
Hearthstone Treasury/Controls/TransactionTemplateControl.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 TransactionTemplateControl.xaml | ||
/// </summary> | ||
public partial class TransactionTemplateControl : UserControl | ||
{ | ||
public TransactionTemplateControl() | ||
{ | ||
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
24 changes: 24 additions & 0 deletions
24
Hearthstone Treasury/ViewModels/NewTransactionViewModel.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,24 @@ | ||
using ReactiveUI; | ||
using ReactiveUI.Fody.Helpers; | ||
|
||
namespace Hearthstone_Treasury.ViewModels | ||
{ | ||
public class NewTransactionViewModel : ReactiveObject | ||
{ | ||
public NewTransactionViewModel() | ||
{ | ||
CreateTransaction = ReactiveCommand.Create(); | ||
} | ||
|
||
public ReactiveCommand<object> CreateTransaction { get; private set; } | ||
|
||
[Reactive] | ||
public int Difference { get; set; } | ||
|
||
[Reactive] | ||
public CategoryEnum Category { get; set; } | ||
|
||
[Reactive] | ||
public string Comment { 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
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