diff options
| author | Victoria Plitt <Victoria.Plitt@twine-s.com> | 2019-05-02 17:15:51 +0300 |
|---|---|---|
| committer | Victoria Plitt <Victoria.Plitt@twine-s.com> | 2019-05-02 17:15:51 +0300 |
| commit | 75a25525976e0537e714fb2ed77acb891cfb308a (patch) | |
| tree | fe56ed1c7cbfc932f62947fcfba408df8b761492 /Software/Visual_Studio/MachineStudio | |
| parent | 66cf568417836f0d6d6d3b7ecbb3a0df5cc65b6c (diff) | |
| parent | 706cc1daaea7e42dc3ad1e4587d61db042809de0 (diff) | |
| download | Tango-75a25525976e0537e714fb2ed77acb891cfb308a.tar.gz Tango-75a25525976e0537e714fb2ed77acb891cfb308a.zip | |
Merge branch 'master' of https://twinetfs.visualstudio.com/Tango/_git/Tango
Diffstat (limited to 'Software/Visual_Studio/MachineStudio')
11 files changed, 96 insertions, 34 deletions
diff --git a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.ColorCapture/ColorLabModule.cs b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.ColorCapture/ColorCaptureModule.cs index ef616daca..8724f675c 100644 --- a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.ColorCapture/ColorLabModule.cs +++ b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.ColorCapture/ColorCaptureModule.cs @@ -13,7 +13,7 @@ using Tango.SharedUI.Helpers; namespace Tango.MachineStudio.ColorCapture { [StudioModule(15)] - public class ColorLabModule : StudioModuleBase + public class ColorCaptureModule : StudioModuleBase { public override string Name { @@ -51,7 +51,7 @@ namespace Tango.MachineStudio.ColorCapture { get { - return Permissions.RunColorLabModule; + return Permissions.RunColorCaptureModule; } } diff --git a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.ColorCapture/Tango.MachineStudio.ColorCapture.csproj b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.ColorCapture/Tango.MachineStudio.ColorCapture.csproj index b399d9971..9f21cadf2 100644 --- a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.ColorCapture/Tango.MachineStudio.ColorCapture.csproj +++ b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.ColorCapture/Tango.MachineStudio.ColorCapture.csproj @@ -97,7 +97,7 @@ <Link>GlobalVersionInfo.cs</Link> </Compile> <Compile Include="ColorCaptureSettings.cs" /> - <Compile Include="ColorLabModule.cs" /> + <Compile Include="ColorCaptureModule.cs" /> <Compile Include="Controls\ColorMatrixControl.cs" /> <Compile Include="Controls\IndexedUniformGrid.cs" /> <Compile Include="Models\BenchmarkItem.cs" /> diff --git a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Developer/ViewModels/MainViewVM.cs b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Developer/ViewModels/MainViewVM.cs index db9d9dbae..4ce8ab39d 100644 --- a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Developer/ViewModels/MainViewVM.cs +++ b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Developer/ViewModels/MainViewVM.cs @@ -966,9 +966,23 @@ namespace Tango.MachineStudio.Developer.ViewModels private void MachineOperator_PreparingJobProgress(object sender, PreparingJobProgressEventArgs e) { - if (_preparingTaskItem != null) + var percent = (e.Progress / e.Total * 100d); + + if (_preparingTaskItem == null && percent == 0) + { + _preparingTaskItem = _notification.PushTaskItem("Preparing job for printing..."); + } + else if (percent == 100) { - _preparingTaskItem.Message = $"Preparing job for printing {(e.Progress / e.Total * 100d).ToString("0.0")}%..."; + _preparingTaskItem.Pop(); + _preparingTaskItem = null; + } + else + { + if (_preparingTaskItem != null) + { + _preparingTaskItem.Message = $"Preparing job for printing {(e.Progress / e.Total * 100d).ToString("0.0")}%..."; + } } } @@ -1067,13 +1081,13 @@ namespace Tango.MachineStudio.Developer.ViewModels { _speech.SpeakError(events.Last().EventType.Name); - if (events.ToList().Exists(x => x.Actions.Contains(BL.Enumerations.EventTypeActions.StopJob))) - { - if (JobHandler != null) - { - InvokeUI(StopJob); - } - } + //if (events.ToList().Exists(x => x.Actions.Contains(BL.Enumerations.EventTypeActions.StopJob))) + //{ + // if (JobHandler != null) + // { + // InvokeUI(StopJob); + // } + //} } } @@ -1293,6 +1307,8 @@ namespace Tango.MachineStudio.Developer.ViewModels /// </summary> private async void StartJob(Func<Job, JobHandler> resumeFunc = null) { + SettingsManager.Default.Save(); + LogManager.Log(String.Format("Starting job {0}...", ActiveJob.Name)); if (MachineOperator == null || MachineOperator.State != TransportComponentState.Connected) { @@ -1327,11 +1343,7 @@ namespace Tango.MachineStudio.Developer.ViewModels if (resumeFunc == null) { - using (var item = _notification.PushTaskItem("Preparing job for printing...")) - { - _preparingTaskItem = item; - JobHandler = await MachineOperator.Print(ActiveJob, SelectedProcessParametersTable); - } + JobHandler = await MachineOperator.Print(ActiveJob, SelectedProcessParametersTable); } else { @@ -1386,7 +1398,7 @@ namespace Tango.MachineStudio.Developer.ViewModels InvokeUI(() => { - _notification.ShowError("Job failed. " + ex.Message); + _notification.ShowError("Job failed. " + ex.FlattenMessage()); StopRecordingIfInProgress(); }); }; @@ -1408,6 +1420,12 @@ namespace Tango.MachineStudio.Developer.ViewModels JobHandler.Canceled += (x, y) => { + if (_preparingTaskItem != null) + { + _preparingTaskItem.Pop(); + _preparingTaskItem = null; + } + LogManager.Log(String.Format("Job {0} has been canceled.", RunningJob.Name)); _eventLogger.Log(String.Format("Job {0} has been canceled.", RunningJob.Name)); StopRecordingIfInProgress(); @@ -1750,6 +1768,11 @@ namespace Tango.MachineStudio.Developer.ViewModels InvalidateRelayCommands(); _disable_gamut_check = false; + + _settings.LastSelectedMachineGuid = SelectedMachine != null ? SelectedMachine.Guid : null; + _settings.LastSelectedJobGuid = SelectedMachineJob != null ? SelectedMachineJob.Guid : null; + + _settings.Save(); }); SegmentsCollectionView = CollectionViewSource.GetDefaultView(ActiveJob.Segments); @@ -1987,6 +2010,11 @@ namespace Tango.MachineStudio.Developer.ViewModels SelectedSegments.ToList().ForEach(x => { + if (ActiveJob.Segments.Count == 1) + { + _notification.ShowInfo("A job must contain at least one segment."); + return; + } ActiveJob.Segments.Remove(x); x.DefferedDelete(_activeJobDbContext); }); @@ -2114,12 +2142,17 @@ namespace Tango.MachineStudio.Developer.ViewModels { if (SelectedBrushStop != null && SelectedSegment != null) { - if (_notification.ShowQuestion("Are you sure you want to delete the selected colors?")) + if (_notification.ShowQuestion("Are you sure you want to delete the selected brush stops?")) { LogManager.Log(String.Format("Removing {0} brush stops...", SelectedBrushStops.Count)); SelectedBrushStops.ToList().ForEach(x => { + if (SelectedSegment.BrushStops.Count == 1) + { + _notification.ShowInfo("A job segment must contain at least one brush stop."); + return; + } SelectedSegment.BrushStops.Remove(x); x.DefferedDelete(_activeJobDbContext); }); @@ -2406,8 +2439,7 @@ namespace Tango.MachineStudio.Developer.ViewModels public override void OnShuttingDown() { - _settings.LastSelectedMachineGuid = SelectedMachine != null ? SelectedMachine.Guid : null; - _settings.LastSelectedJobGuid = SelectedMachineJob != null ? SelectedMachineJob.Guid : null; + } #endregion diff --git a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Developer/Views/JobView.xaml b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Developer/Views/JobView.xaml index c4c831011..a5d137e67 100644 --- a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Developer/Views/JobView.xaml +++ b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Developer/Views/JobView.xaml @@ -865,9 +865,15 @@ </StackPanel> <DockPanel> - <StackPanel Orientation="Horizontal" DockPanel.Dock="Right" VerticalAlignment="Center" Margin="0 0 15 0"> - <ToggleButton IsChecked="{Binding ApplicationManager.ConnectedMachine.GradientGenerationConfiguration.IsEnabled}" /> - <TextBlock Margin="10 0 0 0" VerticalAlignment="Center" Foreground="DimGray">Enable Gradient Generation</TextBlock> + <StackPanel Orientation="Horizontal" DockPanel.Dock="Right" VerticalAlignment="Center" Margin="0 0 0 0"> + <TextBlock VerticalAlignment="Center" Foreground="DimGray">Generate Gradient</TextBlock> + <ToggleButton Margin="10 0 0 0" IsChecked="{Binding ApplicationManager.ConnectedMachine.GradientGenerationConfiguration.IsEnabled,Mode=TwoWay}" /> + <TextBlock Margin="10 0 0 0" VerticalAlignment="Center" Foreground="DimGray">Resolution:</TextBlock> + <mahapps:NumericUpDown HideUpDownButtons="True" Width="90" HorizontalAlignment="Left" FontSize="14" FontFamily="{StaticResource digital-7}" StringFormat="{}{0:N0} cm" Margin="5 1 0 0" Minimum="10" Maximum="1000" InterceptArrowKeys="True" Background="Transparent" BorderThickness="0" BorderBrush="DimGray" InterceptMouseWheel="True" HasDecimals="True" HorizontalContentAlignment="Left" Value="{Binding MachineOperator.GradientGenerationConfiguration.ResolutionCM,Mode=TwoWay,UpdateSourceTrigger=PropertyChanged}"> + <mahapps:NumericUpDown.Resources> + <StaticResource ResourceKey="SelectAllTextBoxResource"></StaticResource> + </mahapps:NumericUpDown.Resources> + </mahapps:NumericUpDown> </StackPanel> <Rectangle HorizontalAlignment="Stretch" VerticalAlignment="Center" Height="15" Margin="200 0 10 0" StrokeThickness="1" Stroke="Gainsboro"> <Rectangle.Fill> @@ -1214,7 +1220,7 @@ </Grid> <Grid DockPanel.Dock="Right" Margin="0 0 10 0"> - <StackPanel Orientation="Horizontal" Visibility="{Binding IsJobRunning,Converter={StaticResource BooleanToVisibilityInverseConverter}}"> + <StackPanel Orientation="Horizontal" Visibility="{Binding IsJobRunning,Converter={StaticResource BooleanToVisibilityInverseConverter}}" IsEnabled="{Binding MachineOperator.CanPrint}"> <Button Height="60" Width="280" Command="{Binding StartJobCommand}" Click="OnJobStartClick"> <StackPanel Orientation="Horizontal"> <materialDesign:PackIcon VerticalAlignment="Center" Width="32" Height="32" Kind="ClockFast" /> diff --git a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Developer/Views/RunningJobView.xaml b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Developer/Views/RunningJobView.xaml index dbe0d835b..d0f0c2af6 100644 --- a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Developer/Views/RunningJobView.xaml +++ b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Developer/Views/RunningJobView.xaml @@ -194,7 +194,13 @@ <DataGridTextColumn SortDirection="Descending" Header="DATE TIME" Binding="{Binding DateTime,Converter={StaticResource DateTimeUTCToStringConverter},ConverterParameter='MM/dd/yyyy HH:mm:ss.fff'}" /> <DataGridTextColumn Header="GROUP" Binding="{Binding EventType.Group}" /> <DataGridTextColumn Header="EVENT" Binding="{Binding EventType.Title}" /> - <DataGridTextColumn Header="MESSAGE" Width="1*" Binding="{Binding Description,Converter={StaticResource StringToEllipsisConverter},ConverterParameter=100}" /> + <DataGridTemplateColumn Header="MESSAGE" Width="1*"> + <DataGridTemplateColumn.CellTemplate> + <DataTemplate> + <TextBlock Height="20" Text="{Binding Description,Converter={StaticResource StringToEllipsisConverter},ConverterParameter=100}" TextWrapping="NoWrap"></TextBlock> + </DataTemplate> + </DataGridTemplateColumn.CellTemplate> + </DataGridTemplateColumn> </DataGrid.Columns> </DataGrid> </Grid> diff --git a/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.Common/EventLogging/DefaultEventLogger.cs b/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.Common/EventLogging/DefaultEventLogger.cs index 8347c3144..79c032967 100644 --- a/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.Common/EventLogging/DefaultEventLogger.cs +++ b/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.Common/EventLogging/DefaultEventLogger.cs @@ -218,7 +218,7 @@ namespace Tango.MachineStudio.Common.EventLogging } } - LogManager.Log("Logging event " + machineEvent.EventType.Name + " - " + machineEvent.Description); + LogManager.Log("Logging event " + machineEvent.EventType.Name); machineEvent.MachineGuid = _application.Machine.Guid; machineEvent.UserGuid = _authentication.CurrentUser.Guid; machineEvent.User = _authentication.CurrentUser; diff --git a/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.Common/Publish/MachineStudioPublisher.cs b/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.Common/Publish/MachineStudioPublisher.cs index fb5fbc27c..92326f26f 100644 --- a/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.Common/Publish/MachineStudioPublisher.cs +++ b/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.Common/Publish/MachineStudioPublisher.cs @@ -201,8 +201,10 @@ namespace Tango.MachineStudio.Common.Publish using (ZipFile zip = new ZipFile()) { - zip.AddDirectory(Path.Combine(folder, "x86"), "/x86"); - zip.AddDirectory(Path.Combine(folder, "x64"), "/x64"); + foreach (var directory in Directory.GetDirectories(folder)) + { + zip.AddDirectory(directory, $"/{Path.GetFileName(directory)}"); + } var files = Directory.GetFiles(folder, "*.*", SearchOption.TopDirectoryOnly).ToList(); @@ -219,6 +221,7 @@ namespace Tango.MachineStudio.Common.Publish } }; + zip.ParallelDeflateThreshold = -1; zip.Save(tempFile); } diff --git a/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.UI/App.xaml b/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.UI/App.xaml index fe50851a0..20e381b70 100644 --- a/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.UI/App.xaml +++ b/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.UI/App.xaml @@ -11,9 +11,6 @@ <!-- Accent and AppTheme setting --> <ResourceDictionary Source="pack://application:,,,/Tango.MachineStudio.Common;component/Resources/MaterialDesign.xaml"></ResourceDictionary> - <!--RealTimeGraphEx--> - <ResourceDictionary Source="pack://application:,,,/RealTimeGraphEx;component/Resources/Resources.xaml"></ResourceDictionary> - <!-- Include the Dragablz Material Design style --> <ResourceDictionary Source="pack://application:,,,/Dragablz;component/Themes/materialdesign.xaml"/> diff --git a/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.UI/Properties/AssemblyInfo.cs b/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.UI/Properties/AssemblyInfo.cs index eff1f2521..4717f932a 100644 --- a/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.UI/Properties/AssemblyInfo.cs +++ b/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.UI/Properties/AssemblyInfo.cs @@ -4,5 +4,5 @@ using System.Runtime.InteropServices; [assembly: System.Windows.ThemeInfo(System.Windows.ResourceDictionaryLocation.None, System.Windows.ResourceDictionaryLocation.SourceAssembly)] [assembly: AssemblyTitle("Tango - Machine Studio")] -[assembly: AssemblyVersion("4.0.11.0")] +[assembly: AssemblyVersion("4.0.18.0")] [assembly: ComVisible(false)]
\ No newline at end of file diff --git a/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.UI/Tango.MachineStudio.UI.csproj b/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.UI/Tango.MachineStudio.UI.csproj index 21fcdaa3c..ede1bf828 100644 --- a/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.UI/Tango.MachineStudio.UI.csproj +++ b/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.UI/Tango.MachineStudio.UI.csproj @@ -364,6 +364,14 @@ <Resource Include="design.ico" /> </ItemGroup> <ItemGroup> + <ProjectReference Include="..\..\SideChains\RealTimeGraphX-master\RealTimeGraphX.WPF\RealTimeGraphX.WPF.csproj"> + <Project>{6b9774f7-960d-438e-ad81-c6b9be328d50}</Project> + <Name>RealTimeGraphX.WPF</Name> + </ProjectReference> + <ProjectReference Include="..\..\SideChains\RealTimeGraphX-master\RealTimeGraphX\RealTimeGraphX.csproj"> + <Project>{f13a489c-80ee-4cd0-bdd4-92d959215646}</Project> + <Name>RealTimeGraphX</Name> + </ProjectReference> <ProjectReference Include="..\..\SideChains\Tango.AutoComplete\Tango.AutoComplete.csproj"> <Project>{bb2abb74-ba58-4812-83aa-ec8171f42df4}</Project> <Name>Tango.AutoComplete</Name> @@ -424,6 +432,10 @@ <Project>{5001990f-977b-48ff-b217-0236a5022ad8}</Project> <Name>Tango.Web</Name> </ProjectReference> + <ProjectReference Include="..\..\TCC\Tango.TCC.BL\Tango.TCC.BL.csproj"> + <Project>{f209fae8-73f9-441b-97f4-0844a0279390}</Project> + <Name>Tango.TCC.BL</Name> + </ProjectReference> <ProjectReference Include="..\Modules\MachineStudio.Dispensers\Tango.MachineStudio.Dispensers.csproj"> <Project>{f69da3a8-f823-461e-87cf-a9275abc0b15}</Project> <Name>Tango.MachineStudio.Dispensers</Name> @@ -618,7 +630,7 @@ copy /Y "$(SolutionDir)Referenced Assemblies\Microsoft.WITDataStore32.dll" "$(Ta </Target> <ProjectExtensions> <VisualStudio> - <UserProperties BuildVersion_StartDate="2000/1/1" BuildVersion_UpdateAssemblyVersion="True" BuildVersion_AssemblyInfoFilename="Properties\AssemblyInfo.cs" BuildVersion_BuildVersioningStyle="None.None.Increment.DeltaBaseYearDayOfYear" BuildVersion_UpdateFileVersion="True" BuildVersion_DetectChanges="True" BuildVersion_UseGlobalSettings="False" /> + <UserProperties BuildVersion_UseGlobalSettings="False" BuildVersion_DetectChanges="True" BuildVersion_UpdateFileVersion="True" BuildVersion_BuildVersioningStyle="None.None.Increment.DeltaBaseYearDayOfYear" BuildVersion_AssemblyInfoFilename="Properties\AssemblyInfo.cs" BuildVersion_UpdateAssemblyVersion="True" BuildVersion_StartDate="2000/1/1" /> </VisualStudio> </ProjectExtensions> </Project>
\ No newline at end of file diff --git a/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.UI/Views/AboutView.xaml b/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.UI/Views/AboutView.xaml index 54a8349e6..bf9a52b98 100644 --- a/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.UI/Views/AboutView.xaml +++ b/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.UI/Views/AboutView.xaml @@ -6,6 +6,7 @@ xmlns:vm="clr-namespace:Tango.MachineStudio.UI.ViewModels" xmlns:controls="clr-namespace:Tango.SharedUI.Controls;assembly=Tango.SharedUI" xmlns:converters="clr-namespace:Tango.SharedUI.Converters;assembly=Tango.SharedUI" + xmlns:pmrPrinting="clr-namespace:Tango.PMR.Printing;assembly=Tango.PMR" xmlns:bl="clr-namespace:Tango.BL;assembly=Tango.BL" xmlns:local="clr-namespace:Tango.MachineStudio.UI.Views" mc:Ignorable="d" @@ -67,6 +68,11 @@ <ComboBox Width="150" DockPanel.Dock="Left" ItemsSource="{Binding Source={x:Type bl:ObservablesContextInMemoryCachingMode},Converter={StaticResource EnumToItemsSourceConverter}}" SelectedValue="{Binding MachineStudioSettings.CachingMode}" SelectedValuePath="Value" DisplayMemberPath="DisplayName"></ComboBox> <TextBlock Margin="20 0 0 0" Foreground="Gray" VerticalAlignment="Center">(Requires restart)</TextBlock> </DockPanel> + <TextBlock FontWeight="SemiBold">Job Upload Strategy:</TextBlock> + <DockPanel> + <ComboBox Width="150" DockPanel.Dock="Left" ItemsSource="{Binding Source={x:Type pmrPrinting:JobUploadStrategy},Converter={StaticResource EnumToItemsSourceConverter}}" SelectedValue="{Binding MachineStudioSettings.JobUploadStrategy}" SelectedValuePath="Value" DisplayMemberPath="DisplayName"></ComboBox> + <TextBlock Margin="20 0 0 0" Foreground="Gray" VerticalAlignment="Center">(Requires restart)</TextBlock> + </DockPanel> </controls:TableGrid> <DockPanel Margin="0 0 0 0"> |
