Compare commits

..

3 Commits

8 changed files with 45 additions and 37 deletions

View File

@ -8,7 +8,7 @@
<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.Blue.xaml" /> <ResourceDictionary Source="pack://application:,,,/MaterialDesignColors;component/Themes/Recommended/Primary/MaterialDesignColor.Cyan.xaml" />
<ResourceDictionary Source="pack://application:,,,/MaterialDesignColors;component/Themes/Recommended/Accent/MaterialDesignColor.Cyan.xaml" /> <ResourceDictionary Source="pack://application:,,,/MaterialDesignColors;component/Themes/Recommended/Accent/MaterialDesignColor.Cyan.xaml" />
</ResourceDictionary.MergedDictionaries> </ResourceDictionary.MergedDictionaries>
</ResourceDictionary> </ResourceDictionary>

View File

@ -20,21 +20,21 @@
<ListBox MouseDoubleClick="fruitListMouseDoubleClick" x:Name="fruitList" Margin="10,51,10,87"/> <ListBox MouseDoubleClick="fruitListMouseDoubleClick" x:Name="fruitList" Margin="10,51,10,87"/>
<Button Name="sum" Content="Wartość magazynu" Margin="0,0,10,10" VerticalAlignment="Bottom" Height="35" Click="Value_Click" HorizontalAlignment="Right" Width="163"/> <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="134"/>
<Label Content="Nazwa owocu:" FontWeight="Bold" HorizontalAlignment="Left" Margin="91,25,0,0" VerticalAlignment="Top" Width="100"/> <Label Content="Nazwa owocu:" FontWeight="Bold" HorizontalAlignment="Left" Margin="100,25,0,0" VerticalAlignment="Top" Width="100"/>
<Label Content="Ilość:" FontWeight="Bold" HorizontalAlignment="Left" Margin="283,25,0,0" VerticalAlignment="Top" Width="46"/> <Label Content="Ilość:" FontWeight="Bold" HorizontalAlignment="Left" Margin="283,25,0,0" VerticalAlignment="Top" Width="46"/>
<Label Content="Cena 1szt:" FontWeight="Bold" HorizontalAlignment="Left" Margin="360,25,0,0" VerticalAlignment="Top" Width="73"/> <Label Content="Cena 1szt:" FontWeight="Bold" HorizontalAlignment="Left" Margin="373,25,0,0" VerticalAlignment="Top" Width="73"/>
<Label Content="Wartość:" FontWeight="Bold" HorizontalAlignment="Left" Margin="438,25,0,0" VerticalAlignment="Top" Width="65"/> <Label Content="Wartość:" FontWeight="Bold" HorizontalAlignment="Left" Margin="451,25,0,0" VerticalAlignment="Top" Width="65"/>
<Button x:Name="prevButton" Content="Poprzednia" HorizontalAlignment="Left" Margin="10,0,0,50" VerticalAlignment="Bottom" Width="105" Click="prevButton_Click"/> <Button x:Name="prevButton" Content="Poprzednia" HorizontalAlignment="Left" Margin="10,0,0,50" VerticalAlignment="Bottom" Width="105" Click="prevButton_Click"/>
<Button x:Name="nextButton" Content="Następna" HorizontalAlignment="Right" Margin="0,0,10,50" VerticalAlignment="Bottom" Width="105" Click="nextButton_Click"/> <Button x:Name="nextButton" Content="Następna" HorizontalAlignment="Right" Margin="0,0,10,50" VerticalAlignment="Bottom" Width="105" Click="nextButton_Click"/>
<TextBlock x:Name="pageBlock" FontSize="16" Margin="271,0,276,10" TextWrapping="Wrap" Text="NaN" Height="19" VerticalAlignment="Bottom"/> <TextBlock x:Name="pageBlock" FontSize="16" Margin="271,0,276,10" TextWrapping="Wrap" Text="NaN" Height="19" VerticalAlignment="Bottom"/>
<Label Content="Status:" HorizontalAlignment="Left" Margin="10,0,0,10" VerticalAlignment="Bottom" RenderTransformOrigin="0.75,0.423" /> <Label Content="Status:" HorizontalAlignment="Left" Margin="10,0,0,10" VerticalAlignment="Bottom" RenderTransformOrigin="0.75,0.423" />
<TextBlock Name="netStatus" HorizontalAlignment="Left" Margin="63,0,0,14" TextWrapping="Wrap" Text="error" VerticalAlignment="Bottom"/> <TextBlock Name="netStatus" HorizontalAlignment="Left" Margin="63,0,0,14" TextWrapping="Wrap" Text="error" VerticalAlignment="Bottom"/>
<TextBox x:Name="searchBox" TextWrapping="Wrap" Text="" HorizontalAlignment="Right" Width="120" Height="23" VerticalAlignment="Top" TextChanged="TextBox_TextChanged" /> <TextBox x:Name="searchBox" TextWrapping="Wrap" Text="" HorizontalAlignment="Right" Width="182" Height="23" VerticalAlignment="Top" TextChanged="TextBox_TextChanged" Margin="0,0,0.333,0" />
<materialDesign:PackIcon Kind="Search" Height="23" Width="23" Margin="0,0,121,0" VerticalAlignment="Top" HorizontalAlignment="Right"/> <materialDesign:PackIcon Kind="Search" Height="23" Width="23" Margin="0,0,182.333,0" VerticalAlignment="Top" HorizontalAlignment="Right"/>
</Grid> </Grid>

