diff options
| author | Roy Ben-Shabat <Roy@Twine-s.com> | 2018-06-20 16:24:10 +0300 |
|---|---|---|
| committer | Roy Ben-Shabat <Roy@Twine-s.com> | 2018-06-20 16:24:10 +0300 |
| commit | cda2e6fb9c2f6e92e3800a8d21a2691f5744bb6b (patch) | |
| tree | b791635c0030f5e9a41d7eacd3388b2aee685f50 /Software/Visual_Studio/PPC | |
| parent | bc5b579516e8b770338ff2924cc2215d1f46da2d (diff) | |
| download | Tango-cda2e6fb9c2f6e92e3800a8d21a2691f5744bb6b.tar.gz Tango-cda2e6fb9c2f6e92e3800a8d21a2691f5744bb6b.zip | |
Working on PPC...
Diffstat (limited to 'Software/Visual_Studio/PPC')
12 files changed, 100 insertions, 7 deletions
diff --git a/Software/Visual_Studio/PPC/Modules/Tango.PPC.Jobs/Images/JobView/delete.png b/Software/Visual_Studio/PPC/Modules/Tango.PPC.Jobs/Images/JobView/delete.png Binary files differnew file mode 100644 index 000000000..1e4cf9945 --- /dev/null +++ b/Software/Visual_Studio/PPC/Modules/Tango.PPC.Jobs/Images/JobView/delete.png diff --git a/Software/Visual_Studio/PPC/Modules/Tango.PPC.Jobs/Images/JobView/job-details.png b/Software/Visual_Studio/PPC/Modules/Tango.PPC.Jobs/Images/JobView/job-details.png Binary files differnew file mode 100644 index 000000000..e0ebc547e --- /dev/null +++ b/Software/Visual_Studio/PPC/Modules/Tango.PPC.Jobs/Images/JobView/job-details.png diff --git a/Software/Visual_Studio/PPC/Modules/Tango.PPC.Jobs/Images/JobView/remove.png b/Software/Visual_Studio/PPC/Modules/Tango.PPC.Jobs/Images/JobView/remove.png Binary files differnew file mode 100644 index 000000000..68ee07788 --- /dev/null +++ b/Software/Visual_Studio/PPC/Modules/Tango.PPC.Jobs/Images/JobView/remove.png diff --git a/Software/Visual_Studio/PPC/Modules/Tango.PPC.Jobs/Tango.PPC.Jobs.csproj b/Software/Visual_Studio/PPC/Modules/Tango.PPC.Jobs/Tango.PPC.Jobs.csproj index 810191efe..8381120e5 100644 --- a/Software/Visual_Studio/PPC/Modules/Tango.PPC.Jobs/Tango.PPC.Jobs.csproj +++ b/Software/Visual_Studio/PPC/Modules/Tango.PPC.Jobs/Tango.PPC.Jobs.csproj @@ -194,5 +194,14 @@ <ItemGroup> <Resource Include="Images\pantone.png" /> </ItemGroup> + <ItemGroup> + <Resource Include="Images\JobView\job-details.png" /> + </ItemGroup> + <ItemGroup> + <Resource Include="Images\JobView\delete.png" /> + </ItemGroup> + <ItemGroup> + <Resource Include="Images\JobView\remove.png" /> + </ItemGroup> <Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" /> </Project>
\ No newline at end of file diff --git a/Software/Visual_Studio/PPC/Modules/Tango.PPC.Jobs/ViewModels/JobViewVM.cs b/Software/Visual_Studio/PPC/Modules/Tango.PPC.Jobs/ViewModels/JobViewVM.cs index 59c6aafc3..99daba4cb 100644 --- a/Software/Visual_Studio/PPC/Modules/Tango.PPC.Jobs/ViewModels/JobViewVM.cs +++ b/Software/Visual_Studio/PPC/Modules/Tango.PPC.Jobs/ViewModels/JobViewVM.cs @@ -15,14 +15,14 @@ namespace Tango.PPC.Jobs.ViewModels /// <seealso cref="Tango.PPC.Common.PPCViewModel" /> public class JobViewVM : PPCViewModel { - private Job _selectedJob; + private Job _job; /// <summary> /// Gets or sets the selected job. /// </summary> - public Job SelectedJob + public Job Job { - get { return _selectedJob; } - set { _selectedJob = value; RaisePropertyChangedAuto(); } + get { return _job; } + set { _job = value; RaisePropertyChangedAuto(); } } /// <summary> @@ -39,7 +39,7 @@ namespace Tango.PPC.Jobs.ViewModels /// <param name="message">The message.</param> private void HandleJobSelectedMessage(JobSelectedMessage message) { - SelectedJob = message.Job; + Job = message.Job; } /// <summary> diff --git a/Software/Visual_Studio/PPC/Modules/Tango.PPC.Jobs/Views/JobView.xaml b/Software/Visual_Studio/PPC/Modules/Tango.PPC.Jobs/Views/JobView.xaml index 16a448d67..e82b0ad2c 100644 --- a/Software/Visual_Studio/PPC/Modules/Tango.PPC.Jobs/Views/JobView.xaml +++ b/Software/Visual_Studio/PPC/Modules/Tango.PPC.Jobs/Views/JobView.xaml @@ -4,7 +4,9 @@ xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" xmlns:d="http://schemas.microsoft.com/expression/blend/2008" xmlns:vm="clr-namespace:Tango.PPC.Jobs.ViewModels" + xmlns:touch="clr-namespace:Tango.Touch.Controls;assembly=Tango.Touch" xmlns:global="clr-namespace:Tango.PPC.Jobs" + xmlns:controls="clr-namespace:Tango.SharedUI.Controls;assembly=Tango.SharedUI" xmlns:local="clr-namespace:Tango.PPC.Jobs.Views" mc:Ignorable="d" d:DesignHeight="1280" d:DesignWidth="800" d:DataContext="{d:DesignInstance Type=vm:JobViewVM, IsDesignTimeCreatable=False}" DataContext="{x:Static global:ViewModelLocator.JobViewVM}"> @@ -18,7 +20,77 @@ <Border.Effect> <DropShadowEffect Color="Silver" ShadowDepth="0" BlurRadius="20" Opacity="1" /> </Border.Effect> - <TextBlock VerticalAlignment="Center" FontSize="{StaticResource TangoHeaderFontSize}" FontWeight="SemiBold" Text="{Binding SelectedJob.Name}"></TextBlock> + <TextBlock VerticalAlignment="Center" FontSize="{StaticResource TangoHeaderFontSize}" FontWeight="SemiBold" Text="{Binding Job.Name}"></TextBlock> </Border> + + <Grid Grid.Row="1"> + <StackPanel Orientation="Horizontal" HorizontalAlignment="Right" VerticalAlignment="Top" Height="57" Margin="0 -28 30 0"> + <touch:TouchButton Margin="0 0 30 0" Padding="15" Style="{StaticResource TangoRoundTouchButton}"> + <Image Source="../Images/JobView/delete.png" /> + </touch:TouchButton> + <touch:TouchButton Padding="20" Style="{StaticResource TangoRoundTouchButton}"> + <Image Source="../Images/JobView/remove.png" /> + </touch:TouchButton> + </StackPanel> + + <Grid Margin="10 60 10 0"> + <StackPanel> + <touch:TouchExpander Padding="20 15"> + <touch:TouchExpander.Header> + <StackPanel Orientation="Horizontal" VerticalAlignment="Center" Margin="0 0 20 0"> + <Image Source="../Images/JobView/job-details.png" Width="39" /> + <TextBlock FontWeight="Medium" Margin="20 0 0 0" VerticalAlignment="Center" FontSize="{StaticResource TangoExpanderHeaderFontSize}">Job Details</TextBlock> + + <TextBlock FontWeight="Medium" Margin="50 0 0 0" VerticalAlignment="Center" Text="{Binding Job.Rml.Name}"></TextBlock> + </StackPanel> + </touch:TouchExpander.Header> + + <StackPanel Margin="60 30 60 20" TextElement.FontWeight="Medium"> + <controls:TableGrid RowHeight="50"> + <TextBlock>Job name:</TextBlock> + <touch:TouchTextBox Text="{Binding Job.Name,UpdateSourceTrigger=PropertyChanged}" /> + <TextBlock>Customer name:</TextBlock> + <touch:TouchComboBox/> + <TextBlock>Thread type:</TextBlock> + <touch:TouchComboBox/> + <TextBlock>Comment:</TextBlock> + <TextBox Margin="20 0 0 -42" Text="{Binding Job.Description}" FocusVisualStyle="{x:Null}" BorderBrush="{StaticResource TangoDividerBrush}" Foreground="{StaticResource TangoDarkForegroundBrush}" AcceptsReturn="True" TextWrapping="Wrap" Height="60" Padding="5"> + + </TextBox> + </controls:TableGrid> + + <Grid HorizontalAlignment="Center" Margin="0 20 0 0" TextElement.Foreground="{StaticResource TangoGrayTextBrush}"> + <Grid.ColumnDefinitions> + <ColumnDefinition Width="Auto" /> + <ColumnDefinition Width="Auto" /> + <ColumnDefinition Width="Auto" /> + <ColumnDefinition Width="Auto" /> + <ColumnDefinition Width="Auto" /> + </Grid.ColumnDefinitions> + + <TextBlock HorizontalAlignment="Left"> + <Run Text="Job status:"></Run> + <Run Text="{Binding Job.JobStatus}"></Run> + </TextBlock> + + <Rectangle Margin="20 0" Grid.Column="1" HorizontalAlignment="Center" StrokeThickness="1" Stroke="{StaticResource TangoGrayTextBrush}" /> + + <TextBlock Grid.Column="2" HorizontalAlignment="Center"> + <Run Text="Last updated:"></Run> + <Run Text="{Binding Job.LastUpdated,Converter={StaticResource DateTimeUTCToShortDateConverter},TargetNullValue=Never}"></Run> + </TextBlock> + + <Rectangle Margin="20 0" Grid.Column="3" HorizontalAlignment="Center" StrokeThickness="1" Stroke="{StaticResource TangoGrayTextBrush}" /> + + <TextBlock Grid.Column="4" HorizontalAlignment="Right"> + <Run Text="Last dye:"></Run> + <Run Text="{Binding Job.LastRun,Converter={StaticResource DateTimeUTCToShortDateConverter},TargetNullValue=Never}"></Run> + </TextBlock> + </Grid> + </StackPanel> + </touch:TouchExpander> + </StackPanel> + </Grid> + </Grid> </Grid> </UserControl> diff --git a/Software/Visual_Studio/PPC/Tango.PPC.Common/Resources/Merged.xaml b/Software/Visual_Studio/PPC/Tango.PPC.Common/Resources/Merged.xaml index beb273e2e..405868e24 100644 --- a/Software/Visual_Studio/PPC/Tango.PPC.Common/Resources/Merged.xaml +++ b/Software/Visual_Studio/PPC/Tango.PPC.Common/Resources/Merged.xaml @@ -22,6 +22,7 @@ <converters:BooleanToVisibilityConverter x:Key="BooleanToVisibilityConverter" /> <converters:BooleanInverseConverter x:Key="BooleanInverseConverter" /> <converters:BooleanToVisibilityInverseConverter x:Key="BooleanToVisibilityInverseConverter" /> + <converters:DateTimeUTCToShortDateConverter x:Key="DateTimeUTCToShortDateConverter" /> </ResourceDictionary> </ResourceDictionary.MergedDictionaries> diff --git a/Software/Visual_Studio/PPC/Tango.PPC.UI/Images/GlobalStatus/ready-to-dye.png b/Software/Visual_Studio/PPC/Tango.PPC.UI/Images/GlobalStatus/ready-to-dye.png Binary files differnew file mode 100644 index 000000000..7edf624be --- /dev/null +++ b/Software/Visual_Studio/PPC/Tango.PPC.UI/Images/GlobalStatus/ready-to-dye.png diff --git a/Software/Visual_Studio/PPC/Tango.PPC.UI/MainWindow.xaml b/Software/Visual_Studio/PPC/Tango.PPC.UI/MainWindow.xaml index cabd05265..718eb5519 100644 --- a/Software/Visual_Studio/PPC/Tango.PPC.UI/MainWindow.xaml +++ b/Software/Visual_Studio/PPC/Tango.PPC.UI/MainWindow.xaml @@ -9,7 +9,8 @@ Title="MainWindow" Height="1000" Stylus.IsTapFeedbackEnabled="False" Stylus.IsPressAndHoldEnabled="False" Stylus.IsTouchFeedbackEnabled="False" Width="800" WindowStyle="SingleBorderWindow" ResizeMode="CanResize" WindowStartupLocation="CenterScreen" FontFamily="{StaticResource TangoFlexoFontFamily}" FontSize="{StaticResource TangoDefaultFontSize}" - Foreground="{StaticResource TangoDarkForegroundBrush}"> + Foreground="{StaticResource TangoDarkForegroundBrush}" + FontWeight="Medium"> <Grid> <views:MainView/> </Grid> diff --git a/Software/Visual_Studio/PPC/Tango.PPC.UI/Tango.PPC.UI.csproj b/Software/Visual_Studio/PPC/Tango.PPC.UI/Tango.PPC.UI.csproj index 2f6491be3..d4c2bb037 100644 --- a/Software/Visual_Studio/PPC/Tango.PPC.UI/Tango.PPC.UI.csproj +++ b/Software/Visual_Studio/PPC/Tango.PPC.UI/Tango.PPC.UI.csproj @@ -182,6 +182,7 @@ <DependentUpon>Settings.settings</DependentUpon> <DesignTimeSharedInput>True</DesignTimeSharedInput> </Compile> + <Resource Include="Images\GlobalStatus\ready-to-dye.png" /> <Resource Include="Images\user-profile.png" /> <Resource Include="Images\warning-test.png" /> <EmbeddedResource Include="Properties\Resources.resx"> diff --git a/Software/Visual_Studio/PPC/Tango.PPC.UI/ViewModels/LoginViewVM.cs b/Software/Visual_Studio/PPC/Tango.PPC.UI/ViewModels/LoginViewVM.cs index 5086fd323..6107a906d 100644 --- a/Software/Visual_Studio/PPC/Tango.PPC.UI/ViewModels/LoginViewVM.cs +++ b/Software/Visual_Studio/PPC/Tango.PPC.UI/ViewModels/LoginViewVM.cs @@ -35,6 +35,9 @@ namespace Tango.PPC.UI.ViewModels public LoginViewVM() { LoginCommand = new RelayCommand(Login); + + Email = "roy@twine-s.com"; + Password = "1234"; } public override void OnApplicationStarted() diff --git a/Software/Visual_Studio/PPC/Tango.PPC.UI/Views/LayoutView.xaml b/Software/Visual_Studio/PPC/Tango.PPC.UI/Views/LayoutView.xaml index 9e59b7f33..78d040d27 100644 --- a/Software/Visual_Studio/PPC/Tango.PPC.UI/Views/LayoutView.xaml +++ b/Software/Visual_Studio/PPC/Tango.PPC.UI/Views/LayoutView.xaml @@ -102,6 +102,12 @@ </touch:TouchHamburgerButton.Effect> </touch:TouchHamburgerButton> </Border> + <Grid DockPanel.Dock="Right" Margin="0 0 20 0"> + <StackPanel VerticalAlignment="Center"> + <Image Source="/Images/GlobalStatus/ready-to-dye.png" Width="33" /> + <TextBlock Margin="0 10 0 0">Ready to Dye</TextBlock> + </StackPanel> + </Grid> <Grid> <!--External Header Content Here--> </Grid> |
