diff options
| author | Avi Levkovich <avi@twine-s.com> | 2018-07-24 09:15:08 +0300 |
|---|---|---|
| committer | Avi Levkovich <avi@twine-s.com> | 2018-07-24 09:15:08 +0300 |
| commit | 7aaa8cb0c4b3c39c7583af89fcee5ea24e7b60ce (patch) | |
| tree | 3c28da76209e999558e31b549a22cbfad4374e05 /Software/Visual_Studio/PPC/Modules | |
| parent | 330ceb91550c91a42cabc2b536c282dcc4186b6e (diff) | |
| parent | cf743ba7e969541d729365f4a76e59c7c83d7d58 (diff) | |
| download | Tango-7aaa8cb0c4b3c39c7583af89fcee5ea24e7b60ce.tar.gz Tango-7aaa8cb0c4b3c39c7583af89fcee5ea24e7b60ce.zip | |
Merge branch 'master' of https://twinetfs.visualstudio.com/_git/Tango
Diffstat (limited to 'Software/Visual_Studio/PPC/Modules')
8 files changed, 280 insertions, 104 deletions
diff --git a/Software/Visual_Studio/PPC/Modules/Tango.PPC.Jobs/Properties/AssemblyInfo.cs b/Software/Visual_Studio/PPC/Modules/Tango.PPC.Jobs/Properties/AssemblyInfo.cs index 1e290e73e..ff46f9c9f 100644 --- a/Software/Visual_Studio/PPC/Modules/Tango.PPC.Jobs/Properties/AssemblyInfo.cs +++ b/Software/Visual_Studio/PPC/Modules/Tango.PPC.Jobs/Properties/AssemblyInfo.cs @@ -8,6 +8,7 @@ using System.Windows; // set of attributes. Change these attribute values to modify the information // associated with an assembly. [assembly: AssemblyTitle("Tango Panel PC Jobs Module")] +[assembly: AssemblyVersion("2.0.3.1536")] [assembly:ThemeInfo( ResourceDictionaryLocation.None, //where theme specific resource dictionaries are located 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 2cb924aa4..3a7ac381d 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 @@ -130,8 +130,8 @@ </Page> </ItemGroup> <ItemGroup> - <Compile Include="..\..\..\Versioning\PPC.cs"> - <Link>PPC.cs</Link> + <Compile Include="..\..\..\Versioning\GlobalVersionInfo.cs"> + <Link>GlobalVersionInfo.cs</Link> </Compile> <Compile Include="AppBarItems\JobProgressAppBarItem.cs" /> <Compile Include="AppBarItems\JobProgressAppBarItemView.xaml.cs"> @@ -335,4 +335,9 @@ <Folder Include="Images\NotificationItems\" /> </ItemGroup> <Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" /> + <ProjectExtensions> + <VisualStudio> + <UserProperties BuildVersion_AssemblyInfoFilename="Properties\AssemblyInfo.cs" BuildVersion_UpdateAssemblyVersion="True" BuildVersion_BuildVersioningStyle="None.None.Increment.TimeStamp" BuildVersion_UseGlobalSettings="False" BuildVersion_StartDate="2000/1/1" /> + </VisualStudio> + </ProjectExtensions> </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 7cc76bdcc..f3e7711f9 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 @@ -42,6 +42,16 @@ namespace Tango.PPC.Jobs.ViewModels #region Properties + private BL.Enumerations.JobStatuses _jobStatus; + /// <summary> + /// Gets or sets the temporary job status. + /// </summary> + public BL.Enumerations.JobStatuses JobStatus + { + get { return _jobStatus; } + set { _jobStatus = value; RaisePropertyChangedAuto(); } + } + private Job _job; /// <summary> /// Gets or sets the selected job. @@ -190,6 +200,20 @@ namespace Tango.PPC.Jobs.ViewModels /// </summary> public RelayCommand DyeCommand { get; set; } + /// <summary> + /// Gets or sets the approve sample command. + /// </summary> + public RelayCommand ApproveSampleCommand { get; set; } + + /// <summary> + /// Gets or sets the repeat sample dye command. + /// </summary> + public RelayCommand RepeatSampleDyeCommand { get; set; } + + /// <summary> + /// Gets or sets another sample command. + /// </summary> + public RelayCommand AnotherSampleCommand { get; set; } #endregion #region Constructors @@ -220,7 +244,7 @@ namespace Tango.PPC.Jobs.ViewModels RemoveSegmentCommand = new RelayCommand<Segment>(RemoveSegment); RemoveBrushStopCommand = new RelayCommand<BrushStop>(RemoveBrushStop); RemoveJobCommand = new RelayCommand(RemoveJob); - SaveJobCommand = new RelayCommand(SaveJob); + SaveJobCommand = new RelayCommand(() => SaveJob()); ReplaceBrushStopCommand = new RelayCommand<BrushStop>(InvokeColorAdjustmentForBrushStop); TwineCatalogFieldTapCommand = new RelayCommand<BrushStop>(InvokeTwineCatalogForBrushStop); IncreaseDecreaseSamplesToDyeCommand = new RelayCommand<string>((x) => @@ -240,6 +264,10 @@ namespace Tango.PPC.Jobs.ViewModels StartSampleDyeCommand = new RelayCommand(StartSampleDye); DyeCommand = new RelayCommand(StartJob, CanStartJob); + + ApproveSampleCommand = new RelayCommand(ApproveSampleDye); + RepeatSampleDyeCommand = new RelayCommand(RepeatSampleDye); + AnotherSampleCommand = new RelayCommand(DyeAnotherSample); } #endregion @@ -249,13 +277,22 @@ namespace Tango.PPC.Jobs.ViewModels /// <summary> /// Saves the job. /// </summary> - private async void SaveJob() + private async void SaveJob(bool displayNotification = true) { + if (JobStatus != BL.Enumerations.JobStatuses.Draft) + { + Job.JobStatus = JobStatus; + } + if (Job.Validate(_db)) { await _db.SaveChangesAsync(); RaiseMessage(new JobSavedMessage() { Job = Job }); - await NotificationProvider.ShowInfo(String.Format("Job '{0}' saved successfully.", Job.Name)); + + if (displayNotification) + { + await NotificationProvider.ShowInfo(String.Format("Job '{0}' saved successfully.", Job.Name)); + } } } @@ -468,11 +505,48 @@ namespace Tango.PPC.Jobs.ViewModels } } - MachineProvider.MachineOperator.Print(sampleDyeJob); + SaveJob(false); + + var thisJob = Job; + + MachineProvider.MachineOperator.Print(sampleDyeJob).Completed += (x, e) => + { + thisJob.JobStatus = BL.Enumerations.JobStatuses.PendingApproval; + + if (Job != null && Job.Guid == thisJob.Guid) + { + JobStatus = BL.Enumerations.JobStatuses.PendingApproval; + } + }; NavigationManager.NavigateTo<JobsModule>(nameof(JobProgressView)); } + /// <summary> + /// Sets the job status back to not approved. + /// </summary> + private void RepeatSampleDye() + { + JobStatus = BL.Enumerations.JobStatuses.Draft; + } + + /// <summary> + /// Approves the sample dye. + /// </summary> + private void ApproveSampleDye() + { + JobStatus = BL.Enumerations.JobStatuses.Approved; + SaveJob(false); + } + + /// <summary> + /// Dyes another sample. + /// </summary> + private void DyeAnotherSample() + { + JobStatus = BL.Enumerations.JobStatuses.Draft; + } + #endregion #region Out Of Gamut Check Thread @@ -521,51 +595,46 @@ namespace Tango.PPC.Jobs.ViewModels /// </summary> public async override void OnNavigatedTo() { - if (_job_to_load == null || (_job_to_load != null && Job != null && _job_to_load.Guid == Job.Guid)) + if (!(_job_to_load == null || (_job_to_load != null && Job != null && _job_to_load.Guid == Job.Guid))) { - if (_job_to_load_intent == JobNavigationIntent.SampleDye) + NotificationProvider.SetGlobalBusyMessage("Loading job details..."); + + _can_navigate_back = false; + base.OnNavigatedTo(); + + if (_db != null) { - View.DisplaySampleDye(); + _db.Dispose(); } - return; - } - NotificationProvider.SetGlobalBusyMessage("Loading job details..."); + _db = ObservablesContext.CreateDefault(); + var a = _db.Jobs.ToList(); + Job = await _db.Jobs.SingleOrDefaultAsync(x => x.Guid == _job_to_load.Guid); + Job.ValidateOnPropertyChanged = true; + Rmls = await _db.Rmls.ToListAsync(); + ColorSpaces = await _db.ColorSpaces.ToListAsync(); + SpoolTypes = await _db.SpoolTypes.ToListAsync(); + Customers = await _db.Customers.Where(x => x.OrganizationGuid == MachineProvider.Machine.OrganizationGuid).ToListAsync(); - _can_navigate_back = false; - base.OnNavigatedTo(); + if (!_check_gamut_thread.IsAlive) + { + _check_gamut_thread.Start(); + } - if (_db != null) - { - _db.Dispose(); - } + SegmentsCollectionView = CollectionViewSource.GetDefaultView(Job.Segments); + SegmentsCollectionView.SortDescriptions.Add(new SortDescription(nameof(Segment.SegmentIndex), ListSortDirection.Ascending)); - _db = ObservablesContext.CreateDefault(); - var a = _db.Jobs.ToList(); - Job = await _db.Jobs.SingleOrDefaultAsync(x => x.Guid == _job_to_load.Guid); - Job.ValidateOnPropertyChanged = true; - Rmls = await _db.Rmls.ToListAsync(); - ColorSpaces = await _db.ColorSpaces.ToListAsync(); - SpoolTypes = await _db.SpoolTypes.ToListAsync(); - Customers = await _db.Customers.Where(x => x.OrganizationGuid == MachineProvider.Machine.OrganizationGuid).ToListAsync(); + InvokeUIOnIdle(() => + { + NotificationProvider.ReleaseGlobalBusyMessage(); + }); - if (!_check_gamut_thread.IsAlive) - { - _check_gamut_thread.Start(); + _job_to_load = null; } - SegmentsCollectionView = CollectionViewSource.GetDefaultView(Job.Segments); - SegmentsCollectionView.SortDescriptions.Add(new SortDescription(nameof(Segment.SegmentIndex), ListSortDirection.Ascending)); - - InvokeUIOnIdle(() => - { - NotificationProvider.ReleaseGlobalBusyMessage(); - }); - - _job_to_load = null; - if (_job_to_load_intent == JobNavigationIntent.SampleDye) { + JobStatus = Job.JobStatus; View.DisplaySampleDye(); } } diff --git a/Software/Visual_Studio/PPC/Modules/Tango.PPC.Jobs/Views/JobProgressView.xaml b/Software/Visual_Studio/PPC/Modules/Tango.PPC.Jobs/Views/JobProgressView.xaml index 32f4cc7be..eb5497bd8 100644 --- a/Software/Visual_Studio/PPC/Modules/Tango.PPC.Jobs/Views/JobProgressView.xaml +++ b/Software/Visual_Studio/PPC/Modules/Tango.PPC.Jobs/Views/JobProgressView.xaml @@ -21,17 +21,17 @@ <TextBlock FontSize="{StaticResource TangoHeaderFontSize}" HorizontalAlignment="Center" Text="{Binding Job.Name,FallbackValue='Job Name'}"></TextBlock> <Grid Margin="0 80 0 0"> + <touch:TouchRingProgress Width="364" Height="364" RingThickness="10"> <touch:TouchRingProgress.Style> <Style TargetType="touch:TouchRingProgress"> + <Setter Property="Visibility" Value="Visible"></Setter> <Setter Property="Foreground" Value="{StaticResource TangoPrimaryAccentBrush}"></Setter> - <Setter Property="Maximum" Value="{Binding RunningJobStatus.TotalProgressWithoutFinalization}"></Setter> - <Setter Property="Value" Value="{Binding RunningJobStatus.ProgressWithoutFinalization}"></Setter> + <Setter Property="Maximum" Value="{Binding RunningJobStatus.TotalProgressMinusSettingUp}"></Setter> + <Setter Property="Value" Value="{Binding RunningJobStatus.ProgressMinusSettingUp}"></Setter> <Style.Triggers> - <DataTrigger Binding="{Binding RunningJobStatus.IsFinalizing}" Value="True"> - <Setter Property="Foreground" Value="{StaticResource TangoSuccessBrush}"></Setter> - <Setter Property="Maximum" Value="{Binding RunningJobStatus.FinalizingTotalProgress}"></Setter> - <Setter Property="Value" Value="{Binding RunningJobStatus.FinalizingProgress}"></Setter> + <DataTrigger Binding="{Binding RunningJobStatus.IsSettingUp}" Value="False"> + <Setter Property="Visibility" Value="Visible"></Setter> </DataTrigger> <DataTrigger Binding="{Binding RunningJobStatus.IsCompleted}" Value="True"> <Setter Property="Foreground" Value="{StaticResource TangoSuccessBrush}"></Setter> @@ -47,16 +47,30 @@ </touch:TouchRingProgress.Style> </touch:TouchRingProgress> + <touch:TouchBusyIndicator Width="360" Height="360" StrokeThickness="10" IsIndeterminate="{Binding RunningJobStatus.IsSettingUp}" Visibility="{Binding RunningJobStatus.IsSettingUp,Converter={StaticResource BooleanToVisibilityConverter}}"> + + </touch:TouchBusyIndicator> + <StackPanel VerticalAlignment="Center" HorizontalAlignment="Center"> - <StackPanel Orientation="Horizontal" HorizontalAlignment="Center"> - <Image Source="../Images/JobProgressView/drop.png" Stretch="None" /> - <TextBlock Margin="5 0 0 0" VerticalAlignment="Center" FontSize="{StaticResource TangoTitleFontSize}">Completed</TextBlock> - </StackPanel> - <TextBlock FontSize="40" Margin="0 10 0 0" HorizontalAlignment="Center"> - <Run Text="{Binding RunningJobStatus.ProgressWithoutFinalization,StringFormat=0,FallbackValue=0}"></Run><Run Text="/" /><Run Text="{Binding RunningJobStatus.TotalProgressWithoutFinalization,StringFormat=0,FallbackValue=0}"/> + <StackPanel Visibility="{Binding RunningJobStatus.IsSettingUp,Converter={StaticResource BooleanToVisibilityInverseConverter}}"> + <StackPanel Orientation="Horizontal" HorizontalAlignment="Center"> + <Image Source="../Images/JobProgressView/drop.png" Stretch="None" /> + <TextBlock Margin="5 0 0 0" VerticalAlignment="Center" FontSize="{StaticResource TangoTitleFontSize}">Completed</TextBlock> + </StackPanel> + + <TextBlock FontSize="40" Margin="0 10 0 0" HorizontalAlignment="Center"> + <Run Text="{Binding RunningJobStatus.ProgressMinusSettingUp,StringFormat=0,FallbackValue=0}"></Run><Run Text="/" /><Run Text="{Binding RunningJobStatus.TotalProgressMinusSettingUp,StringFormat=0,FallbackValue=0}"/> <Run FontSize="16">m</Run> - </TextBlock> + </TextBlock> + </StackPanel> + + <StackPanel Height="90" Visibility="{Binding RunningJobStatus.IsSettingUp,Converter={StaticResource BooleanToVisibilityConverter}}"> + <StackPanel Orientation="Horizontal" HorizontalAlignment="Center"> + <Image Source="../Images/JobProgressView/drop.png" Stretch="None" /> + <TextBlock Margin="5 0 0 0" VerticalAlignment="Center" FontSize="{StaticResource TangoTitleFontSize}">Getting ready...</TextBlock> + </StackPanel> + </StackPanel> <Rectangle Margin="0 10 0 0" Width="250" Stroke="{StaticResource TangoDividerBrush}" /> @@ -76,13 +90,24 @@ <StackPanel> <Canvas Height="80" Margin="5 0"> <StackPanel> - <Canvas.Left> - <MultiBinding Converter="{StaticResource JobProgressToPositionConverter}"> - <Binding Path="RunningJobStatus.CurrentUnitProgress" /> - <Binding Path="RunningJobStatus.CurrentUnitTotalProgress" /> - <Binding RelativeSource="{RelativeSource AncestorType=Canvas}" Path="ActualWidth" /> - </MultiBinding> - </Canvas.Left> + <StackPanel.Style> + <Style TargetType="StackPanel"> + <Setter Property="Canvas.Left"> + <Setter.Value> + <MultiBinding Converter="{StaticResource JobProgressToPositionConverter}"> + <Binding Path="RunningJobStatus.CurrentUnitProgress" /> + <Binding Path="RunningJobStatus.CurrentUnitTotalProgress" /> + <Binding RelativeSource="{RelativeSource AncestorType=Canvas}" Path="ActualWidth" /> + </MultiBinding> + </Setter.Value> + </Setter> + <Style.Triggers> + <DataTrigger Binding="{Binding RunningJobStatus.IsSettingUp}" Value="True"> + <Setter Property="Canvas.Left" Value="0"></Setter> + </DataTrigger> + </Style.Triggers> + </Style> + </StackPanel.Style> <StackPanel Margin="-50 0 0 0"> <ContentControl> <ContentControl.Style> @@ -95,8 +120,8 @@ <Style TargetType="TextBlock"> <Setter Property="Text" Value="now dying"></Setter> <Style.Triggers> - <DataTrigger Binding="{Binding RunningJobStatus.IsFinalizing}" Value="True"> - <Setter Property="Text" Value="finalizing"></Setter> + <DataTrigger Binding="{Binding RunningJobStatus.IsSettingUp}" Value="True"> + <Setter Property="Text" Value="getting ready"></Setter> </DataTrigger> </Style.Triggers> </Style> diff --git a/Software/Visual_Studio/PPC/Modules/Tango.PPC.Jobs/Views/JobSummeryView.xaml b/Software/Visual_Studio/PPC/Modules/Tango.PPC.Jobs/Views/JobSummeryView.xaml index 330a916f4..3d2f7daa8 100644 --- a/Software/Visual_Studio/PPC/Modules/Tango.PPC.Jobs/Views/JobSummeryView.xaml +++ b/Software/Visual_Studio/PPC/Modules/Tango.PPC.Jobs/Views/JobSummeryView.xaml @@ -36,7 +36,7 @@ <TextBlock Margin="20 0 0 0" VerticalAlignment="Center">EDIT</TextBlock> </StackPanel> </touch:TouchButton> - <touch:TouchButton IsEnabled="{Binding MachineProvider.MachineOperator.CanPrint}" FontSize="{StaticResource TangoExpanderHeaderFontSize}" Margin="20 0 0 0" Height="80" Padding="0" Width="270" CornerRadius="40" BlurRadius="20" HorizontalAlignment="Right" Command="{Binding DyeCommand}"> + <touch:TouchButton IsEnabled="{Binding MachineProvider.MachineOperator.CanPrint}" FontSize="{StaticResource TangoExpanderHeaderFontSize}" Margin="20 0 0 0" Height="80" Padding="0" Width="270" CornerRadius="40" BlurRadius="20" HorizontalAlignment="Right" DelayCommand="{Binding DyeCommand}" DelayCommandDuration="00:00:0.3"> <StackPanel Orientation="Horizontal"> <TextBlock VerticalAlignment="Center">DYE</TextBlock> <touch:TouchIcon Margin="20 0 0 0" Icon="ChevronRight" Width="14" /> 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 d5f77fc5d..bfd571db0 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 @@ -574,55 +574,129 @@ <StackPanel Margin="60 20 0 0"> - <ContentControl Content="{Binding RelativeSource={RelativeSource AncestorType=UserControl},Path=DataContext}"> + <ContentControl> <ContentControl.Style> <Style TargetType="ContentControl"> - <Setter Property="ContentTemplate"> + <Setter Property="Content"> <Setter.Value> - <DataTemplate> - <StackPanel> - <TextBlock> + <StackPanel> + <ContentControl Content="{Binding RelativeSource={RelativeSource AncestorType=UserControl},Path=DataContext}"> + <ContentControl.Style> + <Style TargetType="ContentControl"> + <Setter Property="ContentTemplate"> + <Setter.Value> + <DataTemplate> + <StackPanel> + <TextBlock> <Run>Dye 1 or more units in order to get approval.</Run> <LineBreak/> <Run>Once approved, you can dye the entire job.</Run> - </TextBlock> + </TextBlock> - <DockPanel Margin="0 50 0 0" LastChildFill="True" Width="450" HorizontalAlignment="Left"> - <TextBlock DockPanel.Dock="Left" VerticalAlignment="Center">How many sample units?</TextBlock> + <DockPanel Margin="0 50 0 0" LastChildFill="True" Width="450" HorizontalAlignment="Left"> + <TextBlock DockPanel.Dock="Left" VerticalAlignment="Center">How many sample units?</TextBlock> - <DockPanel Margin="50 0 0 0"> - <touch:TouchIconButton Command="{Binding IncreaseDecreaseSamplesToDyeCommand}" CommandParameter="-" DockPanel.Dock="Left" Icon="Minus" Padding="15" Style="{StaticResource TangoHollowButton}" BorderThickness="2" Width="51" Height="51" /> - <touch:TouchIconButton Command="{Binding IncreaseDecreaseSamplesToDyeCommand}" CommandParameter="+" DockPanel.Dock="Right" Icon="Plus" Padding="15" Style="{StaticResource TangoHollowButton}" BorderThickness="2" Width="51" Height="51" /> - <touch:TouchNumericTextBox Value="{Binding Job.SampleUnitsOrMeters}" Minimum="1" Maximum="100" HorizontalContentAlignment="Center" VerticalAlignment="Center" Margin="10 0" Foreground="{StaticResource TangoPrimaryAccentBrush}" FontSize="{StaticResource TangoTitleFontSize}" DockPanel.Dock="Right" KeyboardContainer="{Binding ElementName=Container}" /> - </DockPanel> - </DockPanel> - </StackPanel> - </DataTemplate> + <DockPanel Margin="50 0 0 0"> + <touch:TouchIconButton Command="{Binding IncreaseDecreaseSamplesToDyeCommand}" CommandParameter="-" DockPanel.Dock="Left" Icon="Minus" Padding="15" Style="{StaticResource TangoHollowButton}" BorderThickness="2" Width="51" Height="51" /> + <touch:TouchIconButton Command="{Binding IncreaseDecreaseSamplesToDyeCommand}" CommandParameter="+" DockPanel.Dock="Right" Icon="Plus" Padding="15" Style="{StaticResource TangoHollowButton}" BorderThickness="2" Width="51" Height="51" /> + <touch:TouchNumericTextBox Value="{Binding Job.SampleUnitsOrMeters}" Minimum="1" Maximum="100" HorizontalContentAlignment="Center" VerticalAlignment="Center" Margin="10 0" Foreground="{StaticResource TangoPrimaryAccentBrush}" FontSize="{StaticResource TangoTitleFontSize}" DockPanel.Dock="Right" KeyboardContainer="{Binding ElementName=Container}" /> + </DockPanel> + </DockPanel> + </StackPanel> + </DataTemplate> + </Setter.Value> + </Setter> + <Style.Triggers> + <DataTrigger Binding="{Binding Job.JobType}" Value="{x:Static enumerations:JobTypes.Sewing}"> + <Setter Property="ContentTemplate"> + <Setter.Value> + <DataTemplate> + <StackPanel> + <TextBlock> + <Run>Dye several meters per segment in order to get approval.</Run> + <LineBreak/> + <Run>Once approved, you can dye the entire job.</Run> + </TextBlock> + + <DockPanel Margin="0 50 0 0" LastChildFill="True" Width="450" HorizontalAlignment="Left"> + <TextBlock DockPanel.Dock="Left" VerticalAlignment="Center">Meters per segment</TextBlock> + + <DockPanel Margin="50 0 0 0"> + <touch:TouchIconButton Command="{Binding IncreaseDecreaseSamplesToDyeCommand}" CommandParameter="-" DockPanel.Dock="Left" Icon="Minus" Padding="15" Style="{StaticResource TangoHollowButton}" BorderThickness="2" Width="51" Height="51" /> + <touch:TouchIconButton Command="{Binding IncreaseDecreaseSamplesToDyeCommand}" CommandParameter="+" DockPanel.Dock="Right" Icon="Plus" Padding="15" Style="{StaticResource TangoHollowButton}" BorderThickness="2" Width="51" Height="51" /> + <touch:TouchNumericTextBox Value="{Binding Job.SampleUnitsOrMeters}" Minimum="1" Maximum="100" HorizontalContentAlignment="Center" VerticalAlignment="Center" Margin="10 0" Foreground="{StaticResource TangoPrimaryAccentBrush}" FontSize="{StaticResource TangoTitleFontSize}" DockPanel.Dock="Right" KeyboardContainer="{Binding ElementName=Container}" /> + </DockPanel> + </DockPanel> + </StackPanel> + </DataTemplate> + </Setter.Value> + </Setter> + </DataTrigger> + </Style.Triggers> + </Style> + </ContentControl.Style> + </ContentControl> + + <touch:TouchButton Margin="0 50 0 15" DockPanel.Dock="Right" Height="54" Padding="0" Width="184" CornerRadius="30" BlurRadius="20" HorizontalAlignment="Right" Command="{Binding StartSampleDyeCommand}"> + START + </touch:TouchButton> + </StackPanel> </Setter.Value> </Setter> + <Style.Triggers> - <DataTrigger Binding="{Binding Job.JobType}" Value="{x:Static enumerations:JobTypes.Sewing}"> - <Setter Property="ContentTemplate"> + <DataTrigger Binding="{Binding JobStatus}" Value="{x:Static enumerations:JobStatuses.PendingApproval}"> + <Setter Property="Content"> <Setter.Value> - <DataTemplate> - <StackPanel> - <TextBlock> - <Run>Dye several meters per segment in order to get approval.</Run> - <LineBreak/> - <Run>Once approved, you can dye the entire job.</Run> - </TextBlock> + <StackPanel> + <TextBlock>How to continue?</TextBlock> - <DockPanel Margin="0 50 0 0" LastChildFill="True" Width="450" HorizontalAlignment="Left"> - <TextBlock DockPanel.Dock="Left" VerticalAlignment="Center">Meters per segment</TextBlock> + <UniformGrid Columns="2" Width="420" HorizontalAlignment="Left" Margin="0 40 0 20"> + <StackPanel HorizontalAlignment="Left"> + <touch:TouchButton Style="{StaticResource TangoHollowButton}" Width="180" Height="50" Command="{Binding ApproveSampleCommand}"> + <StackPanel Orientation="Horizontal"> + <touch:TouchIcon Icon="Check"></touch:TouchIcon> + <TextBlock Margin="10 0 0 0">DONE</TextBlock> + </StackPanel> + </touch:TouchButton> - <DockPanel Margin="50 0 0 0"> - <touch:TouchIconButton Command="{Binding IncreaseDecreaseSamplesToDyeCommand}" CommandParameter="-" DockPanel.Dock="Left" Icon="Minus" Padding="15" Style="{StaticResource TangoHollowButton}" BorderThickness="2" Width="51" Height="51" /> - <touch:TouchIconButton Command="{Binding IncreaseDecreaseSamplesToDyeCommand}" CommandParameter="+" DockPanel.Dock="Right" Icon="Plus" Padding="15" Style="{StaticResource TangoHollowButton}" BorderThickness="2" Width="51" Height="51" /> - <touch:TouchNumericTextBox Value="{Binding Job.SampleUnitsOrMeters}" Minimum="1" Maximum="100" HorizontalContentAlignment="Center" VerticalAlignment="Center" Margin="10 0" Foreground="{StaticResource TangoPrimaryAccentBrush}" FontSize="{StaticResource TangoTitleFontSize}" DockPanel.Dock="Right" KeyboardContainer="{Binding ElementName=Container}" /> - </DockPanel> - </DockPanel> - </StackPanel> - </DataTemplate> + <TextBlock Margin="0 15 0 0" TextAlignment="Center">The sample is approved</TextBlock> + </StackPanel> + + <StackPanel HorizontalAlignment="Right"> + <touch:TouchButton Style="{StaticResource TangoHollowButton}" Width="180" Height="50" Command="{Binding RepeatSampleDyeCommand}"> + <StackPanel Orientation="Horizontal"> + <touch:TouchIcon Icon="Repeat"></touch:TouchIcon> + <TextBlock Margin="10 0 0 0">REPEAT</TextBlock> + </StackPanel> + </touch:TouchButton> + + <TextBlock Margin="0 15 0 0" TextAlignment="Center">Dye more samples</TextBlock> + </StackPanel> + </UniformGrid> + + </StackPanel> + </Setter.Value> + </Setter> + </DataTrigger> + + <DataTrigger Binding="{Binding JobStatus}" Value="{x:Static enumerations:JobStatuses.Approved}"> + <Setter Property="Content"> + <Setter.Value> + <StackPanel Margin="0 40 80 40"> + <DockPanel LastChildFill="False"> + <TextBlock DockPanel.Dock="Left" VerticalAlignment="Center"> + <Run>Sample Approved:</Run> + <Run Text="{Binding Job.LastUpdated,Converter={StaticResource DateTimeUTCToShortDateConverter}}"></Run> + </TextBlock> + <touch:TouchButton DockPanel.Dock="Right" HorizontalAlignment="Right" Style="{StaticResource TangoHollowButton}" Width="220" Height="50" Command="{Binding AnotherSampleCommand}"> + <StackPanel Orientation="Horizontal"> + <touch:TouchIcon Icon="Plus"></touch:TouchIcon> + <TextBlock Margin="10 0 0 0">ANOTHER SAMPLE</TextBlock> + </StackPanel> + </touch:TouchButton> + </DockPanel> + </StackPanel> </Setter.Value> </Setter> </DataTrigger> @@ -630,10 +704,6 @@ </Style> </ContentControl.Style> </ContentControl> - - <touch:TouchButton Margin="0 50 0 15" DockPanel.Dock="Right" Height="54" Padding="0" Width="184" CornerRadius="30" BlurRadius="20" HorizontalAlignment="Right" Command="{Binding StartSampleDyeCommand}"> - START - </touch:TouchButton> </StackPanel> </touch:TouchExpander> </StackPanel> @@ -654,7 +724,7 @@ <Border Padding="20 20"> <Grid> <DockPanel> - <touch:TouchButton IsEnabled="{Binding MachineProvider.MachineOperator.CanPrint}" DockPanel.Dock="Right" Height="54" Padding="0" Width="184" CornerRadius="30" BlurRadius="20" HorizontalAlignment="Right" Command="{Binding DyeCommand}"> + <touch:TouchButton IsEnabled="{Binding MachineProvider.MachineOperator.CanPrint}" DockPanel.Dock="Right" Height="54" Padding="0" Width="184" CornerRadius="30" BlurRadius="20" HorizontalAlignment="Right" DelayCommand="{Binding DyeCommand}" DelayCommandDuration="00:00:0.3"> DYE </touch:TouchButton> diff --git a/Software/Visual_Studio/PPC/Modules/Tango.PPC.Synchronization/Properties/AssemblyInfo.cs b/Software/Visual_Studio/PPC/Modules/Tango.PPC.Synchronization/Properties/AssemblyInfo.cs index a9ea5b8b0..7252dea6d 100644 --- a/Software/Visual_Studio/PPC/Modules/Tango.PPC.Synchronization/Properties/AssemblyInfo.cs +++ b/Software/Visual_Studio/PPC/Modules/Tango.PPC.Synchronization/Properties/AssemblyInfo.cs @@ -8,6 +8,7 @@ using System.Windows; // set of attributes. Change these attribute values to modify the information // associated with an assembly. [assembly: AssemblyTitle("Tango Module")] +[assembly: AssemblyVersion("2.0.*")] [assembly: ThemeInfo( ResourceDictionaryLocation.None, //where theme specific resource dictionaries are located diff --git a/Software/Visual_Studio/PPC/Modules/Tango.PPC.Synchronization/Tango.PPC.Synchronization.csproj b/Software/Visual_Studio/PPC/Modules/Tango.PPC.Synchronization/Tango.PPC.Synchronization.csproj index 0d4e79212..257ddf58d 100644 --- a/Software/Visual_Studio/PPC/Modules/Tango.PPC.Synchronization/Tango.PPC.Synchronization.csproj +++ b/Software/Visual_Studio/PPC/Modules/Tango.PPC.Synchronization/Tango.PPC.Synchronization.csproj @@ -74,8 +74,8 @@ </Page> </ItemGroup> <ItemGroup> - <Compile Include="..\..\..\Versioning\PPC.cs"> - <Link>PPC.cs</Link> + <Compile Include="..\..\..\Versioning\GlobalVersionInfo.cs"> + <Link>GlobalVersionInfo.cs</Link> </Compile> <Compile Include="MyModule.cs" /> <Compile Include="Properties\AssemblyInfo.cs"> @@ -153,4 +153,9 @@ <Resource Include="Images\ppc-module.png" /> </ItemGroup> <Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" /> + <ProjectExtensions> + <VisualStudio> + <UserProperties BuildVersion_AssemblyInfoFilename="Properties\AssemblyInfo.cs" BuildVersion_UpdateAssemblyVersion="True" BuildVersion_BuildVersioningStyle="None.None.Increment.TimeStamp" BuildVersion_UseGlobalSettings="False" BuildVersion_StartDate="2000/1/1" /> + </VisualStudio> + </ProjectExtensions> </Project>
\ No newline at end of file |
