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>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup>
|
||||
<ApplicationIcon>Content\icon.ico</ApplicationIcon>
|
||||
<ApplicationIcon>Content\money_green.ico</ApplicationIcon>
|
||||
</PropertyGroup>
|
||||
<ItemGroup>
|
||||
<Reference Include="Costura, Version=1.6.2.0, Culture=neutral, PublicKeyToken=9919ef960d84173d, processorArchitecture=MSIL">
|
||||
@@ -201,6 +201,10 @@
|
||||
<ItemGroup>
|
||||
<None Include="FodyWeavers.xml" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Resource Include="Content\money_green.ico" />
|
||||
<Resource Include="Content\money_red.ico" />
|
||||
</ItemGroup>
|
||||
<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')" />
|
||||
<Target Name="EnsureNuGetPackageBuildImports" BeforeTargets="PrepareForBuild">
|
||||
|
||||
@@ -5,7 +5,7 @@
|
||||
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
|
||||
xmlns:c="clr-namespace:CurrencyTextBoxControl;assembly=CurrencyTextBoxControl"
|
||||
mc:Ignorable="d"
|
||||
Icon="../../Content/moneybag.ico"
|
||||
Icon="{Binding WindowIcon}"
|
||||
Name="AddTransactionViewWindow"
|
||||
Title="{Binding WindowTitle}" Height="300" Width="300"
|
||||
KeyUp="Window_OnKeyUp">
|
||||
|
||||
@@ -1,6 +1,5 @@
|
||||
using DebtMgr.Extensions;
|
||||
using System.Windows;
|
||||
using System.Windows.Controls;
|
||||
using System.Windows.Input;
|
||||
using DebtMgr.Model;
|
||||
|
||||
@@ -25,6 +24,10 @@ namespace DebtMgr.View.Dialogs
|
||||
App.Locator.AddTransactionView.RequestClose += (s, e) => Close();
|
||||
|
||||
DataContext = App.Locator.AddTransactionView;
|
||||
|
||||
//Uri iconUri = new Uri("pack://application:,,,/Content/money_red.ico", UriKind.RelativeOrAbsolute);
|
||||
|
||||
//this.Icon = BitmapFrame.Create(iconUri);
|
||||
}
|
||||
|
||||
#region TextBox_OnKeyUp()
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
xmlns:local="clr-namespace:DebtMgr.View.Dialogs"
|
||||
xmlns:currencyTextBoxControl="clr-namespace:CurrencyTextBoxControl;assembly=CurrencyTextBoxControl"
|
||||
mc:Ignorable="d"
|
||||
Icon="../../Content/moneybag.ico"
|
||||
Icon="{Binding WindowIcon}"
|
||||
Name="EditTransactionViewWindow"
|
||||
Title="{Binding WindowTitle}" Height="300" Width="300"
|
||||
KeyUp="Window_KeyUp">
|
||||
|
||||
@@ -5,8 +5,8 @@
|
||||
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
|
||||
xmlns:converters="clr-namespace:DebtMgr.Converters"
|
||||
mc:Ignorable="d"
|
||||
Icon="../Content/icon.ico"
|
||||
Title="Debt Manager" Height="600" Width="900">
|
||||
Icon="../Content/money_green.ico"
|
||||
Title="Debt Manager" Height="600" MinHeight="600" Width="900" MinWidth="900">
|
||||
<Window.Resources>
|
||||
<converters:AmountToColorConverter x:Key="AmountToColorConverter" />
|
||||
<Style TargetType="ListViewItem">
|
||||
@@ -34,6 +34,7 @@
|
||||
<Grid Grid.Row="1">
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="2*"></ColumnDefinition>
|
||||
<ColumnDefinition Width="Auto"></ColumnDefinition>
|
||||
<ColumnDefinition Width="3*"></ColumnDefinition>
|
||||
</Grid.ColumnDefinitions>
|
||||
<!-- #region PersonListView -->
|
||||
@@ -45,11 +46,21 @@
|
||||
<RowDefinition Height="*"></RowDefinition>
|
||||
</Grid.RowDefinitions>
|
||||
<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">
|
||||
<TextBlock Text="Overall Balance:"></TextBlock>
|
||||
<TextBlock Text="{Binding OverallBalanceLabel}" Foreground="{Binding OverallBalanceLabel, Converter={StaticResource AmountToColorConverter}}"></TextBlock>
|
||||
<TextBlock Text="€" Foreground="{Binding OverallBalanceLabel, Converter={StaticResource AmountToColorConverter}}"></TextBlock>
|
||||
</TextBlock>
|
||||
<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="{Binding OverallBalanceLabel}" Foreground="{Binding OverallBalanceLabel, Converter={StaticResource AmountToColorConverter}}"></TextBlock>
|
||||
<TextBlock Text="€" Foreground="{Binding OverallBalanceLabel, Converter={StaticResource AmountToColorConverter}}"></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.View>
|
||||
<GridView>
|
||||
@@ -84,7 +95,12 @@
|
||||
</Grid>
|
||||
|
||||
<!-- #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>
|
||||
<RowDefinition Height="Auto"></RowDefinition>
|
||||
<RowDefinition Height="Auto"></RowDefinition>
|
||||
@@ -94,11 +110,24 @@
|
||||
<ColumnDefinition Width="*"></ColumnDefinition>
|
||||
</Grid.ColumnDefinitions>
|
||||
<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">
|
||||
<TextBlock Text="Balance:"></TextBlock>
|
||||
<TextBlock Text="{Binding DetailViewBalanceLabel}" Foreground="{Binding DetailViewBalanceLabel, Converter={StaticResource AmountToColorConverter}}"></TextBlock>
|
||||
<TextBlock Text="€" Foreground="{Binding DetailViewBalanceLabel, Converter={StaticResource AmountToColorConverter}}"></TextBlock>
|
||||
</TextBlock>
|
||||
<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="{Binding DetailViewBalanceLabel}" Foreground="{Binding DetailViewBalanceLabel, Converter={StaticResource AmountToColorConverter}}"></TextBlock>
|
||||
<TextBlock Text="€" Foreground="{Binding DetailViewBalanceLabel, Converter={StaticResource AmountToColorConverter}}"></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.View>
|
||||
<GridView>
|
||||
@@ -115,7 +144,7 @@
|
||||
</DataTemplate>
|
||||
</GridViewColumn.CellTemplate>
|
||||
</GridViewColumn>
|
||||
<GridViewColumn DisplayMemberBinding="{Binding Description}" Width="Auto" Header="Description" />
|
||||
<GridViewColumn DisplayMemberBinding="{Binding Description}" Width="357" Header="Description" />
|
||||
</GridView>
|
||||
</ListView.View>
|
||||
<ListBox.Resources>
|
||||
|
||||
@@ -1,5 +1,4 @@
|
||||
using System;
|
||||
using System.Windows;
|
||||
using System.Windows;
|
||||
using System.Windows.Input;
|
||||
|
||||
namespace DebtMgr.View
|
||||
@@ -40,10 +39,10 @@ namespace DebtMgr.View
|
||||
if (App.Locator.MainView.DeletePersonContextMenuCommand.CanExecute(null))
|
||||
App.Locator.MainView.DeletePersonContextMenuCommand.Execute(null);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
#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
|
||||
|
||||
#region AmountTextBoxText (string) Property
|
||||
@@ -269,11 +291,13 @@ namespace DebtMgr.ViewModel.Dialogs
|
||||
if (DialogMode == TransactionType.Deposit)
|
||||
{
|
||||
WindowTitle = "Add Deposit";
|
||||
WindowIcon = "../../Content/money_green.ico";
|
||||
}
|
||||
|
||||
if (DialogMode == TransactionType.Charge)
|
||||
{
|
||||
WindowTitle = "Add Charge";
|
||||
WindowIcon = "../../Content/money_red.ico";
|
||||
}
|
||||
|
||||
PersonComboBoxSelectedItem =
|
||||
|
||||
@@ -44,6 +44,29 @@ 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
|
||||
|
||||
#region AmountTextBoxText (string) Property
|
||||
|
||||
/// <summary>
|
||||
@@ -215,9 +238,15 @@ namespace DebtMgr.ViewModel.Dialogs
|
||||
DatePickerSelectedDate = _transaction.Time;
|
||||
|
||||
if (_transaction.Type == TransactionType.Charge)
|
||||
{
|
||||
WindowTitle = "Edit Charge";
|
||||
WindowIcon = "../../Content/money_red.ico";
|
||||
}
|
||||
else if (_transaction.Type == TransactionType.Deposit)
|
||||
{
|
||||
WindowTitle = "Edit Deposit";
|
||||
WindowIcon = "../../Content/money_green.ico";
|
||||
}
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
Reference in New Issue
Block a user