tasks 39, 42, 52, 53
This commit is contained in:
parent
efd2ea76cf
commit
cc3e4b5052
63
Magazyn_Client/.gitattributes
vendored
Normal file
63
Magazyn_Client/.gitattributes
vendored
Normal file
@ -0,0 +1,63 @@
|
|||||||
|
###############################################################################
|
||||||
|
# Set default behavior to automatically normalize line endings.
|
||||||
|
###############################################################################
|
||||||
|
* text=auto
|
||||||
|
|
||||||
|
###############################################################################
|
||||||
|
# Set default behavior for command prompt diff.
|
||||||
|
#
|
||||||
|
# This is need for earlier builds of msysgit that does not have it on by
|
||||||
|
# default for csharp files.
|
||||||
|
# Note: This is only used by command line
|
||||||
|
###############################################################################
|
||||||
|
#*.cs diff=csharp
|
||||||
|
|
||||||
|
###############################################################################
|
||||||
|
# Set the merge driver for project and solution files
|
||||||
|
#
|
||||||
|
# Merging from the command prompt will add diff markers to the files if there
|
||||||
|
# are conflicts (Merging from VS is not affected by the settings below, in VS
|
||||||
|
# the diff markers are never inserted). Diff markers may cause the following
|
||||||
|
# file extensions to fail to load in VS. An alternative would be to treat
|
||||||
|
# these files as binary and thus will always conflict and require user
|
||||||
|
# intervention with every merge. To do so, just uncomment the entries below
|
||||||
|
###############################################################################
|
||||||
|
#*.sln merge=binary
|
||||||
|
#*.csproj merge=binary
|
||||||
|
#*.vbproj merge=binary
|
||||||
|
#*.vcxproj merge=binary
|
||||||
|
#*.vcproj merge=binary
|
||||||
|
#*.dbproj merge=binary
|
||||||
|
#*.fsproj merge=binary
|
||||||
|
#*.lsproj merge=binary
|
||||||
|
#*.wixproj merge=binary
|
||||||
|
#*.modelproj merge=binary
|
||||||
|
#*.sqlproj merge=binary
|
||||||
|
#*.wwaproj merge=binary
|
||||||
|
|
||||||
|
###############################################################################
|
||||||
|
# behavior for image files
|
||||||
|
#
|
||||||
|
# image files are treated as binary by default.
|
||||||
|
###############################################################################
|
||||||
|
#*.jpg binary
|
||||||
|
#*.png binary
|
||||||
|
#*.gif binary
|
||||||
|
|
||||||
|
###############################################################################
|
||||||
|
# diff behavior for common document formats
|
||||||
|
#
|
||||||
|
# Convert binary document formats to text before diffing them. This feature
|
||||||
|
# is only available from the command line. Turn it on by uncommenting the
|
||||||
|
# entries below.
|
||||||
|
###############################################################################
|
||||||
|
#*.doc diff=astextplain
|
||||||
|
#*.DOC diff=astextplain
|
||||||
|
#*.docx diff=astextplain
|
||||||
|
#*.DOCX diff=astextplain
|
||||||
|
#*.dot diff=astextplain
|
||||||
|
#*.DOT diff=astextplain
|
||||||
|
#*.pdf diff=astextplain
|
||||||
|
#*.PDF diff=astextplain
|
||||||
|
#*.rtf diff=astextplain
|
||||||
|
#*.RTF diff=astextplain
|
@ -6,11 +6,11 @@
|
|||||||
<Application.Resources>
|
<Application.Resources>
|
||||||
<ResourceDictionary>
|
<ResourceDictionary>
|
||||||
<ResourceDictionary.MergedDictionaries>
|
<ResourceDictionary.MergedDictionaries>
|
||||||
<ResourceDictionary Source="pack://application:,,,/MaterialDesignThemes.Wpf;component/Themes/MaterialDesignTheme.Light.xaml" />
|
<ResourceDictionary Source="pack://application:,,,/MaterialDesignThemes.Wpf;component/Themes/MaterialDesignTheme.Light.xaml" />
|
||||||
<ResourceDictionary Source="pack://application:,,,/MaterialDesignThemes.Wpf;component/Themes/MaterialDesignTheme.Defaults.xaml" />
|
<ResourceDictionary Source="pack://application:,,,/MaterialDesignThemes.Wpf;component/Themes/MaterialDesignTheme.Defaults.xaml" />
|
||||||
<ResourceDictionary Source="pack://application:,,,/MaterialDesignColors;component/Themes/Recommended/Primary/MaterialDesignColor.Teal.xaml" />
|
<ResourceDictionary Source="pack://application:,,,/MaterialDesignColors;component/Themes/Recommended/Primary/MaterialDesignColor.Blue.xaml" />
|
||||||
<ResourceDictionary Source="pack://application:,,,/MaterialDesignColors;component/Themes/Recommended/Accent/MaterialDesignColor.Lime.xaml" />
|
<ResourceDictionary Source="pack://application:,,,/MaterialDesignColors;component/Themes/Recommended/Accent/MaterialDesignColor.Cyan.xaml" />
|
||||||
</ResourceDictionary.MergedDictionaries>
|
</ResourceDictionary.MergedDictionaries>
|
||||||
</ResourceDictionary>
|
</ResourceDictionary>
|
||||||
</Application.Resources>
|
</Application.Resources>
|
||||||
</Application>
|
</Application>
|
||||||
|
@ -73,6 +73,12 @@
|
|||||||
<Compile Include="Windows\AmountWindow.xaml.cs">
|
<Compile Include="Windows\AmountWindow.xaml.cs">
|
||||||
<DependentUpon>AmountWindow.xaml</DependentUpon>
|
<DependentUpon>AmountWindow.xaml</DependentUpon>
|
||||||
</Compile>
|
</Compile>
|
||||||
|
<Compile Include="Windows\ErrorWindow.xaml.cs">
|
||||||
|
<DependentUpon>ErrorWindow.xaml</DependentUpon>
|
||||||
|
</Compile>
|
||||||
|
<Compile Include="Windows\ValueWindow.xaml.cs">
|
||||||
|
<DependentUpon>ValueWindow.xaml</DependentUpon>
|
||||||
|
</Compile>
|
||||||
<Page Include="MainWindow.xaml">
|
<Page Include="MainWindow.xaml">
|
||||||
<Generator>MSBuild:Compile</Generator>
|
<Generator>MSBuild:Compile</Generator>
|
||||||
<SubType>Designer</SubType>
|
<SubType>Designer</SubType>
|
||||||
@ -93,6 +99,14 @@
|
|||||||
<SubType>Designer</SubType>
|
<SubType>Designer</SubType>
|
||||||
<Generator>MSBuild:Compile</Generator>
|
<Generator>MSBuild:Compile</Generator>
|
||||||
</Page>
|
</Page>
|
||||||
|
<Page Include="Windows\ErrorWindow.xaml">
|
||||||
|
<SubType>Designer</SubType>
|
||||||
|
<Generator>MSBuild:Compile</Generator>
|
||||||
|
</Page>
|
||||||
|
<Page Include="Windows\ValueWindow.xaml">
|
||||||
|
<SubType>Designer</SubType>
|
||||||
|
<Generator>MSBuild:Compile</Generator>
|
||||||
|
</Page>
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<Compile Include="Properties\AssemblyInfo.cs">
|
<Compile Include="Properties\AssemblyInfo.cs">
|
||||||
|
@ -1,71 +1,43 @@
|
|||||||
<!--<Window x:Class="Magazyn.MainWindow"
|
|
||||||
Name ="main"
|
|
||||||
xmlns:materialDesign="http://materialdesigninxaml.net/winfx/xaml/themes"
|
|
||||||
TextElement.Foreground="{DynamicResource MaterialDesignBody}"
|
|
||||||
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
|
||||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
|
||||||
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
|
|
||||||
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
|
|
||||||
xmlns:local="clr-namespace:Magazyn"
|
|
||||||
mc:Ignorable="d"
|
|
||||||
ResizeMode="NoResize"
|
|
||||||
WindowStartupLocation="CenterScreen"
|
|
||||||
Title="Fruit Warehouse" Height="469.85" Width="837.599">
|
|
||||||
|
|
||||||
<Grid>
|
|
||||||
<ListBox x:Name="fruitList" Margin="10,99,10.666,69.667" Grid.ColumnSpan="3"/>
|
|
||||||
--><!--<ListBox.ItemTemplate>
|
|
||||||
<DataTemplate>
|
|
||||||
<Grid>
|
|
||||||
<Grid.ColumnDefinitions>
|
|
||||||
<ColumnDefinition Width="Auto" SharedSizeGroup="Name"/>
|
|
||||||
<ColumnDefinition Width="Auto" SharedSizeGroup="Quantity"/>
|
|
||||||
<ColumnDefinition Width="Auto" SharedSizeGroup="Price / 1 pc."/>
|
|
||||||
<ColumnDefinition Width="Auto" SharedSizeGroup="Overall price"/>
|
|
||||||
</Grid.ColumnDefinitions>
|
|
||||||
<TextBlock Grid.Column="0" Text="{Binding ...}"/>
|
|
||||||
</Grid>
|
|
||||||
</DataTemplate>
|
|
||||||
</ListBox.ItemTemplate>--><!--
|
|
||||||
<Button Name="sum" Content="Wartość Magazynu" Margin="0,0,9.666,9.667" Height="35" Background="Teal" Click="Button_Click_1" HorizontalAlignment="Right" Width="164" VerticalAlignment="Bottom" Grid.ColumnSpan="2" Grid.Column="1"/>
|
|
||||||
<ProgressBar Name="loadingContent" HorizontalAlignment="Right" Height="10" Margin="0,0,10.666,54.667" Width="100" VerticalAlignment="Bottom" Grid.ColumnSpan="2" Grid.Column="1"/>
|
|
||||||
<Label Content="Fruit list:" FontWeight="Bold" HorizontalAlignment="Left" Margin="10,4,0,0" VerticalAlignment="Top" Width="100"/>
|
|
||||||
<Grid Height="64" Margin="0,0,-0.334,346.667" VerticalAlignment="Bottom" HorizontalAlignment="Right" Width="831" Grid.ColumnSpan="3" >
|
|
||||||
<Grid.ColumnDefinitions>
|
|
||||||
<ColumnDefinition Width="128*"/>
|
|
||||||
<ColumnDefinition Width="149*"/>
|
|
||||||
</Grid.ColumnDefinitions>
|
|
||||||
<TextBlock HorizontalAlignment="Left" Margin="125,28,0,0" VerticalAlignment="Top" Name="fruitName" TextWrapping="Wrap" Text="NAZWA" Width="116" FontSize="16" FontWeight="Bold" FontFamily="Segoe UI Black"/>
|
|
||||||
<TextBlock x:Name="fruitQuantity" Margin="280,28,0,17" HorizontalAlignment="Left" TextWrapping="Wrap" Text="LICZBA" Width="137" FontSize="16" FontWeight="Bold" FontFamily="Segoe UI Black" Grid.ColumnSpan="2"/>
|
|
||||||
<TextBlock Name="fruitPrice" Margin="54,28,235.333,0" Text="CENA / 1 SZT." VerticalAlignment="Top" IsEnabled="False" Height="20" FontSize="16" FontWeight="Bold" FontFamily="Segoe UI Black" Grid.Column="1"/>
|
|
||||||
<TextBlock x:Name="allPrice" Margin="217,28,37.333,0" Text="CENA / ŁĄCZNIE" VerticalAlignment="Top" Height="19" FontSize="16" FontWeight="Bold" FontFamily="Segoe UI Black" Grid.Column="1"/>
|
|
||||||
|
|
||||||
|
|
||||||
</Grid>
|
|
||||||
|
|
||||||
|
|
||||||
</Grid>
|
|
||||||
</Window>-->
|
|
||||||
|
|
||||||
<Window x:Class="Magazyn.MainWindow"
|
<Window x:Class="Magazyn.MainWindow"
|
||||||
xmlns:materialDesign="http://materialdesigninxaml.net/winfx/xaml/themes"
|
|
||||||
TextElement.Foreground="{DynamicResource MaterialDesignBody}"
|
xmlns:materialDesign="http://materialdesigninxaml.net/winfx/xaml/themes"
|
||||||
|
TextElement.Foreground="{DynamicResource MaterialDesignBody}"
|
||||||
|
TextElement.FontWeight="Regular"
|
||||||
|
TextElement.FontSize="13"
|
||||||
|
TextOptions.TextFormattingMode="Ideal"
|
||||||
|
TextOptions.TextRenderingMode="Auto"
|
||||||
|
Background="{DynamicResource MaterialDesignPaper}"
|
||||||
|
FontFamily="{DynamicResource MaterialDesignFont}"
|
||||||
|
|
||||||
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
||||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||||
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
|
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
|
||||||
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
|
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
|
||||||
xmlns:local="clr-namespace:Magazyn"
|
xmlns:local="clr-namespace:Magazyn"
|
||||||
mc:Ignorable="d"
|
mc:Ignorable="d"
|
||||||
Title="Magazyn Owoców
|
WindowStartupLocation="CenterScreen"
|
||||||
" Height="400" Width="520">
|
Title="Magazyn Owoców" Height="550" MaxWidth="590" MinWidth="590" Width="590" SizeChanged="Window_SizeChanged">
|
||||||
<Grid>
|
<Grid>
|
||||||
<ListBox x:Name="fruitList" Margin="10,35,10,0" Height="239" VerticalAlignment="Top"/>
|
<ListBox x:Name="fruitList" Margin="10,74,10.333,88.667"/>
|
||||||
|
<Grid Margin="0,21,-0.667,451.667" HorizontalAlignment="Right" Width="584" >
|
||||||
<Button Name="sum" Content="Wartość magazynu
|
<Grid.ColumnDefinitions>
|
||||||
" HorizontalAlignment="Left" Margin="325,0,0,46" VerticalAlignment="Bottom" Width="163" Height="35" Background="Teal" Click="Button_Click_1"/>
|
<ColumnDefinition Width="92*"/>
|
||||||
<ProgressBar Name="loadingContent" HorizontalAlignment="Left" Height="10" Margin="213,295,0,0" VerticalAlignment="Top" Width="100"/>
|
<ColumnDefinition Width="135*"/>
|
||||||
|
<ColumnDefinition Width="166*"/>
|
||||||
|
<ColumnDefinition Width="96*"/>
|
||||||
|
<ColumnDefinition Width="95*"/>
|
||||||
|
</Grid.ColumnDefinitions>
|
||||||
|
<TextBlock Grid.Column="0" FontSize="10" FontWeight="Bold" FontFamily="Segoe UI Black" TextAlignment="Center" Margin="0,14,7,14" />
|
||||||
|
<TextBlock Grid.Column="1" Text="NAZWA" FontSize="10" FontWeight="Bold" FontFamily="Segoe UI Black" TextAlignment="Center" Margin="8,14,7.667,14" />
|
||||||
|
<TextBlock Grid.Column="2" Text="LICZBA" FontSize="10" FontWeight="Bold" FontFamily="Segoe UI Black" TextAlignment="Center" Margin="1.333,14,3.667,14" />
|
||||||
|
<TextBlock Grid.Column="3" Text="1 SZT." FontSize="10" FontWeight="Bold" FontFamily="Segoe UI Black" TextAlignment="Center" Margin="4.333,14,10.667,14" />
|
||||||
|
<TextBlock Grid.Column="3" Text="ŁĄCZNIE" FontSize="10" FontWeight="Bold" FontFamily="Segoe UI Black" TextAlignment="Center" Margin="68.333,14,0,14" Grid.ColumnSpan="2" />
|
||||||
|
</Grid>
|
||||||
|
<Button Name="sum" Content="Wartość magazynu" Margin="0,0,10,10" VerticalAlignment="Bottom" Height="35" Click="Value_Click" HorizontalAlignment="Right" Width="163"/>
|
||||||
<Label Content="Lista owoców:" FontWeight="Bold" HorizontalAlignment="Left" Margin="10,4,0,0" VerticalAlignment="Top" Width="100"/>
|
<Label Content="Lista owoców:" FontWeight="Bold" HorizontalAlignment="Left" Margin="10,4,0,0" VerticalAlignment="Top" Width="100"/>
|
||||||
|
<Button x:Name="prevButton" Content="Poprzednia" HorizontalAlignment="Left" Margin="10,0,0,52" VerticalAlignment="Bottom" Width="105" Click="prevButton_Click"/>
|
||||||
|
<Button x:Name="nextButton" Content="Następna" HorizontalAlignment="Right" Margin="0,0,10,52" VerticalAlignment="Bottom" Width="105" Click="nextButton_Click"/>
|
||||||
|
|
||||||
</Grid>
|
</Grid>
|
||||||
</Window>
|
</Window>
|
||||||
|
|
||||||
|
@ -16,25 +16,32 @@ using System.Windows.Media.Imaging;
|
|||||||
using System.Windows.Navigation;
|
using System.Windows.Navigation;
|
||||||
using System.Windows.Shapes;
|
using System.Windows.Shapes;
|
||||||
using Newtonsoft.Json;
|
using Newtonsoft.Json;
|
||||||
|
using Newtonsoft.Json.Linq;
|
||||||
|
|
||||||
|
using System.Net;
|
||||||
|
using Magazyn.Windows;
|
||||||
|
|
||||||
namespace Magazyn
|
namespace Magazyn
|
||||||
{
|
{
|
||||||
|
|
||||||
public partial class MainWindow : Window
|
public partial class MainWindow : Window
|
||||||
{
|
{
|
||||||
|
public int size = 4;
|
||||||
|
public int page = 0;
|
||||||
|
|
||||||
|
bool firstPage;
|
||||||
|
bool lastPage;
|
||||||
|
|
||||||
HttpClient client;
|
HttpClient client;
|
||||||
|
|
||||||
public MainWindow()
|
public MainWindow()
|
||||||
{
|
{
|
||||||
InitializeComponent();
|
InitializeComponent();
|
||||||
loadingContent.IsIndeterminate = true;
|
this.Initialized += MainWindow_Initialized; ;
|
||||||
|
|
||||||
client = new HttpClient();
|
client = new HttpClient();
|
||||||
RefreshListOfFruits();
|
}
|
||||||
}
|
|
||||||
|
|
||||||
private void Button_Click(object sender, RoutedEventArgs e)
|
private void MainWindow_Initialized(object sender, EventArgs e)
|
||||||
{
|
{
|
||||||
RefreshListOfFruits();
|
RefreshListOfFruits();
|
||||||
}
|
}
|
||||||
@ -44,42 +51,72 @@ namespace Magazyn
|
|||||||
string json = "{\"id\": " + fruit.Id.ToString() + ", \"change\": " + amountChanged.ToString() + " }";
|
string json = "{\"id\": " + fruit.Id.ToString() + ", \"change\": " + amountChanged.ToString() + " }";
|
||||||
|
|
||||||
Task<HttpResponseMessage> response = client.PostAsync("https://sysmag.herokuapp.com/api/product/change-quantity", new StringContent(json, Encoding.UTF8, "application/json"));
|
Task<HttpResponseMessage> response = client.PostAsync("https://sysmag.herokuapp.com/api/product/change-quantity", new StringContent(json, Encoding.UTF8, "application/json"));
|
||||||
while (response.IsCompleted != true)
|
while (response.IsCompleted != true) ;
|
||||||
{
|
|
||||||
RefreshListOfFruits();
|
|
||||||
}
|
|
||||||
|
|
||||||
|
if (response.Result.StatusCode == HttpStatusCode.BadRequest)
|
||||||
|
{
|
||||||
|
JObject data = JObject.Parse(response.Result.Content.ReadAsStringAsync().Result.ToString());
|
||||||
|
|
||||||
|
ErrorWindow window;
|
||||||
|
|
||||||
|
if (data["message"].ToString().Contains("Too low"))
|
||||||
|
{
|
||||||
|
window = new ErrorWindow("Wystąpił błąd niedomiaru. Próbujesz usunąć więcej owoców niż masz w magazynie.");
|
||||||
|
}
|
||||||
|
else if (data["message"].ToString().Contains("Over max"))
|
||||||
|
{
|
||||||
|
window = new ErrorWindow("Wystąpił błąd nadmiaru. Próbujesz dodać więcej owoców niż pomieści magazyn.");
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
window = new ErrorWindow("Nieznany błąd.");
|
||||||
|
}
|
||||||
|
window.Owner = this;
|
||||||
|
window.ShowDialog();
|
||||||
|
}
|
||||||
|
|
||||||
|
RefreshListOfFruits();
|
||||||
}
|
}
|
||||||
|
|
||||||
private void RefreshListOfFruits()
|
private void RefreshListOfFruits()
|
||||||
{
|
{
|
||||||
loadingContent.Visibility = Visibility.Visible;
|
|
||||||
loadingContent.IsIndeterminate = true;
|
|
||||||
Task<HttpResponseMessage> response = client.GetAsync("https://sysmag.herokuapp.com/api/get-all");
|
|
||||||
while (response.IsCompleted != true)
|
|
||||||
{
|
|
||||||
loadingContent.IsIndeterminate = false;
|
|
||||||
loadingContent.Visibility = Visibility.Hidden;
|
|
||||||
}
|
|
||||||
|
|
||||||
Fruit[] fruits = JsonConvert.DeserializeObject<Fruit[]>(response.Result.Content.ReadAsStringAsync().Result.ToString());
|
Task<HttpResponseMessage> response = client.GetAsync("https://sysmag.herokuapp.com/api/get-all?page=" + page.ToString() + "&size=" + size.ToString());
|
||||||
|
while (response.IsCompleted != true) ;
|
||||||
|
|
||||||
|
if (response.Result.StatusCode != HttpStatusCode.OK)
|
||||||
|
{
|
||||||
|
ErrorWindow window = new ErrorWindow("Nastąpił błąd połączenia z serwerem.");
|
||||||
|
window.Owner = this;
|
||||||
|
window.ShowDialog();
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
string responseString = response.Result.Content.ReadAsStringAsync().Result;
|
||||||
|
|
||||||
|
JObject replay = JObject.Parse(responseString);
|
||||||
|
|
||||||
|
firstPage = bool.Parse(replay["first"].ToString());
|
||||||
|
lastPage = bool.Parse(replay["last"].ToString());
|
||||||
|
|
||||||
|
Fruit[] fruits = JsonConvert.DeserializeObject<Fruit[]>(replay["content"].ToString());
|
||||||
|
|
||||||
UpdateListOfFruits(fruits);
|
UpdateListOfFruits(fruits);
|
||||||
}
|
}
|
||||||
|
|
||||||
private void UpdateListOfFruits(Fruit[] list)
|
private void UpdateListOfFruits(Fruit[] list)
|
||||||
{
|
{
|
||||||
fruitList.Items.Clear();
|
fruitList.Items.Clear();
|
||||||
|
|
||||||
foreach (Fruit item in list)
|
foreach (Fruit item in list)
|
||||||
{
|
{
|
||||||
FruitView fruitView = new FruitView(item);
|
FruitView fruitView = new FruitView(item);
|
||||||
fruitView.SaveChangingAmountOfFruits += FruitViewSaveChangingAmountOfFruits;
|
fruitView.SaveChangingAmountOfFruits += FruitViewSaveChangingAmountOfFruits;
|
||||||
fruitList.Items.Add(fruitView);
|
fruitList.Items.Add(fruitView);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
private WarehousePrice GetWarehousePrice()
|
private WarehousePrice GetWarehousePrice()
|
||||||
{
|
{
|
||||||
Task<HttpResponseMessage> response = client.GetAsync("https://sysmag.herokuapp.com/api/get-price-of-all");
|
Task<HttpResponseMessage> response = client.GetAsync("https://sysmag.herokuapp.com/api/get-price-of-all");
|
||||||
while (response.IsCompleted != true) ;
|
while (response.IsCompleted != true) ;
|
||||||
@ -89,13 +126,31 @@ namespace Magazyn
|
|||||||
return price;
|
return price;
|
||||||
}
|
}
|
||||||
|
|
||||||
private void Button_Click_1(object sender, RoutedEventArgs e)
|
private void Value_Click(object sender, RoutedEventArgs e)
|
||||||
{
|
{
|
||||||
|
ValueWindow window = new ValueWindow(GetWarehousePrice().Price);
|
||||||
|
window.Owner = this;
|
||||||
|
window.ShowDialog();
|
||||||
|
}
|
||||||
|
|
||||||
|
private void prevButton_Click(object sender, RoutedEventArgs e)
|
||||||
|
{
|
||||||
|
if (firstPage != true) page--;
|
||||||
|
RefreshListOfFruits();
|
||||||
|
}
|
||||||
|
|
||||||
MessageBox.Show("Wartość magazynu to: " + GetWarehousePrice().Price.ToString() + "zł", "Wartość magazynu" );
|
private void nextButton_Click(object sender, RoutedEventArgs e)
|
||||||
|
{
|
||||||
|
if (lastPage != true) page++;
|
||||||
|
RefreshListOfFruits();
|
||||||
|
}
|
||||||
|
|
||||||
|
private void Window_SizeChanged(object sender, SizeChangedEventArgs e)
|
||||||
|
{
|
||||||
|
Size size = e.NewSize;
|
||||||
|
double height = size.Height - 124;
|
||||||
|
this.size = (int)(height / 90);
|
||||||
|
RefreshListOfFruits();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ -6,21 +6,21 @@
|
|||||||
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
|
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
|
||||||
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
|
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
|
||||||
xmlns:local="clr-namespace:Magazyn.Views"
|
xmlns:local="clr-namespace:Magazyn.Views"
|
||||||
mc:Ignorable="d" Height="64" Width="782.692">
|
|
||||||
|
mc:Ignorable="d" Height="64" Width="575.45">
|
||||||
|
|
||||||
|
|
||||||
<!--<materialDesign:Card Height="64" Background="Teal">-->
|
<materialDesign:Card Background="{DynamicResource SecondaryAccentBrush}">
|
||||||
<Grid Height="64">
|
<Grid>
|
||||||
<Image Name="fruitImage" HorizontalAlignment="Left" Margin="10,10,0,7" Width="50"/>
|
<Image x:Name="fruitImage" HorizontalAlignment="Left" Margin="10,10,0,7" Width="50"/>
|
||||||
<TextBlock Name="fruitName" HorizontalAlignment="Left" Margin="73,28,0,0" TextWrapping="Wrap" Text="TextBlock" VerticalAlignment="Top" Width="116" TextAlignment="Center"/>
|
<TextBlock x:Name="fruitName" HorizontalAlignment="Left" Margin="80,26,0,0" TextWrapping="Wrap" Text="TextBlock" VerticalAlignment="Top" Width="113" TextAlignment="Center"/>
|
||||||
<Image Name="minusImage" HorizontalAlignment="Left" Height="24" Margin="240,25,0,0" VerticalAlignment="Top" Width="24" Source="/Images/minus.png" MouseDown="subButton_Click" />
|
<Image x:Name="minusImage" HorizontalAlignment="Left" Height="24" Margin="240,25,0,0" VerticalAlignment="Top" Width="24" Source="/Images/minus.png" MouseDown="subaddButton_Click" />
|
||||||
<Image Name="plusImage" HorizontalAlignment="Left" Height="24" Margin="304,25,0,0" VerticalAlignment="Top" Width="24" Source="/Magazyn;component/Images/plus.png" RenderTransformOrigin="0.208,0.521" MouseDown="addButton_Click"/>
|
<Image x:Name="plusImage" HorizontalAlignment="Left" Height="24" Margin="304,25,0,0" VerticalAlignment="Top" Width="24" Source="/Magazyn;component/Images/plus.png" RenderTransformOrigin="0.208,0.521" MouseDown="subaddButton_Click"/>
|
||||||
<TextBlock Name="fruitAmount" HorizontalAlignment="Left" Margin="267,29,0,19" Width="34" TextAlignment="Center" RenderTransformOrigin="0.489,-0.623"/>
|
<TextBlock x:Name="fruitAmount" HorizontalAlignment="Left" Margin="267,29,0,19" Width="34" TextAlignment="Center" RenderTransformOrigin="0.489,-0.623"/>
|
||||||
<TextBlock Name="fruitPrice" Margin="403,25,252.667,0" TextWrapping="Wrap" Text="TextBlock" VerticalAlignment="Top" IsEnabled="False" TextAlignment="Center"/>
|
<TextBlock x:Name="fruitPrice" Margin="355,29,112.333,0" TextWrapping="Wrap" Text="TextBlock" VerticalAlignment="Top" IsEnabled="False" TextAlignment="Center"/>
|
||||||
<TextBlock x:Name="allPrice" Margin="578,25,80.667,0" TextWrapping="Wrap" Text="TextBlock" VerticalAlignment="Top" TextAlignment="Center"/>
|
<TextBlock x:Name="allPrice" Margin="444,29,21.333,0" TextWrapping="Wrap" Text="TextBlock" VerticalAlignment="Top" TextAlignment="Center"/>
|
||||||
|
|
||||||
</Grid>
|
</Grid>
|
||||||
<!--</materialDesign:Card>-->
|
</materialDesign:Card>
|
||||||
|
|
||||||
|
|
||||||
</UserControl>
|
</UserControl>
|
||||||
|
@ -46,23 +46,16 @@ namespace Magazyn.Views
|
|||||||
}
|
}
|
||||||
catch (Exception ex)
|
catch (Exception ex)
|
||||||
{
|
{
|
||||||
|
MessageBox.Show(ex.Message);
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
private void subButton_Click(object sender, RoutedEventArgs e)
|
private void subaddButton_Click(object sender, RoutedEventArgs e)
|
||||||
{
|
{
|
||||||
AmountWindow window = new AmountWindow(fruit, -1, fruit.Quantity);
|
AmountWindow window = new AmountWindow(fruit, ((sender as Image).Name == "minusImage")?-1:1, fruit.Quantity);
|
||||||
window.SaveChangingAmountOfFruits += WindowSaveChangingAmountOfFruits;
|
window.SaveChangingAmountOfFruits += WindowSaveChangingAmountOfFruits;
|
||||||
window.ShowDialog();
|
window.Owner = Application.Current.MainWindow;
|
||||||
}
|
|
||||||
|
|
||||||
private void addButton_Click(object sender, RoutedEventArgs e)
|
|
||||||
{
|
|
||||||
|
|
||||||
AmountWindow window = new AmountWindow(fruit, 1, fruit.Quantity);
|
|
||||||
window.SaveChangingAmountOfFruits += WindowSaveChangingAmountOfFruits;
|
|
||||||
|
|
||||||
window.ShowDialog();
|
window.ShowDialog();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1,30 +1,21 @@
|
|||||||
<!--<Window x:Class="Magazyn.Windows.AmountWindow"
|
<Window x:Class="Magazyn.Windows.AmountWindow"
|
||||||
|
|
||||||
|
xmlns:materialDesign="http://materialdesigninxaml.net/winfx/xaml/themes"
|
||||||
|
TextElement.Foreground="{DynamicResource MaterialDesignBody}"
|
||||||
|
TextElement.FontWeight="Regular"
|
||||||
|
TextElement.FontSize="13"
|
||||||
|
TextOptions.TextFormattingMode="Ideal"
|
||||||
|
TextOptions.TextRenderingMode="Auto"
|
||||||
|
Background="{DynamicResource MaterialDesignPaper}"
|
||||||
|
FontFamily="{DynamicResource MaterialDesignFont}"
|
||||||
|
|
||||||
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
||||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||||
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
|
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
|
||||||
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
|
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
|
||||||
xmlns:local="clr-namespace:Magazyn.Windows"
|
xmlns:local="clr-namespace:Magazyn.Windows"
|
||||||
mc:Ignorable="d"
|
mc:Ignorable="d"
|
||||||
Title="Change Quantity" Height="205" Width="220"
|
Title="Magazyn" WindowStartupLocation="CenterOwner" Height="205" Width="220" ResizeMode="NoResize" Keyboard.KeyDown="Window_KeyDown">
|
||||||
WindowStartupLocation="CenterScreen"
|
|
||||||
ResizeMode="NoResize">
|
|
||||||
<Grid>
|
|
||||||
<TextBlock x:Name="fruitName" HorizontalAlignment="Left" Margin="10,82,0,0" TextWrapping="Wrap" Text="fruitName" Width="64" Height="16" VerticalAlignment="Top"/>
|
|
||||||
<TextBlock x:Name="messageBox" HorizontalAlignment="Left" Margin="80,10,0,0" TextWrapping="Wrap" Text="messageBox" VerticalAlignment="Top" Width="125" Height="64"/>
|
|
||||||
<TextBox x:Name="amountToChange" Margin="0,71,9,0" TextWrapping="Wrap" Text="0" RenderTransformOrigin="1.456,0.316" Height="32" VerticalAlignment="Top" HorizontalAlignment="Right" Width="64"/>
|
|
||||||
<Button x:Name="saveButton" Content="Zastosuj" Margin="105,122,0,0" VerticalAlignment="Top" Click="saveButton_Click" Width="90" HorizontalAlignment="Left"/>
|
|
||||||
<Button x:Name="cancelButton" Content="Anuluj" Margin="10,122,0,0" VerticalAlignment="Top" Click="cancelButton_Click" Width="90" HorizontalAlignment="Left" />
|
|
||||||
<Image x:Name="fruitImage" HorizontalAlignment="Left" Height="64" Margin="10,10,0,0" VerticalAlignment="Top" Width="64"/>
|
|
||||||
</Grid>
|
|
||||||
</Window>-->
|
|
||||||
<Window x:Class="Magazyn.Windows.AmountWindow"
|
|
||||||
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
|
||||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
|
||||||
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
|
|
||||||
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
|
|
||||||
xmlns:local="clr-namespace:Magazyn.Windows"
|
|
||||||
mc:Ignorable="d"
|
|
||||||
Title="Magazyn" Height="205" Width="220">
|
|
||||||
|
|
||||||
<Grid>
|
<Grid>
|
||||||
<TextBlock x:Name="fruitName" HorizontalAlignment="Left" Margin="10,82,0,0" TextWrapping="Wrap" Text="fruitName" Width="64" Height="16" VerticalAlignment="Top"/>
|
<TextBlock x:Name="fruitName" HorizontalAlignment="Left" Margin="10,82,0,0" TextWrapping="Wrap" Text="fruitName" Width="64" Height="16" VerticalAlignment="Top"/>
|
||||||
|
@ -18,13 +18,13 @@ namespace Magazyn.Windows
|
|||||||
/// <summary>
|
/// <summary>
|
||||||
/// Interaction logic for AmountWindow.xaml
|
/// Interaction logic for AmountWindow.xaml
|
||||||
/// </summary>
|
/// </summary>
|
||||||
///
|
///
|
||||||
|
|
||||||
public partial class AmountWindow : Window
|
public partial class AmountWindow : Window
|
||||||
{
|
{
|
||||||
Fruit fruit;
|
Fruit fruit;
|
||||||
int type;
|
int type;
|
||||||
int quantity;
|
int quantity;
|
||||||
|
|
||||||
public delegate void ChangingAmountOfFruits(int amountChanged);
|
public delegate void ChangingAmountOfFruits(int amountChanged);
|
||||||
public event ChangingAmountOfFruits SaveChangingAmountOfFruits;
|
public event ChangingAmountOfFruits SaveChangingAmountOfFruits;
|
||||||
@ -35,16 +35,16 @@ namespace Magazyn.Windows
|
|||||||
this.fruit = fruit;
|
this.fruit = fruit;
|
||||||
this.type = type;
|
this.type = type;
|
||||||
|
|
||||||
this.quantity = quantity;
|
this.quantity = quantity;
|
||||||
if (type == -1)
|
|
||||||
this.Title = "Zmniejsz ilość " + fruit.Name;
|
if (type == -1)
|
||||||
else
|
this.Title = "Zmniejsz ilość: " + fruit.Name;
|
||||||
this.Title = "Zwiększ ilość " + fruit.Name;
|
else
|
||||||
fruitName.Text = fruit.Name;
|
this.Title = "Zwiększ ilość: " + fruit.Name;
|
||||||
|
|
||||||
fruitName.Text = fruit.Name;
|
fruitName.Text = fruit.Name;
|
||||||
|
|
||||||
messageBox.Text = String.Format("Jaką ilość produktu chcesz {0} do magazynu?", (type > 0) ? "dodać":"odjąć");
|
messageBox.Text = String.Format("Jaką ilość produktu chcesz {0} do magazynu?", (type > 0) ? "dodać" : "odjąć");
|
||||||
|
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
@ -52,51 +52,48 @@ namespace Magazyn.Windows
|
|||||||
}
|
}
|
||||||
catch (Exception ex)
|
catch (Exception ex)
|
||||||
{
|
{
|
||||||
|
MessageBox.Show(ex.Message);
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
private void saveButton_Click(object sender, RoutedEventArgs e)
|
private void SendNewQuantity()
|
||||||
{
|
{
|
||||||
int amount = 0;
|
int amount = int.Parse(amountToChange.Text);
|
||||||
int maxAmount = 2500;
|
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
amount = int.Parse(amountToChange.Text);
|
if (amount < 0)
|
||||||
if (amount < 0)
|
{
|
||||||
{
|
ErrorWindow window = new ErrorWindow("Podana wartość jest nieprawidłowa, proszę podać wartość dodatnią.");
|
||||||
MessageBox.Show("Podana wartość jest nieprawidłowa, proszę podać wartość dodatnią", "Nieprawidłowa wartość", MessageBoxButton.OK, MessageBoxImage.Error);
|
window.Owner = Application.Current.MainWindow;
|
||||||
amountToChange.Text = "0";
|
window.ShowDialog();
|
||||||
return;
|
amountToChange.Text = "0";
|
||||||
}
|
return;
|
||||||
|
}
|
||||||
} catch (Exception ex) {
|
|
||||||
|
}
|
||||||
|
catch (Exception ex)
|
||||||
|
{
|
||||||
throw new NotImplementedException(ex.Message);
|
throw new NotImplementedException(ex.Message);
|
||||||
}
|
}
|
||||||
|
|
||||||
if ((quantity + amount > maxAmount) && amount >= 0 && type == 1)
|
SaveChangingAmountOfFruits.Invoke((type > 0) ? amount : -amount);
|
||||||
{
|
this.Close();
|
||||||
MessageBox.Show("Przepełnienie magazynu", "Przepełnienie, maksymalnie 2500 sztuk", MessageBoxButton.OK, MessageBoxImage.Error);
|
}
|
||||||
amountToChange.Text = "0";
|
|
||||||
return;
|
|
||||||
|
|
||||||
} else if ((quantity - amount < 0) && amount >= 0 && type == -1)
|
|
||||||
{
|
|
||||||
MessageBox.Show("Niedobór magazynu", "Ilość przedmiotów nie możę być mniejsza niz 0", MessageBoxButton.OK, MessageBoxImage.Error);
|
|
||||||
amountToChange.Text = "0";
|
|
||||||
return;
|
|
||||||
} else
|
|
||||||
{
|
|
||||||
SaveChangingAmountOfFruits.Invoke((type > 0) ? amount : -amount);
|
|
||||||
this.Close();
|
|
||||||
}
|
|
||||||
|
|
||||||
|
private void saveButton_Click(object sender, RoutedEventArgs e)
|
||||||
|
{
|
||||||
|
SendNewQuantity();
|
||||||
}
|
}
|
||||||
|
|
||||||
private void cancelButton_Click(object sender, RoutedEventArgs e)
|
private void cancelButton_Click(object sender, RoutedEventArgs e)
|
||||||
{
|
{
|
||||||
this.Close();
|
this.Close();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private void Window_KeyDown(object sender, KeyEventArgs e)
|
||||||
|
{
|
||||||
|
if (e.Key == Key.Return) SendNewQuantity();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
23
Magazyn_Client/Magazyn/Windows/ErrorWindow.xaml
Normal file
23
Magazyn_Client/Magazyn/Windows/ErrorWindow.xaml
Normal file
@ -0,0 +1,23 @@
|
|||||||
|
<Window x:Class="Magazyn.Windows.ErrorWindow"
|
||||||
|
|
||||||
|
xmlns:materialDesign="http://materialdesigninxaml.net/winfx/xaml/themes"
|
||||||
|
TextElement.Foreground="{DynamicResource MaterialDesignBody}"
|
||||||
|
TextElement.FontWeight="Regular"
|
||||||
|
TextElement.FontSize="13"
|
||||||
|
TextOptions.TextFormattingMode="Ideal"
|
||||||
|
TextOptions.TextRenderingMode="Auto"
|
||||||
|
Background="{DynamicResource MaterialDesignPaper}"
|
||||||
|
FontFamily="{DynamicResource MaterialDesignFont}"
|
||||||
|
|
||||||
|
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
||||||
|
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||||
|
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
|
||||||
|
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
|
||||||
|
xmlns:local="clr-namespace:Magazyn.Windows"
|
||||||
|
mc:Ignorable="d"
|
||||||
|
Title="Błąd" WindowStartupLocation="CenterOwner" Height="205" Width="220" ResizeMode="NoResize">
|
||||||
|
<Grid>
|
||||||
|
<Button x:Name="okButton" Content="Ok" HorizontalAlignment="Right" Margin="0,0,10,10" VerticalAlignment="Bottom" Width="75" Click="okButton_Click"/>
|
||||||
|
<TextBlock x:Name="messageBlock" FontSize="16" Margin="10,10,10,0" TextWrapping="Wrap" Text="messageBlock" VerticalAlignment="Top"/>
|
||||||
|
</Grid>
|
||||||
|
</Window>
|
33
Magazyn_Client/Magazyn/Windows/ErrorWindow.xaml.cs
Normal file
33
Magazyn_Client/Magazyn/Windows/ErrorWindow.xaml.cs
Normal file
@ -0,0 +1,33 @@
|
|||||||
|
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.Shapes;
|
||||||
|
|
||||||
|
namespace Magazyn.Windows
|
||||||
|
{
|
||||||
|
/// <summary>
|
||||||
|
/// Interaction logic for ErrorWindow.xaml
|
||||||
|
/// </summary>
|
||||||
|
public partial class ErrorWindow : Window
|
||||||
|
{
|
||||||
|
public ErrorWindow(string text)
|
||||||
|
{
|
||||||
|
InitializeComponent();
|
||||||
|
messageBlock.Text = text;
|
||||||
|
}
|
||||||
|
|
||||||
|
private void okButton_Click(object sender, RoutedEventArgs e)
|
||||||
|
{
|
||||||
|
this.Close();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
25
Magazyn_Client/Magazyn/Windows/ValueWindow.xaml
Normal file
25
Magazyn_Client/Magazyn/Windows/ValueWindow.xaml
Normal file
@ -0,0 +1,25 @@
|
|||||||
|
<Window x:Class="Magazyn.Windows.ValueWindow"
|
||||||
|
|
||||||
|
xmlns:materialDesign="http://materialdesigninxaml.net/winfx/xaml/themes"
|
||||||
|
TextElement.Foreground="{DynamicResource MaterialDesignBody}"
|
||||||
|
TextElement.FontWeight="Regular"
|
||||||
|
TextElement.FontSize="13"
|
||||||
|
TextOptions.TextFormattingMode="Ideal"
|
||||||
|
TextOptions.TextRenderingMode="Auto"
|
||||||
|
Background="{DynamicResource MaterialDesignPaper}"
|
||||||
|
FontFamily="{DynamicResource MaterialDesignFont}"
|
||||||
|
|
||||||
|
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
||||||
|
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||||
|
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
|
||||||
|
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
|
||||||
|
xmlns:local="clr-namespace:Magazyn.Windows"
|
||||||
|
mc:Ignorable="d"
|
||||||
|
Title="Wartość magazynu" WindowStartupLocation="CenterOwner" Height="205" Width="220" ResizeMode="NoResize">
|
||||||
|
<Grid>
|
||||||
|
<Button x:Name="okButton" Content="Ok" HorizontalAlignment="Right" Margin="0,0,10,10" VerticalAlignment="Bottom" Width="75" Click="okButton_Click"/>
|
||||||
|
<TextBlock FontSize="16" Margin="10,10,10,0" TextWrapping="Wrap" Text="Wartość magazynu to:" VerticalAlignment="Top"/>
|
||||||
|
<TextBlock x:Name="valueBlock" FontSize="16" HorizontalAlignment="Left" Margin="10,34,0,0" TextWrapping="Wrap" Text="NaN zł" VerticalAlignment="Top"/>
|
||||||
|
|
||||||
|
</Grid>
|
||||||
|
</Window>
|
33
Magazyn_Client/Magazyn/Windows/ValueWindow.xaml.cs
Normal file
33
Magazyn_Client/Magazyn/Windows/ValueWindow.xaml.cs
Normal file
@ -0,0 +1,33 @@
|
|||||||
|
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.Shapes;
|
||||||
|
|
||||||
|
namespace Magazyn.Windows
|
||||||
|
{
|
||||||
|
/// <summary>
|
||||||
|
/// Interaction logic for ValueWindow.xaml
|
||||||
|
/// </summary>
|
||||||
|
public partial class ValueWindow : Window
|
||||||
|
{
|
||||||
|
public ValueWindow(float value)
|
||||||
|
{
|
||||||
|
InitializeComponent();
|
||||||
|
valueBlock.Text = value.ToString() + " zł";
|
||||||
|
}
|
||||||
|
|
||||||
|
private void okButton_Click(object sender, RoutedEventArgs e)
|
||||||
|
{
|
||||||
|
this.Close();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
Loading…
Reference in New Issue
Block a user