View File

@ -9,15 +9,20 @@
mc:Ignorable="d" Height="64" Width="520"> mc:Ignorable="d" Height="64" Width="520">
<materialDesign:Card Background="{DynamicResource SecondaryAccentBrush}"> <materialDesign:Card Background="{DynamicResource SecondaryAccentBrush}">
<Grid> <Grid>
<Image x:Name="fruitImage" HorizontalAlignment="Left" Margin="10,10,0,7" Width="50"/> <Ellipse HorizontalAlignment="Left" Width="60" Height="60" Margin="12,0,0,0">
<TextBlock x:Name="fruitName" HorizontalAlignment="Left" Margin="80,26,0,0" TextWrapping="Wrap" Text="TextBlock" VerticalAlignment="Top" Width="116"/> <Ellipse.Fill>
<Image x:Name="minusImage" HorizontalAlignment="Left" Height="24" Margin="240,25,0,0" VerticalAlignment="Top" Width="24" Source="/Images/minus.png" MouseDown="subaddButton_Click" /> <ImageBrush x:Name="fruitImage"/>
<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 x:Name="fruitAmount" HorizontalAlignment="Left" Margin="267,29,0,19" Width="34" TextAlignment="Center" RenderTransformOrigin="0.489,-0.623"/> </Ellipse.Fill>
<TextBlock x:Name="fruitPrice" Margin="362,26,106,0" TextWrapping="Wrap" Text="TextBlock" VerticalAlignment="Top" IsEnabled="False"/> </Ellipse>
<TextBlock x:Name="allPrice" Margin="425,26,43,0" TextWrapping="Wrap" Text="TextBlock" VerticalAlignment="Top"/> <TextBlock x:Name="fruitName" HorizontalAlignment="Left" Margin="80,26,0,0" TextWrapping="Wrap" Text="TextBlock" VerticalAlignment="Top" Width="116" TextAlignment="Center"/>
<Image x:Name="minusImage" HorizontalAlignment="Left" Height="24" Margin="236,20,0,0" VerticalAlignment="Top" Width="24" Source="/Images/minus.png" MouseDown="subaddButton_Click" RenderTransformOrigin="0.26,0.447" />
<Image x:Name="plusImage" HorizontalAlignment="Left" Height="24" Margin="304,20,0,0" VerticalAlignment="Top" Width="24" Source="/Magazyn;component/Images/plus.png" RenderTransformOrigin="0.208,0.521" MouseDown="subaddButton_Click"/>
<TextBlock x:Name="fruitAmount" HorizontalAlignment="Left" Margin="265,26,0,22" Width="34" TextAlignment="Center" RenderTransformOrigin="0.489,-0.623"/>
<TextBlock x:Name="fruitPrice" Margin="362,26,106,0" TextWrapping="Wrap" Text="TextBlock" VerticalAlignment="Top" IsEnabled="False" TextAlignment="Center"/>
<TextBlock x:Name="allPrice" Margin="433,25,35,0" TextWrapping="Wrap" Text="TextBlock" VerticalAlignment="Top" TextAlignment="Center"/>
</Grid> </Grid>
</materialDesign:Card> </materialDesign:Card>

View File

