|
@@ -0,0 +1,283 @@
|
|
|
+<Window x:Class="PRSDesktop.StockTransformWindow"
|
|
|
+ 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:PRSDesktop"
|
|
|
+ xmlns:wpf="clr-namespace:InABox.WPF;assembly=InABox.Wpf"
|
|
|
+ xmlns:syncfusion="http://schemas.syncfusion.com/wpf"
|
|
|
+ mc:Ignorable="d"
|
|
|
+ Title="Convert Dimensions" Height="400" Width="300" SizeToContent="Height" WindowStartupLocation="CenterScreen">
|
|
|
+ <Window.DataContext>
|
|
|
+ <local:StockTransformWindowViewModel x:Name="_viewModel"/>
|
|
|
+ </Window.DataContext>
|
|
|
+ <Window.Resources>
|
|
|
+ <wpf:BooleanToGridLengthConverter x:Key="BooleanToGridLengthConverter" TrueValue="40" FalseValue="0" />
|
|
|
+ </Window.Resources>
|
|
|
+ <Grid Margin="5">
|
|
|
+ <Grid.ColumnDefinitions>
|
|
|
+ <ColumnDefinition Width="*"/>
|
|
|
+ <ColumnDefinition Width="80"/>
|
|
|
+ <ColumnDefinition Width="80"/>
|
|
|
+ </Grid.ColumnDefinitions>
|
|
|
+ <Grid.RowDefinitions>
|
|
|
+ <RowDefinition Height="40"/>
|
|
|
+ <RowDefinition Height="{Binding OldDimensions.Unit.HasHeight, Converter={StaticResource BooleanToGridLengthConverter}}"/>
|
|
|
+ <RowDefinition Height="{Binding OldDimensions.Unit.HasWidth, Converter={StaticResource BooleanToGridLengthConverter}}"/>
|
|
|
+ <RowDefinition Height="{Binding OldDimensions.Unit.HasLength, Converter={StaticResource BooleanToGridLengthConverter}}"/>
|
|
|
+ <RowDefinition Height="{Binding OldDimensions.Unit.HasQuantity, Converter={StaticResource BooleanToGridLengthConverter}}"/>
|
|
|
+ <RowDefinition Height="{Binding OldDimensions.Unit.HasWeight, Converter={StaticResource BooleanToGridLengthConverter}}"/>
|
|
|
+ <RowDefinition Height="10"/>
|
|
|
+ <RowDefinition Height="40"/>
|
|
|
+ <RowDefinition Height="40"/>
|
|
|
+ <RowDefinition Height="10"/>
|
|
|
+ <RowDefinition Height="40"/>
|
|
|
+ </Grid.RowDefinitions>
|
|
|
+
|
|
|
+ <syncfusion:SfTextBoxExt
|
|
|
+ Grid.Row="0"
|
|
|
+ Grid.Column="1"
|
|
|
+ Text="Current"
|
|
|
+ HorizontalContentAlignment="Center"
|
|
|
+ VerticalContentAlignment="Center"
|
|
|
+ Margin="5,5,0,0"
|
|
|
+ Background="WhiteSmoke"/>
|
|
|
+ <syncfusion:SfTextBoxExt
|
|
|
+ Grid.Row="0"
|
|
|
+ Grid.Column="2"
|
|
|
+ Text="New"
|
|
|
+ HorizontalContentAlignment="Center"
|
|
|
+ VerticalContentAlignment="Center"
|
|
|
+ Margin="5,5,0,0"
|
|
|
+ Background="WhiteSmoke"
|
|
|
+ IsReadOnly="True"/>
|
|
|
+
|
|
|
+ <syncfusion:SfTextBoxExt
|
|
|
+ Grid.Row="1"
|
|
|
+ Grid.Column="0"
|
|
|
+ Text="Height"
|
|
|
+ VerticalContentAlignment="Center"
|
|
|
+ Background="WhiteSmoke"
|
|
|
+ Margin="5,5,0,0"
|
|
|
+ IsReadOnly="True"/>
|
|
|
+ <syncfusion:DoubleTextBox
|
|
|
+ Value="{Binding OldDimensions.Height}"
|
|
|
+ Grid.Row="1"
|
|
|
+ Grid.Column="1"
|
|
|
+ Margin="5,5,0,0"
|
|
|
+ VerticalAlignment="Stretch"
|
|
|
+ HorizontalAlignment="Stretch"
|
|
|
+ HorizontalContentAlignment="Center"
|
|
|
+ VerticalContentAlignment="Center"
|
|
|
+ Background="WhiteSmoke"
|
|
|
+ IsReadOnly="True"/>
|
|
|
+ <syncfusion:DoubleTextBox
|
|
|
+ Value="{Binding NewDimensions.Height, Mode=TwoWay}"
|
|
|
+ Grid.Row="1"
|
|
|
+ Grid.Column="2"
|
|
|
+ Margin="5,5,0,0"
|
|
|
+ VerticalAlignment="Stretch"
|
|
|
+ HorizontalAlignment="Stretch"
|
|
|
+ HorizontalContentAlignment="Center"
|
|
|
+ VerticalContentAlignment="Center"
|
|
|
+ Background="LightYellow"/>
|
|
|
+
|
|
|
+ <syncfusion:SfTextBoxExt
|
|
|
+ Grid.Row="2"
|
|
|
+ Grid.Column="0"
|
|
|
+ Text="Width"
|
|
|
+ VerticalContentAlignment="Center"
|
|
|
+ Background="WhiteSmoke"
|
|
|
+ Margin="5,5,0,0"
|
|
|
+ IsReadOnly="True"/>
|
|
|
+ <syncfusion:DoubleTextBox
|
|
|
+ Value="{Binding OldDimensions.Width}"
|
|
|
+ Grid.Row="2"
|
|
|
+ Grid.Column="1"
|
|
|
+ Margin="5,5,0,0"
|
|
|
+ VerticalAlignment="Stretch"
|
|
|
+ HorizontalAlignment="Stretch"
|
|
|
+ HorizontalContentAlignment="Center"
|
|
|
+ VerticalContentAlignment="Center"
|
|
|
+ Background="WhiteSmoke"
|
|
|
+ IsReadOnly="True"/>
|
|
|
+ <syncfusion:DoubleTextBox
|
|
|
+ Value="{Binding NewDimensions.Width, Mode=TwoWay}"
|
|
|
+ Grid.Row="2"
|
|
|
+ Grid.Column="2"
|
|
|
+ Margin="5,5,0,0"
|
|
|
+ VerticalAlignment="Stretch"
|
|
|
+ HorizontalAlignment="Stretch"
|
|
|
+ HorizontalContentAlignment="Center"
|
|
|
+ VerticalContentAlignment="Center"
|
|
|
+ Background="LightYellow"/>
|
|
|
+
|
|
|
+ <syncfusion:SfTextBoxExt
|
|
|
+ Grid.Row="3"
|
|
|
+ Grid.Column="0"
|
|
|
+ Text="Length"
|
|
|
+ VerticalContentAlignment="Center"
|
|
|
+ Background="WhiteSmoke"
|
|
|
+ Margin="5,5,0,0"
|
|
|
+ IsReadOnly="True"/>
|
|
|
+ <syncfusion:DoubleTextBox
|
|
|
+ Value="{Binding OldDimensions.Length}"
|
|
|
+ Grid.Row="3"
|
|
|
+ Grid.Column="1"
|
|
|
+ Margin="5,5,0,0"
|
|
|
+ VerticalAlignment="Stretch"
|
|
|
+ HorizontalAlignment="Stretch"
|
|
|
+ HorizontalContentAlignment="Center"
|
|
|
+ VerticalContentAlignment="Center"
|
|
|
+ Background="WhiteSmoke"
|
|
|
+ IsReadOnly="True"/>
|
|
|
+ <syncfusion:DoubleTextBox
|
|
|
+ Value="{Binding NewDimensions.Length, Mode=TwoWay}"
|
|
|
+ Grid.Row="3"
|
|
|
+ Grid.Column="2"
|
|
|
+ Margin="5,5,0,0"
|
|
|
+ VerticalAlignment="Stretch"
|
|
|
+ HorizontalAlignment="Stretch"
|
|
|
+ HorizontalContentAlignment="Center"
|
|
|
+ VerticalContentAlignment="Center"
|
|
|
+ Background="LightYellow"/>
|
|
|
+
|
|
|
+ <syncfusion:SfTextBoxExt
|
|
|
+ Grid.Row="4"
|
|
|
+ Grid.Column="0"
|
|
|
+ Text="Quantity"
|
|
|
+ VerticalContentAlignment="Center"
|
|
|
+ Background="WhiteSmoke"
|
|
|
+ Margin="5,5,0,0"
|
|
|
+ IsReadOnly="True"/>
|
|
|
+ <syncfusion:DoubleTextBox
|
|
|
+ Value="{Binding OldDimensions.Quantity}"
|
|
|
+ Grid.Row="4"
|
|
|
+ Grid.Column="1"
|
|
|
+ Margin="5,5,0,0"
|
|
|
+ VerticalAlignment="Stretch"
|
|
|
+ HorizontalAlignment="Stretch"
|
|
|
+ HorizontalContentAlignment="Center"
|
|
|
+ VerticalContentAlignment="Center"
|
|
|
+ Background="WhiteSmoke"
|
|
|
+ IsReadOnly="True"/>
|
|
|
+ <syncfusion:DoubleTextBox
|
|
|
+ Value="{Binding NewDimensions.Quantity, Mode=TwoWay}"
|
|
|
+ Grid.Row="4"
|
|
|
+ Grid.Column="2"
|
|
|
+ Margin="5,5,0,0"
|
|
|
+ VerticalAlignment="Stretch"
|
|
|
+ HorizontalAlignment="Stretch"
|
|
|
+ HorizontalContentAlignment="Center"
|
|
|
+ VerticalContentAlignment="Center"
|
|
|
+ Background="LightYellow"/>
|
|
|
+
|
|
|
+ <syncfusion:SfTextBoxExt
|
|
|
+ Grid.Row="5"
|
|
|
+ Grid.Column="0"
|
|
|
+ Text="Weight"
|
|
|
+ VerticalContentAlignment="Center"
|
|
|
+ Background="WhiteSmoke"
|
|
|
+ Margin="5,5,0,0"
|
|
|
+ IsReadOnly="True"/>
|
|
|
+ <syncfusion:DoubleTextBox
|
|
|
+ Value="{Binding OldDimensions.Weight}"
|
|
|
+ Grid.Row="5"
|
|
|
+ Grid.Column="1"
|
|
|
+ Margin="5,5,0,0"
|
|
|
+ VerticalAlignment="Stretch"
|
|
|
+ HorizontalAlignment="Stretch"
|
|
|
+ HorizontalContentAlignment="Center"
|
|
|
+ VerticalContentAlignment="Center"
|
|
|
+ Background="WhiteSmoke"
|
|
|
+ IsReadOnly="True"/>
|
|
|
+ <syncfusion:DoubleTextBox
|
|
|
+ Value="{Binding NewDimensions.Weight, Mode=TwoWay}"
|
|
|
+ Grid.Row="5"
|
|
|
+ Grid.Column="2"
|
|
|
+ Margin="5,5,0,0"
|
|
|
+ VerticalAlignment="Stretch"
|
|
|
+ HorizontalAlignment="Stretch"
|
|
|
+ HorizontalContentAlignment="Center"
|
|
|
+ VerticalContentAlignment="Center"
|
|
|
+ Background="LightYellow"/>
|
|
|
+
|
|
|
+ <syncfusion:SfTextBoxExt
|
|
|
+ Grid.Row="7"
|
|
|
+ Grid.Column="0"
|
|
|
+ Text="Unit Size"
|
|
|
+ VerticalContentAlignment="Center"
|
|
|
+ Background="WhiteSmoke"
|
|
|
+ Margin="5,5,0,0"
|
|
|
+ IsReadOnly="True"/>
|
|
|
+ <syncfusion:SfTextBoxExt
|
|
|
+
|
|
|
+ Text="{Binding OldUnitSize}"
|
|
|
+ Grid.Row="7"
|
|
|
+ Grid.Column="1"
|
|
|
+ Margin="5,5,0,0"
|
|
|
+ VerticalAlignment="Stretch"
|
|
|
+ HorizontalAlignment="Stretch"
|
|
|
+ HorizontalContentAlignment="Center"
|
|
|
+ VerticalContentAlignment="Center"
|
|
|
+ Background="WhiteSmoke"
|
|
|
+ IsReadOnly="True"/>
|
|
|
+ <syncfusion:SfTextBoxExt
|
|
|
+ Text="{Binding NewUnitSize}"
|
|
|
+ Grid.Row="7"
|
|
|
+ Grid.Column="2"
|
|
|
+ Margin="5,5,0,0"
|
|
|
+ VerticalAlignment="Stretch"
|
|
|
+ HorizontalAlignment="Stretch"
|
|
|
+ HorizontalContentAlignment="Center"
|
|
|
+ VerticalContentAlignment="Center"
|
|
|
+ Background="WhiteSmoke"
|
|
|
+ IsReadOnly="True"/>
|
|
|
+
|
|
|
+ <syncfusion:SfTextBoxExt
|
|
|
+ Grid.Row="8"
|
|
|
+ Grid.Column="0"
|
|
|
+ Text="Available"
|
|
|
+ VerticalContentAlignment="Center"
|
|
|
+ Background="WhiteSmoke"
|
|
|
+ Margin="5,5,0,0"
|
|
|
+ IsReadOnly="True"/>
|
|
|
+ <syncfusion:DoubleTextBox
|
|
|
+ Value="{Binding OldAvailable, Mode=TwoWay}"
|
|
|
+ MaxValue="{Binding MaxAvailable}"
|
|
|
+ Grid.Row="8"
|
|
|
+ Grid.Column="1"
|
|
|
+ Margin="5,5,0,0"
|
|
|
+ VerticalAlignment="Stretch"
|
|
|
+ HorizontalAlignment="Stretch"
|
|
|
+ HorizontalContentAlignment="Center"
|
|
|
+ VerticalContentAlignment="Center"
|
|
|
+ Background="LightYellow"/>
|
|
|
+ <syncfusion:DoubleTextBox
|
|
|
+ Value="{Binding NewAvailable}"
|
|
|
+ Grid.Row="8"
|
|
|
+ Grid.Column="2"
|
|
|
+ Margin="5,5,0,0"
|
|
|
+ VerticalAlignment="Stretch"
|
|
|
+ HorizontalAlignment="Stretch"
|
|
|
+ HorizontalContentAlignment="Center"
|
|
|
+ VerticalContentAlignment="Center"
|
|
|
+ Background="WhiteSmoke"
|
|
|
+ IsReadOnly="True"/>
|
|
|
+
|
|
|
+
|
|
|
+ <Button
|
|
|
+ Grid.Row="10"
|
|
|
+ Grid.Column="1"
|
|
|
+ Content="OK"
|
|
|
+ Margin="5,5,0,0"
|
|
|
+ Click="OK_Click"/>
|
|
|
+ <Button
|
|
|
+ Grid.Row="10"
|
|
|
+ Grid.Column="2"
|
|
|
+ Content="Cancel"
|
|
|
+ Margin="5,5,0,0"
|
|
|
+ Click="Cancel_Click"/>
|
|
|
+
|
|
|
+ </Grid>
|
|
|
+</Window>
|