Added charge and deposit buttons
This commit is contained in:
BIN
Content/money_green.ico
Normal file
BIN
Content/money_green.ico
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 109 KiB |
BIN
Content/money_red.ico
Normal file
BIN
Content/money_red.ico
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 2.7 KiB |
@@ -37,7 +37,7 @@
|
|||||||
<WarningLevel>4</WarningLevel>
|
<WarningLevel>4</WarningLevel>
|
||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
<PropertyGroup>
|
<PropertyGroup>
|
||||||
<ApplicationIcon>Content\icon.ico</ApplicationIcon>
|
<ApplicationIcon>Content\money_green.ico</ApplicationIcon>
|
||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<Reference Include="Costura, Version=1.6.2.0, Culture=neutral, PublicKeyToken=9919ef960d84173d, processorArchitecture=MSIL">
|
<Reference Include="Costura, Version=1.6.2.0, Culture=neutral, PublicKeyToken=9919ef960d84173d, processorArchitecture=MSIL">
|
||||||
@@ -201,6 +201,10 @@
|
|||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<None Include="FodyWeavers.xml" />
|
<None Include="FodyWeavers.xml" />
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
|
<ItemGroup>
|
||||||
|
<Resource Include="Content\money_green.ico" />
|
||||||
|
<Resource Include="Content\money_red.ico" />
|
||||||
|
</ItemGroup>
|
||||||
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
|
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
|
||||||
<Import Project="packages\Fody.2.0.0\build\dotnet\Fody.targets" Condition="Exists('packages\Fody.2.0.0\build\dotnet\Fody.targets')" />
|
<Import Project="packages\Fody.2.0.0\build\dotnet\Fody.targets" Condition="Exists('packages\Fody.2.0.0\build\dotnet\Fody.targets')" />
|
||||||
<Target Name="EnsureNuGetPackageBuildImports" BeforeTargets="PrepareForBuild">
|
<Target Name="EnsureNuGetPackageBuildImports" BeforeTargets="PrepareForBuild">
|
||||||
|
|||||||
@@ -5,7 +5,7 @@
|
|||||||
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
|
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
|
||||||
xmlns:c="clr-namespace:CurrencyTextBoxControl;assembly=CurrencyTextBoxControl"
|
xmlns:c="clr-namespace:CurrencyTextBoxControl;assembly=CurrencyTextBoxControl"
|
||||||
mc:Ignorable="d"
|
mc:Ignorable="d"
|
||||||
Icon="../../Content/moneybag.ico"
|
Icon="{Binding WindowIcon}"
|
||||||
Name="AddTransactionViewWindow"
|
Name="AddTransactionViewWindow"
|
||||||
Title="{Binding WindowTitle}" Height="300" Width="300"
|
Title="{Binding WindowTitle}" Height="300" Width="300"
|
||||||
KeyUp="Window_OnKeyUp">
|
KeyUp="Window_OnKeyUp">
|
||||||
|
|||||||
@@ -1,6 +1,5 @@
|
|||||||
using DebtMgr.Extensions;
|
using DebtMgr.Extensions;
|
||||||
using System.Windows;
|
using System.Windows;
|
||||||
using System.Windows.Controls;
|
|
||||||
using System.Windows.Input;
|
using System.Windows.Input;
|
||||||
using DebtMgr.Model;
|
using DebtMgr.Model;
|
||||||
|
|
||||||
@@ -25,6 +24,10 @@ namespace DebtMgr.View.Dialogs
|
|||||||
App.Locator.AddTransactionView.RequestClose += (s, e) => Close();
|
App.Locator.AddTransactionView.RequestClose += (s, e) => Close();
|
||||||
|
|
||||||
DataContext = App.Locator.AddTransactionView;
|
DataContext = App.Locator.AddTransactionView;
|
||||||
|
|
||||||
|
//Uri iconUri = new Uri("pack://application:,,,/Content/money_red.ico", UriKind.RelativeOrAbsolute);
|
||||||
|
|
||||||
|
//this.Icon = BitmapFrame.Create(iconUri);
|
||||||
}
|
}
|
||||||
|
|
||||||
#region TextBox_OnKeyUp()
|
#region TextBox_OnKeyUp()
|
||||||
|
|||||||
@@ -6,7 +6,7 @@
|
|||||||
xmlns:local="clr-namespace:DebtMgr.View.Dialogs"
|
xmlns:local="clr-namespace:DebtMgr.View.Dialogs"
|
||||||
xmlns:currencyTextBoxControl="clr-namespace:CurrencyTextBoxControl;assembly=CurrencyTextBoxControl"
|
xmlns:currencyTextBoxControl="clr-namespace:CurrencyTextBoxControl;assembly=CurrencyTextBoxControl"
|
||||||
mc:Ignorable="d"
|
mc:Ignorable="d"
|
||||||
Icon="../../Content/moneybag.ico"
|
Icon="{Binding WindowIcon}"
|
||||||
Name="EditTransactionViewWindow"
|
Name="EditTransactionViewWindow"
|
||||||
Title="{Binding WindowTitle}" Height="300" Width="300"
|
Title="{Binding WindowTitle}" Height="300" Width="300"
|
||||||
KeyUp="Window_KeyUp">
|
KeyUp="Window_KeyUp">
|
||||||
|
|||||||
@@ -5,8 +5,8 @@
|
|||||||
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
|
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
|
||||||
xmlns:converters="clr-namespace:DebtMgr.Converters"
|
xmlns:converters="clr-namespace:DebtMgr.Converters"
|
||||||
mc:Ignorable="d"
|
mc:Ignorable="d"
|
||||||
Icon="../Content/icon.ico"
|
Icon="../Content/money_green.ico"
|
||||||
Title="Debt Manager" Height="600" Width="900">
|
Title="Debt Manager" Height="600" MinHeight="600" Width="900" MinWidth="900">
|
||||||
<Window.Resources>
|
<Window.Resources>
|
||||||
<converters:AmountToColorConverter x:Key="AmountToColorConverter" />
|
<converters:AmountToColorConverter x:Key="AmountToColorConverter" />
|
||||||
<Style TargetType="ListViewItem">
|
<Style TargetType="ListViewItem">
|
||||||
@@ -34,6 +34,7 @@
|
|||||||
<Grid Grid.Row="1">
|
<Grid Grid.Row="1">
|
||||||
<Grid.ColumnDefinitions>
|
<Grid.ColumnDefinitions>
|
||||||
<ColumnDefinition Width="2*"></ColumnDefinition>
|
<ColumnDefinition Width="2*"></ColumnDefinition>
|
||||||
|
<ColumnDefinition Width="Auto"></ColumnDefinition>
|
||||||
<ColumnDefinition Width="3*"></ColumnDefinition>
|
<ColumnDefinition Width="3*"></ColumnDefinition>
|
||||||
</Grid.ColumnDefinitions>
|
</Grid.ColumnDefinitions>
|
||||||
<!-- #region PersonListView -->
|
<!-- #region PersonListView -->
|
||||||
@@ -45,11 +46,21 @@
|
|||||||
<RowDefinition Height="*"></RowDefinition>
|
<RowDefinition Height="*"></RowDefinition>
|
||||||
</Grid.RowDefinitions>
|
</Grid.RowDefinitions>
|
||||||
<Label Grid.Row="0" Content="Overview" FontWeight="Bold" FontSize="22" Margin="0 0 0 -5"></Label>
|
<Label Grid.Row="0" Content="Overview" FontWeight="Bold" FontSize="22" Margin="0 0 0 -5"></Label>
|
||||||
<TextBlock Grid.Row="1" FontSize="18" Margin="5 0 0 5">
|
<Grid Grid.Row="1">
|
||||||
|
<Grid.ColumnDefinitions>
|
||||||
|
<ColumnDefinition Width="*"></ColumnDefinition>
|
||||||
|
<ColumnDefinition Width="Auto"></ColumnDefinition>
|
||||||
|
</Grid.ColumnDefinitions>
|
||||||
|
<TextBlock Grid.Column="0" FontSize="18" Margin="5 0 0 5" VerticalAlignment="Center">
|
||||||
<TextBlock Text="Overall Balance:"></TextBlock>
|
<TextBlock Text="Overall Balance:"></TextBlock>
|
||||||
<TextBlock Text="{Binding OverallBalanceLabel}" Foreground="{Binding OverallBalanceLabel, Converter={StaticResource AmountToColorConverter}}"></TextBlock>
|
<TextBlock Text="{Binding OverallBalanceLabel}" Foreground="{Binding OverallBalanceLabel, Converter={StaticResource AmountToColorConverter}}"></TextBlock>
|
||||||
<TextBlock Text="€" Foreground="{Binding OverallBalanceLabel, Converter={StaticResource AmountToColorConverter}}"></TextBlock>
|
<TextBlock Text="€" Foreground="{Binding OverallBalanceLabel, Converter={StaticResource AmountToColorConverter}}"></TextBlock>
|
||||||
</TextBlock>
|
</TextBlock>
|
||||||
|
<Button Grid.Column="1" Padding="5" ToolTip="New Person" Margin="5 0 5 5" Command="{Binding NewPersonContextMenuCommand}">
|
||||||
|
<Image Source="../Content/addperson.ico" Width="30" />
|
||||||
|
</Button>
|
||||||
|
|
||||||
|
</Grid>
|
||||||
<ListView Name="PersonListView" Grid.Row="2" ItemsSource="{Binding PersonListViewItemSource}" SelectedItem="{Binding PersonListViewSelectedItem}">
|
<ListView Name="PersonListView" Grid.Row="2" ItemsSource="{Binding PersonListViewItemSource}" SelectedItem="{Binding PersonListViewSelectedItem}">
|
||||||
<ListView.View>
|
<ListView.View>
|
||||||
<GridView>
|
<GridView>
|
||||||
@@ -84,7 +95,12 @@
|
|||||||
</Grid>
|
</Grid>
|
||||||
|
|
||||||
<!-- #endregion -->
|
<!-- #endregion -->
|
||||||
<Grid Grid.Column="1">
|
|
||||||
|
<StackPanel Grid.Column="1" Orientation="Horizontal">
|
||||||
|
<Separator Style="{StaticResource {x:Static ToolBar.SeparatorStyleKey}}" />
|
||||||
|
</StackPanel>
|
||||||
|
|
||||||
|
<Grid Grid.Column="2">
|
||||||
<Grid.RowDefinitions>
|
<Grid.RowDefinitions>
|
||||||
<RowDefinition Height="Auto"></RowDefinition>
|
<RowDefinition Height="Auto"></RowDefinition>
|
||||||
<RowDefinition Height="Auto"></RowDefinition>
|
<RowDefinition Height="Auto"></RowDefinition>
|
||||||
@@ -94,11 +110,24 @@
|
|||||||
<ColumnDefinition Width="*"></ColumnDefinition>
|
<ColumnDefinition Width="*"></ColumnDefinition>
|
||||||
</Grid.ColumnDefinitions>
|
</Grid.ColumnDefinitions>
|
||||||
<Label Grid.Row="0" Content="{Binding DetailViewHeaderLabelContent}" FontWeight="Bold" FontSize="22" Margin="0 0 0 -5"></Label>
|
<Label Grid.Row="0" Content="{Binding DetailViewHeaderLabelContent}" FontWeight="Bold" FontSize="22" Margin="0 0 0 -5"></Label>
|
||||||
<TextBlock Grid.Row="1" FontSize="18" Margin="5 0 0 5">
|
<Grid Grid.Row="1">
|
||||||
|
<Grid.ColumnDefinitions>
|
||||||
|
<ColumnDefinition Width="*"></ColumnDefinition>
|
||||||
|
<ColumnDefinition Width="Auto"></ColumnDefinition>
|
||||||
|
<ColumnDefinition Width="Auto"></ColumnDefinition>
|
||||||
|
</Grid.ColumnDefinitions>
|
||||||
|
<TextBlock Grid.Column="0" FontSize="18" Margin="5 0 0 5" VerticalAlignment="Center">
|
||||||
<TextBlock Text="Balance:"></TextBlock>
|
<TextBlock Text="Balance:"></TextBlock>
|
||||||
<TextBlock Text="{Binding DetailViewBalanceLabel}" Foreground="{Binding DetailViewBalanceLabel, Converter={StaticResource AmountToColorConverter}}"></TextBlock>
|
<TextBlock Text="{Binding DetailViewBalanceLabel}" Foreground="{Binding DetailViewBalanceLabel, Converter={StaticResource AmountToColorConverter}}"></TextBlock>
|
||||||
<TextBlock Text="€" Foreground="{Binding DetailViewBalanceLabel, Converter={StaticResource AmountToColorConverter}}"></TextBlock>
|
<TextBlock Text="€" Foreground="{Binding DetailViewBalanceLabel, Converter={StaticResource AmountToColorConverter}}"></TextBlock>
|
||||||
</TextBlock>
|
</TextBlock>
|
||||||
|
<Button Grid.Column="1" Padding="5" ToolTip="Add Charge" Margin="5 0 0 5" Command="{Binding AddChargeContextMenuCommand}">
|
||||||
|
<Image Source="../Content/money_red.ico" Width="30" />
|
||||||
|
</Button>
|
||||||
|
<Button Grid.Column="2" Padding="5" ToolTip="Add Deposit" Margin="5 0 5 5" Command="{Binding AddDepositContextMenuCommand}">
|
||||||
|
<Image Source="../Content/money_green.ico" Width="30" />
|
||||||
|
</Button>
|
||||||
|
</Grid>
|
||||||
<ListView Name="TransactionHistoryListView" Grid.Row="2" ItemsSource="{Binding TransactionHistoryListViewItemSource}" SelectedItem="{Binding TransactionHistoryListViewSelectedItem}" HorizontalContentAlignment="Stretch">
|
<ListView Name="TransactionHistoryListView" Grid.Row="2" ItemsSource="{Binding TransactionHistoryListViewItemSource}" SelectedItem="{Binding TransactionHistoryListViewSelectedItem}" HorizontalContentAlignment="Stretch">
|
||||||
<ListView.View>
|
<ListView.View>
|
||||||
<GridView>
|
<GridView>
|
||||||
@@ -115,7 +144,7 @@
|
|||||||
</DataTemplate>
|
</DataTemplate>
|
||||||
</GridViewColumn.CellTemplate>
|
</GridViewColumn.CellTemplate>
|
||||||
</GridViewColumn>
|
</GridViewColumn>
|
||||||
<GridViewColumn DisplayMemberBinding="{Binding Description}" Width="Auto" Header="Description" />
|
<GridViewColumn DisplayMemberBinding="{Binding Description}" Width="357" Header="Description" />
|
||||||
</GridView>
|
</GridView>
|
||||||
</ListView.View>
|
</ListView.View>
|
||||||
<ListBox.Resources>
|
<ListBox.Resources>
|
||||||
|
|||||||
@@ -1,5 +1,4 @@
|
|||||||
using System;
|
using System.Windows;
|
||||||
using System.Windows;
|
|
||||||
using System.Windows.Input;
|
using System.Windows.Input;
|
||||||
|
|
||||||
namespace DebtMgr.View
|
namespace DebtMgr.View
|
||||||
@@ -40,10 +39,10 @@ namespace DebtMgr.View
|
|||||||
if (App.Locator.MainView.DeletePersonContextMenuCommand.CanExecute(null))
|
if (App.Locator.MainView.DeletePersonContextMenuCommand.CanExecute(null))
|
||||||
App.Locator.MainView.DeletePersonContextMenuCommand.Execute(null);
|
App.Locator.MainView.DeletePersonContextMenuCommand.Execute(null);
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
#endregion
|
#endregion
|
||||||
|
|
||||||
#region TransactionHistoryListViewOnKeyUp()
|
#region TransactionHistoryListViewOnKeyUp()
|
||||||
|
|
||||||
////////////////////////////////////////////////////////////////////////////////////////////////////
|
////////////////////////////////////////////////////////////////////////////////////////////////////
|
||||||
|
|||||||
@@ -42,6 +42,28 @@ namespace DebtMgr.ViewModel.Dialogs
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#endregion
|
||||||
|
#region WindowIcon (string) Property
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Privater Teil von <see cref="WindowIcon" />
|
||||||
|
/// </summary>
|
||||||
|
private string _windowIcon;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Comment
|
||||||
|
///</summary>
|
||||||
|
public string WindowIcon
|
||||||
|
{
|
||||||
|
get { return _windowIcon; }
|
||||||
|
|
||||||
|
set
|
||||||
|
{
|
||||||
|
_windowIcon = value;
|
||||||
|
RaisePropertyChanged(() => WindowIcon);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
#endregion
|
#endregion
|
||||||
|
|
||||||
#region AmountTextBoxText (string) Property
|
#region AmountTextBoxText (string) Property
|
||||||
@@ -269,11 +291,13 @@ namespace DebtMgr.ViewModel.Dialogs
|
|||||||
if (DialogMode == TransactionType.Deposit)
|
if (DialogMode == TransactionType.Deposit)
|
||||||
{
|
{
|
||||||
WindowTitle = "Add Deposit";
|
WindowTitle = "Add Deposit";
|
||||||
|
WindowIcon = "../../Content/money_green.ico";
|
||||||
}
|
}
|
||||||
|
|
||||||
if (DialogMode == TransactionType.Charge)
|
if (DialogMode == TransactionType.Charge)
|
||||||
{
|
{
|
||||||
WindowTitle = "Add Charge";
|
WindowTitle = "Add Charge";
|
||||||
|
WindowIcon = "../../Content/money_red.ico";
|
||||||
}
|
}
|
||||||
|
|
||||||
PersonComboBoxSelectedItem =
|
PersonComboBoxSelectedItem =
|
||||||
|
|||||||
@@ -44,6 +44,29 @@ namespace DebtMgr.ViewModel.Dialogs
|
|||||||
}
|
}
|
||||||
|
|
||||||
#endregion
|
#endregion
|
||||||
|
#region WindowIcon (string) Property
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Privater Teil von <see cref="WindowIcon" />
|
||||||
|
/// </summary>
|
||||||
|
private string _windowIcon;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Comment
|
||||||
|
///</summary>
|
||||||
|
public string WindowIcon
|
||||||
|
{
|
||||||
|
get { return _windowIcon; }
|
||||||
|
|
||||||
|
set
|
||||||
|
{
|
||||||
|
_windowIcon = value;
|
||||||
|
RaisePropertyChanged(() => WindowIcon);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
#endregion
|
||||||
|
|
||||||
#region AmountTextBoxText (string) Property
|
#region AmountTextBoxText (string) Property
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
@@ -215,9 +238,15 @@ namespace DebtMgr.ViewModel.Dialogs
|
|||||||
DatePickerSelectedDate = _transaction.Time;
|
DatePickerSelectedDate = _transaction.Time;
|
||||||
|
|
||||||
if (_transaction.Type == TransactionType.Charge)
|
if (_transaction.Type == TransactionType.Charge)
|
||||||
|
{
|
||||||
WindowTitle = "Edit Charge";
|
WindowTitle = "Edit Charge";
|
||||||
|
WindowIcon = "../../Content/money_red.ico";
|
||||||
|
}
|
||||||
else if (_transaction.Type == TransactionType.Deposit)
|
else if (_transaction.Type == TransactionType.Deposit)
|
||||||
|
{
|
||||||
WindowTitle = "Edit Deposit";
|
WindowTitle = "Edit Deposit";
|
||||||
|
WindowIcon = "../../Content/money_green.ico";
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
#endregion
|
#endregion
|
||||||
|
|||||||
Reference in New Issue
Block a user