@ -42,7 +42,7 @@ namespace Magazyn.Views
try try
{ {
fruitImage.Source = fruit.ImageSource; fruitImage.ImageSource = fruit.ImageSource;
} }
catch (Exception ex) catch (Exception ex)
{ {

View File

@ -15,15 +15,14 @@
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="" WindowStartupLocation="CenterOwner" Height="205" Width="220" ResizeMode="NoResize" Keyboard.KeyDown="Window_KeyDown"> Title="" WindowStartupLocation="CenterOwner" Height="250" Width="340" ResizeMode="NoResize" Keyboard.KeyDown="Window_KeyDown">
<Grid> <Grid>
<TextBlock x:Name="fruitName" HorizontalAlignment="Left" Margin="10,87,0,0" TextWrapping="Wrap" Text="fruitName" Width="76" Height="16" VerticalAlignment="Top" TextAlignment="Center"/> <TextBlock x:Name="fruitName" HorizontalAlignment="Left" Margin="60,125,0,0" TextWrapping="Wrap" Text="fruitName" Width="76" Height="16" VerticalAlignment="Top" TextAlignment="Center"/>
<TextBlock x:Name="messageBox" HorizontalAlignment="Left" Margin="84,10,0,0" TextWrapping="Wrap" Text="messageBox" VerticalAlignment="Top" Width="121" Height="64"/> <TextBlock x:Name="messageBox" HorizontalAlignment="Left" Margin="28,80,0,0" TextWrapping="Wrap" Text="messageBox" VerticalAlignment="Top" Width="290" Height="39" TextAlignment="Center" FontWeight="Bold"/>
<TextBox x:Name="amountToChange" Margin="0,71,9,0" TextWrapping="Wrap" Text="" RenderTransformOrigin="1.456,0.316" Height="32" VerticalAlignment="Top" HorizontalAlignment="Right" Width="64"/> <TextBox x:Name="amountToChange" Margin="0,109,65,0" TextWrapping="Wrap" Text="" RenderTransformOrigin="1.456,0.316" Height="32" VerticalAlignment="Top" HorizontalAlignment="Right" Width="89" TextAlignment="Center"/>
<Button x:Name="saveButton" Content="Zastosuj" Margin="0,0,9,10" VerticalAlignment="Bottom" Click="saveButton_Click" Width="90" HorizontalAlignment="Right"/> <Button x:Name="saveButton" Content="Zastosuj" Margin="0,0,66,10" VerticalAlignment="Bottom" Click="saveButton_Click" Width="90" HorizontalAlignment="Right"/>
<Button x:Name="cancelButton" Content="Anuluj" Margin="10,0,0,10" VerticalAlignment="Bottom" Click="cancelButton_Click" Width="90" HorizontalAlignment="Left" /> <Button x:Name="cancelButton" Content="Anuluj" Margin="60,0,0,10" VerticalAlignment="Bottom" Click="cancelButton_Click" Width="90" HorizontalAlignment="Left" />
<Image x:Name="fruitImage" HorizontalAlignment="Left" Height="64" Margin="15,10,0,0" VerticalAlignment="Top" Width="64"/> <Image x:Name="fruitImage" HorizontalAlignment="Left" Height="64" Margin="140,5,0,0" VerticalAlignment="Top" Width="64"/>
</Grid> </Grid>
</Window> </Window>

View File

@ -15,9 +15,9 @@
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="Błąd" WindowStartupLocation="CenterOwner" Height="205" Width="220" ResizeMode="NoResize" Keyboard.KeyDown="Window_KeyDown"> Title="Błąd" WindowStartupLocation="CenterOwner" Height="250" Width="340" ResizeMode="NoResize" Keyboard.KeyDown="Window_KeyDown">
<Grid> <Grid>
<Button x:Name="okButton" Content="Ok" HorizontalAlignment="Right" Margin="0,0,10,10" VerticalAlignment="Bottom" Width="75" Click="okButton_Click"/> <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"/> <TextBlock x:Name="messageBlock" FontSize="16" Margin="10,70,10,0" TextWrapping="Wrap" Text="messageBlock" VerticalAlignment="Top" TextAlignment="Center" RenderTransformOrigin="0.502,0.878"/>
</Grid> </Grid>
</Window> </Window>

View File

@ -15,14 +15,18 @@
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="Informacje o: " WindowStartupLocation="CenterOwner" Height="205" Width="220" ResizeMode="NoResize" Keyboard.KeyDown="Window_KeyDown"> Title="Informacje o: " WindowStartupLocation="CenterOwner" Height="250" Width="340" ResizeMode="NoResize" Keyboard.KeyDown="Window_KeyDown">
<Grid> <Grid>
<TextBlock x:Name="fruitName" Margin="79,10,9,0" TextWrapping="Wrap" Text="fruitName" Height="16" VerticalAlignment="Top"/> <Grid.RowDefinitions>
<TextBlock x:Name="fruitPrice" Margin="79,31,10,0" TextWrapping="Wrap" Text="fruitPrice" Height="16" VerticalAlignment="Top"/> <RowDefinition Height="47*"/>
<TextBlock x:Name="fruitQuantity" Margin="79,52,10,0" TextWrapping="Wrap" Text="fruitQuantity" Height="16" VerticalAlignment="Top"/> <RowDefinition Height="175*"/>
<TextBlock x:Name="fruitQuantityMax" Margin="79,73,10,0" TextWrapping="Wrap" Text="fruitQuantityMax" Height="16" VerticalAlignment="Top"/> </Grid.RowDefinitions>
<TextBlock x:Name="fruitValue" Margin="79,94,10,0" TextWrapping="Wrap" Text="fruitValue" Height="16" VerticalAlignment="Top"/> <TextBlock x:Name="fruitName" Margin="37,28.667,50.667,0" TextWrapping="Wrap" Text="fruitName" Height="16" VerticalAlignment="Top" FontWeight="Bold" Grid.Row="1"/>
<Button x:Name="okButton" Content="Ok" Margin="0,0,9,10" VerticalAlignment="Bottom" Click="okButton_Click" Width="75" HorizontalAlignment="Right"/> <TextBlock x:Name="fruitPrice" Margin="38,49.178,49.667,0" TextWrapping="Wrap" Text="fruitPrice" Height="16" VerticalAlignment="Top" FontWeight="Bold" Grid.Row="1"/>
<Image x:Name="fruitImage" HorizontalAlignment="Left" Height="64" Margin="10,10,0,0" VerticalAlignment="Top" Width="64"/> <TextBlock x:Name="fruitQuantity" Margin="37,70.178,49.667,0" TextWrapping="Wrap" Text="fruitQuantity" Height="16" VerticalAlignment="Top" FontWeight="Bold" Grid.Row="1"/>
<TextBlock x:Name="fruitQuantityMax" Margin="37,91.178,49.667,0" TextWrapping="Wrap" Text="fruitQuantityMax" Height="16" VerticalAlignment="Top" FontWeight="Bold" Grid.Row="1"/>
<TextBlock x:Name="fruitValue" Margin="37,112.178,49.667,0" TextWrapping="Wrap" Text="fruitValue" Height="16" VerticalAlignment="Top" FontWeight="Bold" Grid.Row="1"/>
<Button x:Name="okButton" Content="Ok" Margin="0,0,8.667,10" VerticalAlignment="Bottom" Click="okButton_Click" Width="75" HorizontalAlignment="Right" Grid.Row="1"/>
<Image x:Name="fruitImage" HorizontalAlignment="Left" Height="64" Margin="140,5,0,0" VerticalAlignment="Top" Width="64" Grid.RowSpan="2"/>
</Grid> </Grid>
</Window> </Window>

View File

@ -15,11 +15,11 @@
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="Wartość magazynu" WindowStartupLocation="CenterOwner" Height="205" Width="220" ResizeMode="NoResize" Keyboard.KeyDown="Window_KeyDown"> Title="Wartość magazynu" WindowStartupLocation="CenterOwner" Height="250" Width="340" ResizeMode="NoResize" Keyboard.KeyDown="Window_KeyDown">
<Grid> <Grid>
<Button x:Name="okButton" Content="Ok" HorizontalAlignment="Right" Margin="0,0,10,10" VerticalAlignment="Bottom" Width="75" Click="okButton_Click"/> <Button x:Name="okButton" Content="Ok" HorizontalAlignment="Right" Margin="0,0,10,10" VerticalAlignment="Bottom" Width="75" Click="okButton_Click"/>
<TextBlock Margin="10,28,10,0" TextWrapping="Wrap" Text="Wartość magazynu to:" VerticalAlignment="Top" TextAlignment="Center" RenderTransformOrigin="0.495,1.734" /> <TextBlock Margin="10,70,10,0" TextWrapping="Wrap" Text="Wartość magazynu to:" VerticalAlignment="Top" TextAlignment="Center" RenderTransformOrigin="0.495,1.734" />
<TextBlock x:Name="valueBlock" Margin="67,49,69,0" TextWrapping="Wrap" Text="NaN zł" VerticalAlignment="Top" TextAlignment="Center" RenderTransformOrigin="2.405,0.629"/> <TextBlock x:Name="valueBlock" Margin="69,108,66.667,0" TextWrapping="Wrap" Text="NaN zł" VerticalAlignment="Top" TextAlignment="Center" RenderTransformOrigin="2.405,0.629" FontWeight="Bold"/>
</Grid> </Grid>
</Window> </Window>