aboutsummaryrefslogtreecommitdiffstats
path: root/Software/Visual_Studio/PPC/Modules
diff options
context:
space:
mode:
authorVictoria Plitt <Victoria.Plitt@twine-s.com>2023-04-30 14:53:18 +0300
committerVictoria Plitt <Victoria.Plitt@twine-s.com>2023-04-30 14:53:18 +0300
commited58cf7cef3ff2df02a535df5f45bb51369d338e (patch)
tree5b719b15c208462b1c855ff48c5d11c11ce0bfc6 /Software/Visual_Studio/PPC/Modules
parent19c3ce7f77cd4a78c5438db2d4385e5daaad4624 (diff)
downloadTango-ed58cf7cef3ff2df02a535df5f45bb51369d338e.tar.gz
Tango-ed58cf7cef3ff2df02a535df5f45bb51369d338e.zip
Add new job.
Diffstat (limited to 'Software/Visual_Studio/PPC/Modules')
-rw-r--r--Software/Visual_Studio/PPC/Modules/Tango.PPC.JobsV2/ViewModels/JobViewVM.cs1
-rw-r--r--Software/Visual_Studio/PPC/Modules/Tango.PPC.JobsV2/ViewModels/JobsViewVM.cs56
-rw-r--r--Software/Visual_Studio/PPC/Modules/Tango.PPC.JobsV2/Views/JobEurekaView.xaml4
-rw-r--r--Software/Visual_Studio/PPC/Modules/Tango.PPC.JobsV2/Views/JobsView.xaml41
4 files changed, 76 insertions, 26 deletions
diff --git a/Software/Visual_Studio/PPC/Modules/Tango.PPC.JobsV2/ViewModels/JobViewVM.cs b/Software/Visual_Studio/PPC/Modules/Tango.PPC.JobsV2/ViewModels/JobViewVM.cs
index 6227610e4..a02005776 100644
--- a/Software/Visual_Studio/PPC/Modules/Tango.PPC.JobsV2/ViewModels/JobViewVM.cs
+++ b/Software/Visual_Studio/PPC/Modules/Tango.PPC.JobsV2/ViewModels/JobViewVM.cs
@@ -1536,6 +1536,7 @@ namespace Tango.PPC.Jobs.ViewModels
Job.ColorSpace = colorSpaces.FirstOrDefault();
Job.Version = 2;
+ Job.Name = JobModel.Name;
Job.NumberOfUnits = JobModel.NumberOfUnits;
Job.EnableInterSegment = JobModel.InterSegmentLength > 0;
Job.InterSegmentLength = JobModel.InterSegmentLength;
diff --git a/Software/Visual_Studio/PPC/Modules/Tango.PPC.JobsV2/ViewModels/JobsViewVM.cs b/Software/Visual_Studio/PPC/Modules/Tango.PPC.JobsV2/ViewModels/JobsViewVM.cs
index ebc396a39..fa78430bd 100644
--- a/Software/Visual_Studio/PPC/Modules/Tango.PPC.JobsV2/ViewModels/JobsViewVM.cs
+++ b/Software/Visual_Studio/PPC/Modules/Tango.PPC.JobsV2/ViewModels/JobsViewVM.cs
@@ -433,37 +433,47 @@ namespace Tango.PPC.Jobs.ViewModels
await Task.Delay(200);
}
var selectedRmlGuid = Settings.DefaultRmlGuid;
- JobCreationViewVM vm = new JobCreationViewVM(_spoolTypes.ToList(), _rmls.ToList(), selectedRmlGuid, 0, false);
-
- var selectedSpoolTypeGuid = Settings.SpoolTypeGuid;
- vm.SelectedSpoolType = false == String.IsNullOrEmpty(selectedSpoolTypeGuid) ? _spoolTypes.FirstOrDefault(x => x.Guid == selectedSpoolTypeGuid) : _spoolTypes.FirstOrDefault(x => x.Type == SpoolTypes.StandardSpool);
- if (twnFile == null)
- {
- vm = await NotificationProvider.ShowDialog<JobCreationViewVM>(vm);
- if (!vm.DialogResult) return;
-
- if (vm.SelectedRML != null)
- {
- selectedRmlGuid = vm.SelectedRML.Guid;
- }
- if (vm.SelectedSpoolType != null)
- {
- selectedSpoolTypeGuid = vm.SelectedSpoolType.Guid;
- }
-
- }
-
Job job = new Job();
job.LastUpdated = DateTime.UtcNow;
job.JobSource = JobSource.Local;
- job.Name = vm.JobName;
job.NumberOfHeads = 1;
job.NumberOfUnits = 1;
job.SampleUnitsOrMeters = 1;
job.CreationDate = DateTime.UtcNow;
job.JobStatus = JobStatuses.Draft;
- job.EnableInterSegment = vm.WhiteGap > 0;
- job.InterSegmentLength = vm.WhiteGap;
+
+ var selectedSpoolTypeGuid = Settings.SpoolTypeGuid;
+
+ if (BuildProvider.IsEureka)
+ {
+ job.Name = "Unnamed";
+ job.EnableInterSegment = false;
+ job.InterSegmentLength = 0;
+ }
+ else
+ {
+ JobCreationViewVM vm = new JobCreationViewVM(_spoolTypes.ToList(), _rmls.ToList(), selectedRmlGuid, 0, false);
+ vm.SelectedSpoolType = false == String.IsNullOrEmpty(selectedSpoolTypeGuid) ? _spoolTypes.FirstOrDefault(x => x.Guid == selectedSpoolTypeGuid) : _spoolTypes.FirstOrDefault(x => x.Type == SpoolTypes.StandardSpool);
+ if (twnFile == null)
+ {
+ vm = await NotificationProvider.ShowDialog<JobCreationViewVM>(vm);
+ if (!vm.DialogResult)
+ return;
+
+ if (vm.SelectedRML != null)
+ {
+ selectedRmlGuid = vm.SelectedRML.Guid;
+ }
+ if (vm.SelectedSpoolType != null)
+ {
+ selectedSpoolTypeGuid = vm.SelectedSpoolType.Guid;
+ }
+ job.Name = vm.JobName;
+ job.EnableInterSegment = vm.WhiteGap > 0;
+ job.InterSegmentLength = vm.WhiteGap;
+ }
+ }
+
//job.JobType = vm.SelectedJobType;
job.EnableLubrication = true;
//job.ColorSpaceGuid = Adapter.ColorSpaces.FirstOrDefault(x => x.Code == vm.SelectedColorSpace.ToInt32()).Guid;
diff --git a/Software/Visual_Studio/PPC/Modules/Tango.PPC.JobsV2/Views/JobEurekaView.xaml b/Software/Visual_Studio/PPC/Modules/Tango.PPC.JobsV2/Views/JobEurekaView.xaml
index a95ae42b8..5782d77a2 100644
--- a/Software/Visual_Studio/PPC/Modules/Tango.PPC.JobsV2/Views/JobEurekaView.xaml
+++ b/Software/Visual_Studio/PPC/Modules/Tango.PPC.JobsV2/Views/JobEurekaView.xaml
@@ -857,7 +857,7 @@
<StackPanel Orientation="Vertical" VerticalAlignment="Top">
<DockPanel HorizontalAlignment="Stretch" Margin="60 20 60 0">
- <TextBlock HorizontalAlignment="Left" Margin="0 10 0 0" Text="Thread Type" FontSize="{StaticResource TangoButtonFontSize}" Width="145"/>
+ <TextBlock HorizontalAlignment="Left" Margin="0 10 0 0" Text="Thread" FontSize="{StaticResource TangoButtonFontSize}" Width="145"/>
<Border Margin="20 0 0 0" BorderThickness="1" Height="44" CornerRadius="12" BorderBrush="{StaticResource TangoMidAccentBrush}">
<touch:TouchComboBox Margin="20 0 10 10" ItemsSource="{Binding Rmls}" SelectedItem="{Binding SelectedRML ,Mode=TwoWay}" Focusable="False" KeyboardNavigation.TabNavigation ="None">
<touch:TouchComboBox.ItemTemplate>
@@ -1350,7 +1350,7 @@
</Style>
</touch:TouchIconButton.Style>
</touch:TouchIconButton>-->
- <TextBlock Margin="20 0 40 0" MaxWidth="410" TextWrapping="NoWrap" TextTrimming="CharacterEllipsis" Text="{Binding JobModel.Name,FallbackValue='Job Name'}" ToolTip="{Binding JobModel.Name}" VerticalAlignment="Center" FontSize="{StaticResource TangoHeaderFontSize}" FontWeight="SemiBold"></TextBlock>
+ <touch:TouchTextBox Margin="20 0 40 0" MaxWidth="410" Text="{Binding JobModel.Name,FallbackValue='Job Name'}" ToolTip="{Binding JobModel.Name}" VerticalAlignment="Center" FontSize="{StaticResource TangoHeaderFontSize}" FontWeight="SemiBold"></touch:TouchTextBox>
<touch:TouchButton Margin="0 0 0 0" VerticalAlignment="Center" Width="50" Height="50" HorizontalAlignment="Left" EnableDropShadow="False" Background="Transparent" BorderThickness="0" Command="{Binding EditJobDetailsCommand}" Foreground="{StaticResource TangoKeyboardKeyDarkTextBrush}"
components:TransformationHelper.TransformWhenPressed ="False">
<Border Height="24" Width="24" Margin="0 0 0 0" BorderThickness="0" Background="Transparent" HorizontalAlignment="Center">
diff --git a/Software/Visual_Studio/PPC/Modules/Tango.PPC.JobsV2/Views/JobsView.xaml b/Software/Visual_Studio/PPC/Modules/Tango.PPC.JobsV2/Views/JobsView.xaml
index f6630b0a3..d143268c7 100644
--- a/Software/Visual_Studio/PPC/Modules/Tango.PPC.JobsV2/Views/JobsView.xaml
+++ b/Software/Visual_Studio/PPC/Modules/Tango.PPC.JobsV2/Views/JobsView.xaml
@@ -119,7 +119,7 @@
<touch:TouchIconButton Command="{Binding CloneJobsCommand}" Margin="0 0 30 0" Padding="20" Icon="CopyRegular" Style="{StaticResource TangoRoundTouchIconButton}"></touch:TouchIconButton>
<touch:TouchIconButton Command="{Binding DeleteJobsCommand}" Padding="20" Icon="TrashAltRegular" Style="{StaticResource TangoRoundTouchIconButton}"></touch:TouchIconButton>
</StackPanel>
- <touch:TouchIconButton Command="{Binding AddJobCommand}" RenderTransformOrigin="0.5,0.5" Margin="0 -15 0 0" Padding="20" Height="80" Icon="Plus" HorizontalAlignment="Right">
+ <touch:TouchIconButton Command="{Binding AddJobCommand}" RenderTransformOrigin="0.5,0.5" Margin="0 -15 0 0" Padding="20" Height="80" Icon="Plus" HorizontalAlignment="Right" Visibility="{Binding BuildProvider.IsEureka, Converter={StaticResource BooleanToVisibilityInverseConverter}}">
<touch:TouchIconButton.Style>
<Style TargetType="touch:TouchIconButton" BasedOn="{StaticResource TangoRoundTouchIconButton}">
<Setter Property="Opacity" Value="1"></Setter>
@@ -170,6 +170,45 @@
<touch:TouchTextBox Margin="5 0 0 0" Width="300" Text="{Binding Filter,Mode=TwoWay}" Watermark="find name, customer..."></touch:TouchTextBox>
</DockPanel>
</Grid>
+ <StackPanel Orientation="Horizontal" DockPanel.Dock="Right" HorizontalAlignment="Right" Margin="0 20 20 0" Visibility="{Binding BuildProvider.IsEureka, Converter={StaticResource BooleanToVisibilityConverter}}">
+ <!--<TextBlock FontSize="{StaticResource TangoButtonFontSize}" VerticalAlignment="Center" HorizontalAlignment="Right" Margin="0 10 0 0">ADD JOB</TextBlock>-->
+ <touch:TouchIconButton Command="{Binding AddJobCommand}" RenderTransformOrigin="0.5,0.5" Margin="20 0 10 0" Padding="20" Height="70" Icon="Plus" HorizontalAlignment="Right" Background="{StaticResource TangoPrimaryAccentBrush}">
+ <touch:TouchIconButton.Style>
+ <Style TargetType="touch:TouchIconButton" BasedOn="{StaticResource TangoRoundTouchIconButton}">
+ <Setter Property="Opacity" Value="1"></Setter>
+ <Setter Property="IsHitTestVisible" Value="True"></Setter>
+ <Setter Property="RenderTransform">
+ <Setter.Value>
+ <ScaleTransform ScaleX="1" ScaleY="1" />
+ </Setter.Value>
+ </Setter>
+ <Style.Triggers>
+ <DataTrigger Binding="{Binding IsMultiSelecting}" Value="True">
+ <Setter Property="IsHitTestVisible" Value="False"></Setter>
+ <DataTrigger.EnterActions>
+ <BeginStoryboard>
+ <Storyboard>
+ <DoubleAnimation Storyboard.TargetProperty="Opacity" To="0" Duration="00:00:0.2"></DoubleAnimation>
+ <DoubleAnimation Storyboard.TargetProperty="RenderTransform.ScaleX" To="0.5" Duration="00:00:0.2"></DoubleAnimation>
+ <DoubleAnimation Storyboard.TargetProperty="RenderTransform.ScaleY" To="0.5" Duration="00:00:0.2"></DoubleAnimation>
+ </Storyboard>
+ </BeginStoryboard>
+ </DataTrigger.EnterActions>
+ <DataTrigger.ExitActions>
+ <BeginStoryboard>
+ <Storyboard>
+ <DoubleAnimation Storyboard.TargetProperty="Opacity" To="1" Duration="00:00:0.2"></DoubleAnimation>
+ <DoubleAnimation Storyboard.TargetProperty="RenderTransform.ScaleX" To="1" Duration="00:00:0.2"></DoubleAnimation>
+ <DoubleAnimation Storyboard.TargetProperty="RenderTransform.ScaleY" To="1" Duration="00:00:0.2"></DoubleAnimation>
+ </Storyboard>
+ </BeginStoryboard>
+ </DataTrigger.ExitActions>
+ </DataTrigger>
+ </Style.Triggers>
+ </Style>
+ </touch:TouchIconButton.Style>
+ </touch:TouchIconButton>
+ </StackPanel>
</DockPanel>
<Grid Grid.Row="1" x:Name="moveGrid">