diff options
| author | Roy Ben-Shabat <Roy@Twine-s.com> | 2018-08-26 20:09:38 +0300 |
|---|---|---|
| committer | Roy Ben-Shabat <Roy@Twine-s.com> | 2018-08-26 20:09:38 +0300 |
| commit | 7d7281f91edfb2d0e7d0e92bd282403f0426f94d (patch) | |
| tree | 4672bd653c0abdb6612032a819f670993a31a17a /Software/Visual_Studio/MachineStudio | |
| parent | f98cac2d6e331eaf62167d63524134d53db921ef (diff) | |
| download | Tango-7d7281f91edfb2d0e7d0e92bd282403f0426f94d.tar.gz Tango-7d7281f91edfb2d0e7d0e92bd282403f0426f94d.zip | |
Added new colorized static text widget to tech board.
Added option to go back to job/jobs from running job view.
Fixed issue with bug reporting.
Fixed other bugs.
Diffstat (limited to 'Software/Visual_Studio/MachineStudio')
33 files changed, 440 insertions, 51 deletions
diff --git a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.ColorLab/Properties/AssemblyInfo.cs b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.ColorLab/Properties/AssemblyInfo.cs index 77d9cc0d8..680f48306 100644 --- a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.ColorLab/Properties/AssemblyInfo.cs +++ b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.ColorLab/Properties/AssemblyInfo.cs @@ -5,7 +5,7 @@ using System.Runtime.InteropServices; using System.Windows; [assembly: AssemblyTitle("Tango - Machine Studio Color Lab Module")] -[assembly: AssemblyVersion("2.0.10.1159")] +[assembly: AssemblyVersion("2.0.11.1737")] [assembly: ComVisible(false)] diff --git a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.DB/Properties/AssemblyInfo.cs b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.DB/Properties/AssemblyInfo.cs index fe6b7a013..46d358e4f 100644 --- a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.DB/Properties/AssemblyInfo.cs +++ b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.DB/Properties/AssemblyInfo.cs @@ -5,7 +5,7 @@ using System.Runtime.InteropServices; using System.Windows; [assembly: AssemblyTitle("Tango - Machine Studio DB Module")] -[assembly: AssemblyVersion("2.0.9.1159")] +[assembly: AssemblyVersion("2.0.10.1737")] [assembly: ComVisible(false)] diff --git a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.DataCapture/Properties/AssemblyInfo.cs b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.DataCapture/Properties/AssemblyInfo.cs index 01b5df038..2f6544d99 100644 --- a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.DataCapture/Properties/AssemblyInfo.cs +++ b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.DataCapture/Properties/AssemblyInfo.cs @@ -5,7 +5,7 @@ using System.Runtime.InteropServices; using System.Windows; [assembly: AssemblyTitle("Tango - Machine Studio Data Capturing Module")] -[assembly: AssemblyVersion("2.0.10.1159")] +[assembly: AssemblyVersion("2.0.11.1737")] [assembly: ComVisible(false)] diff --git a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Developer/Properties/AssemblyInfo.cs b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Developer/Properties/AssemblyInfo.cs index c29c487ae..87c13caf5 100644 --- a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Developer/Properties/AssemblyInfo.cs +++ b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Developer/Properties/AssemblyInfo.cs @@ -5,7 +5,7 @@ using System.Runtime.InteropServices; using System.Windows; [assembly: AssemblyTitle("Tango - Machine Studio Developer Module")] -[assembly: AssemblyVersion("2.0.17.1159")] +[assembly: AssemblyVersion("2.0.18.1737")] [assembly: ComVisible(false)] diff --git a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Developer/Tango.MachineStudio.Developer.csproj b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Developer/Tango.MachineStudio.Developer.csproj index cc9831ad9..dc96f7112 100644 --- a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Developer/Tango.MachineStudio.Developer.csproj +++ b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Developer/Tango.MachineStudio.Developer.csproj @@ -359,7 +359,7 @@ <Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" /> <ProjectExtensions> <VisualStudio> - <UserProperties BuildVersion_StartDate="2000/1/1" BuildVersion_UseGlobalSettings="False" BuildVersion_BuildVersioningStyle="None.None.Increment.TimeStamp" BuildVersion_UpdateAssemblyVersion="True" BuildVersion_AssemblyInfoFilename="Properties\AssemblyInfo.cs" /> + <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/MachineStudio/Modules/Tango.MachineStudio.Developer/ViewModels/MainViewVM.cs b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Developer/ViewModels/MainViewVM.cs index 60c2e65f9..55dd370d1 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 @@ -644,6 +644,16 @@ namespace Tango.MachineStudio.Developer.ViewModels /// Gets or sets the reload machines command. /// </summary> public RelayCommand ReloadMachinesCommand { get; set; } + + /// <summary> + /// Gets or sets the back to job command. + /// </summary> + public RelayCommand BackToJobCommand { get; set; } + + /// <summary> + /// Gets or sets to running job command. + /// </summary> + public RelayCommand ToRunningJobCommand { get; set; } #endregion #region Constructors @@ -717,6 +727,9 @@ namespace Tango.MachineStudio.Developer.ViewModels return null; } }); + + BackToJobCommand = new RelayCommand(BackToJob); + ToRunningJobCommand = new RelayCommand(ToRunningJob); } #endregion @@ -1310,6 +1323,16 @@ namespace Tango.MachineStudio.Developer.ViewModels } } + private void BackToJob() + { + _navigation.NavigateTo(DeveloperNavigationView.JobView); + } + + private void ToRunningJob() + { + _navigation.NavigateTo(DeveloperNavigationView.RunningJobView); + } + #endregion #region RML @@ -1357,7 +1380,7 @@ namespace Tango.MachineStudio.Developer.ViewModels LogManager.Log("Invalidating liquid factors, process parameters and process group history..."); LiquidTypesRmls = ActiveJob.Machine.Configuration.NoneEmptyIdsPacks.Where(x => !x.IsEmpty).OrderBy(x => x.PackIndex).Select(x => x.LiquidType).SelectMany(x => x.LiquidTypesRmls).Where(x => x.Rml.Guid == SelectedRML.Guid).ToList(); - _activeJobDbContext.ProcessParametersTablesGroups.Where(x => x.RmlGuid == SelectedRML.Guid).Include(x => x.ProcessParametersTables).ToList(); + _activeJobDbContext.Adapter.GetRmlProcessParametersTablesGroups(SelectedRML.Guid); RmlProcessParametersTableGroup = SelectedRML.ProcessParametersTablesGroups.ToList().SingleOrDefault(x => x.Active); @@ -1366,7 +1389,7 @@ namespace Tango.MachineStudio.Developer.ViewModels if (RmlProcessParametersTableGroup != null) { RmlProcessParametersTableGroup = RmlProcessParametersTableGroup.Clone(); - RmlProcessParametersTableGroup.ProcessParametersTables = RmlProcessParametersTableGroup.ProcessParametersTables.OrderBy(x => x.TableIndex).ToObservableCollection(); + RmlProcessParametersTableGroup.ProcessParametersTables = RmlProcessParametersTableGroup.ProcessParametersTables.OrderBy(x => x.TableIndex).ToSynchronizedObservableCollection(); } @@ -1445,7 +1468,7 @@ namespace Tango.MachineStudio.Developer.ViewModels } group.Active = true; - group.ProcessParametersTables = tables.ToObservableCollection(); + group.ProcessParametersTables = tables.ToSynchronizedObservableCollection(); group.Rml = SelectedRML; group.Name = response; group.SaveDate = DateTime.UtcNow; @@ -1509,7 +1532,7 @@ namespace Tango.MachineStudio.Developer.ViewModels SpoolTypes = _activeJobDbContext.SpoolTypes.ToObservableCollection(); LogManager.Log("Setting active job..."); - ActiveJob = _activeJobDbContext.Jobs.Include(x => x.Rml).Include(x => x.Segments).Include(x => x.Segments.Select(y => y.BrushStops)).SingleOrDefault(x => x.Guid == SelectedMachineJob.Guid); + ActiveJob = _activeJobDbContext.Adapter.GetJob(SelectedMachineJob.Guid); _activeJobDbContext.Ccts.Where(x => x.RmlGuid == ActiveJob.RmlGuid).ToList(); _activeJobDbContext.Cats.Where(x => x.RmlGuid == ActiveJob.RmlGuid).ToList(); @@ -1646,18 +1669,13 @@ namespace Tango.MachineStudio.Developer.ViewModels using (_notification.PushTaskItem("Loading selected machine...")) { await _machineDbContext.Jobs.Where(x => x.MachineGuid == SelectedMachine.Guid).Include(x => x.User).Include(x => x.User.Contact).LoadAsync(); - await _machineDbContext.Configurations.SingleOrDefaultAsync(x => x.Guid == SelectedMachine.ConfigurationGuid); await _machineDbContext.ColorSpaces.LoadAsync(); - SelectedMachine.Configuration.IdsPacks.EnableCrossThreadOperations(); - - await _machineDbContext.IdsPacks.OrderBy(x => x.PackIndex).Where(x => x.ConfigurationGuid == SelectedMachine.ConfigurationGuid). - Include(x => x.CartridgeType). - Include(x => x.DispenserType). - Include(x => x.LiquidType). - Include(x => x.IdsPackFormula). - Include(x => x.MidTankType).LoadAsync(); + await Task.Factory.StartNew(() => + { + _machineDbContext.Adapter.GetConfiguration(x => x.Guid == SelectedMachine.ConfigurationGuid); + }); RaisePropertyChanged(nameof(SelectedMachine)); 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 016718075..ea350767c 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 @@ -1159,7 +1159,7 @@ </Grid> <Grid DockPanel.Dock="Right" Margin="0 0 10 0"> - <StackPanel Orientation="Horizontal"> + <StackPanel Orientation="Horizontal" Visibility="{Binding IsJobRunning,Converter={StaticResource BooleanToVisibilityInverseConverter}}"> <Button Height="60" Width="280" Command="{Binding StartJobCommand}" Click="OnJobStartClick"> <StackPanel Orientation="Horizontal"> <materialDesign:PackIcon VerticalAlignment="Center" Width="32" Height="32" Kind="ClockFast" /> @@ -1170,6 +1170,12 @@ <materialDesign:PackIcon VerticalAlignment="Center" Width="38" Height="38" Kind="Record" Foreground="#FF6D6D" /> </Button> </StackPanel> + <Button Command="{Binding ToRunningJobCommand}" Width="280" Height="60" Visibility="{Binding IsJobRunning,Converter={StaticResource BooleanToVisibilityConverter}}"> + <StackPanel Orientation="Horizontal"> + <materialDesign:PackIcon VerticalAlignment="Center" Width="32" Height="32" Kind="AlertCircle" /> + <TextBlock VerticalAlignment="Center" Margin="10 0 0 0" FontSize="18">VIEW RUNNING JOB</TextBlock> + </StackPanel> + </Button> </Grid> <Grid Margin="0 -18 0 0"> diff --git a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Developer/Views/JobView.xaml.cs b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Developer/Views/JobView.xaml.cs index 2942d36af..e6a528612 100644 --- a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Developer/Views/JobView.xaml.cs +++ b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Developer/Views/JobView.xaml.cs @@ -73,7 +73,7 @@ namespace Tango.MachineStudio.Developer.Views segments.Add(new Segment() { Length = _vm.ActiveJob.InterSegmentLength, - BrushStops = new System.Collections.ObjectModel.ObservableCollection<BrushStop>() + BrushStops = new SynchronizedObservableCollection<BrushStop>() { new BrushStop() { diff --git a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Developer/Views/MachineJobSelectionView.xaml b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Developer/Views/MachineJobSelectionView.xaml index 279a9daf3..1cb8536e0 100644 --- a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Developer/Views/MachineJobSelectionView.xaml +++ b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Developer/Views/MachineJobSelectionView.xaml @@ -168,10 +168,10 @@ </DataTemplate> </DataGridTemplateColumn.CellTemplate> </DataGridTemplateColumn> - <DataGridTemplateColumn Header="NAME" CanUserSort="True" SortMemberPath="Name"> + <DataGridTemplateColumn Header="NAME" CanUserSort="True" SortMemberPath="Name" MaxWidth="100"> <DataGridTemplateColumn.CellTemplate> <DataTemplate> - <TextBlock Text="{Binding Name}" VerticalAlignment="Center" FontSize="14"></TextBlock> + <TextBlock Text="{Binding Name}" ToolTip="{Binding Name}" TextWrapping="Wrap" MaxHeight="40" TextTrimming="CharacterEllipsis" VerticalAlignment="Center" FontSize="14"></TextBlock> </DataTemplate> </DataGridTemplateColumn.CellTemplate> </DataGridTemplateColumn> 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 dd2e541f5..11c60c1ef 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 @@ -25,10 +25,10 @@ <Grid DockPanel.Dock="Bottom" Height="40"> <StackPanel Orientation="Horizontal" HorizontalAlignment="Right" Margin="0 0 0 0"> - <Button Command="{Binding ExportToExcelCommand}" Style="{StaticResource MaterialDesignFlatButton}"> + <Button Command="{Binding BackToJobCommand}" Style="{StaticResource MaterialDesignFlatButton}" FontSize="16"> <StackPanel Orientation="Horizontal"> - <materialDesign:PackIcon VerticalAlignment="Center" Kind="FileExcel"></materialDesign:PackIcon> - <TextBlock Margin="10 0 0 0">EXPORT TO EXCEL</TextBlock> + <materialDesign:PackIcon VerticalAlignment="Center" Kind="KeyboardBackspace" Width="24" Height="24"></materialDesign:PackIcon> + <TextBlock Margin="10 0 0 0">BACK TO JOB</TextBlock> </StackPanel> </Button> </StackPanel> diff --git a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.HardwareDesigner/Properties/AssemblyInfo.cs b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.HardwareDesigner/Properties/AssemblyInfo.cs index 6807ed5c8..78e77f844 100644 --- a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.HardwareDesigner/Properties/AssemblyInfo.cs +++ b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.HardwareDesigner/Properties/AssemblyInfo.cs @@ -5,7 +5,7 @@ using System.Runtime.InteropServices; using System.Windows; [assembly: AssemblyTitle("Tango - Machine Studio Hardware Designer Module")] -[assembly: AssemblyVersion("2.0.10.1159")] +[assembly: AssemblyVersion("2.0.11.1737")] [assembly: ComVisible(false)] diff --git a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.HardwareDesigner/ViewModels/MainViewVM.cs b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.HardwareDesigner/ViewModels/MainViewVM.cs index 6ba28cb72..c46b1dec1 100644 --- a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.HardwareDesigner/ViewModels/MainViewVM.cs +++ b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.HardwareDesigner/ViewModels/MainViewVM.cs @@ -103,13 +103,13 @@ namespace Tango.MachineStudio.HardwareDesigner.ViewModels _db = ObservablesContext.CreateDefault(); - CurrentVersion.HardwareMotors = _db.HardwareMotorTypes.ToList().Select(x => new HardwareMotor() { HardwareMotorType = x }).ToObservableCollection(); - CurrentVersion.HardwareDancers = _db.HardwareDancerTypes.ToList().Select(x => new HardwareDancer() { HardwareDancerType = x }).ToObservableCollection(); - CurrentVersion.HardwarePidControls = _db.HardwarePidControlTypes.ToList().Select(x => new HardwarePidControl() { HardwarePidControlType = x }).ToObservableCollection(); - CurrentVersion.HardwareWinders = _db.HardwareWinderTypes.ToList().Select(x => new HardwareWinder() { HardwareWinderType = x }).ToObservableCollection(); - CurrentVersion.HardwareSpeedSensors = _db.HardwareSpeedSensorTypes.ToList().Select(x => new HardwareSpeedSensor() { HardwareSpeedSensorType = x }).ToObservableCollection(); - CurrentVersion.HardwareBlowers = _db.HardwareBlowerTypes.ToList().Select(x => new HardwareBlower() { HardwareBlowerType = x }).ToObservableCollection(); - CurrentVersion.HardwareBreakSensors = _db.HardwareBreakSensorTypes.ToList().Select(x => new HardwareBreakSensor() { HardwareBreakSensorType = x }).ToObservableCollection(); + CurrentVersion.HardwareMotors = _db.HardwareMotorTypes.ToList().Select(x => new HardwareMotor() { HardwareMotorType = x }).ToSynchronizedObservableCollection(); + CurrentVersion.HardwareDancers = _db.HardwareDancerTypes.ToList().Select(x => new HardwareDancer() { HardwareDancerType = x }).ToSynchronizedObservableCollection(); + CurrentVersion.HardwarePidControls = _db.HardwarePidControlTypes.ToList().Select(x => new HardwarePidControl() { HardwarePidControlType = x }).ToSynchronizedObservableCollection(); + CurrentVersion.HardwareWinders = _db.HardwareWinderTypes.ToList().Select(x => new HardwareWinder() { HardwareWinderType = x }).ToSynchronizedObservableCollection(); + CurrentVersion.HardwareSpeedSensors = _db.HardwareSpeedSensorTypes.ToList().Select(x => new HardwareSpeedSensor() { HardwareSpeedSensorType = x }).ToSynchronizedObservableCollection(); + CurrentVersion.HardwareBlowers = _db.HardwareBlowerTypes.ToList().Select(x => new HardwareBlower() { HardwareBlowerType = x }).ToSynchronizedObservableCollection(); + CurrentVersion.HardwareBreakSensors = _db.HardwareBreakSensorTypes.ToList().Select(x => new HardwareBreakSensor() { HardwareBreakSensorType = x }).ToSynchronizedObservableCollection(); } private void RefreshVersions() @@ -143,7 +143,7 @@ namespace Tango.MachineStudio.HardwareDesigner.ViewModels }); }); - CurrentVersion.HardwareMotors = CurrentVersion.HardwareMotors.OrderBy(x => x.HardwareMotorType.Code).ToObservableCollection(); + CurrentVersion.HardwareMotors = CurrentVersion.HardwareMotors.OrderBy(x => x.HardwareMotorType.Code).ToSynchronizedObservableCollection(); ObservablesStaticCollections.Instance.HardwareDancerTypes.Where(x => !CurrentVersion.HardwareDancers.ToList().Exists(y => y.HardwareDancerType.Code == x.Code)).ToList().ForEach(x => { @@ -153,7 +153,7 @@ namespace Tango.MachineStudio.HardwareDesigner.ViewModels }); }); - CurrentVersion.HardwareDancers = CurrentVersion.HardwareDancers.OrderBy(x => x.HardwareDancerType.Code).ToObservableCollection(); + CurrentVersion.HardwareDancers = CurrentVersion.HardwareDancers.OrderBy(x => x.HardwareDancerType.Code).ToSynchronizedObservableCollection(); ObservablesStaticCollections.Instance.HardwarePidControlTypes.Where(x => !CurrentVersion.HardwarePidControls.ToList().Exists(y => y.HardwarePidControlType.Code == x.Code)).ToList().ForEach(x => { @@ -163,7 +163,7 @@ namespace Tango.MachineStudio.HardwareDesigner.ViewModels }); }); - CurrentVersion.HardwarePidControls = CurrentVersion.HardwarePidControls.OrderBy(x => x.HardwarePidControlType.Code).ToObservableCollection(); + CurrentVersion.HardwarePidControls = CurrentVersion.HardwarePidControls.OrderBy(x => x.HardwarePidControlType.Code).ToSynchronizedObservableCollection(); ObservablesStaticCollections.Instance.HardwareWinderTypes.Where(x => !CurrentVersion.HardwareWinders.ToList().Exists(y => y.HardwareWinderType.Code == x.Code)).ToList().ForEach(x => { @@ -173,7 +173,7 @@ namespace Tango.MachineStudio.HardwareDesigner.ViewModels }); }); - CurrentVersion.HardwareWinders = CurrentVersion.HardwareWinders.OrderBy(x => x.HardwareWinderType.Code).ToObservableCollection(); + CurrentVersion.HardwareWinders = CurrentVersion.HardwareWinders.OrderBy(x => x.HardwareWinderType.Code).ToSynchronizedObservableCollection(); ObservablesStaticCollections.Instance.HardwareSpeedSensorTypes.Where(x => !CurrentVersion.HardwareSpeedSensors.ToList().Exists(y => y.HardwareSpeedSensorType.Code == x.Code)).ToList().ForEach(x => { @@ -183,7 +183,7 @@ namespace Tango.MachineStudio.HardwareDesigner.ViewModels }); }); - CurrentVersion.HardwareSpeedSensors = CurrentVersion.HardwareSpeedSensors.OrderBy(x => x.HardwareSpeedSensorType.Code).ToObservableCollection(); + CurrentVersion.HardwareSpeedSensors = CurrentVersion.HardwareSpeedSensors.OrderBy(x => x.HardwareSpeedSensorType.Code).ToSynchronizedObservableCollection(); ObservablesStaticCollections.Instance.HardwareBlowerTypes.Where(x => !CurrentVersion.HardwareBlowers.ToList().Exists(y => y.HardwareBlowerType.Code == x.Code)).ToList().ForEach(x => { @@ -193,7 +193,7 @@ namespace Tango.MachineStudio.HardwareDesigner.ViewModels }); }); - CurrentVersion.HardwareBlowers = CurrentVersion.HardwareBlowers.OrderBy(x => x.HardwareBlowerType.Code).ToObservableCollection(); + CurrentVersion.HardwareBlowers = CurrentVersion.HardwareBlowers.OrderBy(x => x.HardwareBlowerType.Code).ToSynchronizedObservableCollection(); ObservablesStaticCollections.Instance.HardwareBreakSensorTypes.Where(x => !CurrentVersion.HardwareBreakSensors.ToList().Exists(y => y.HardwareBreakSensorType.Code == x.Code)).ToList().ForEach(x => { @@ -203,7 +203,7 @@ namespace Tango.MachineStudio.HardwareDesigner.ViewModels }); }); - CurrentVersion.HardwareBreakSensors = CurrentVersion.HardwareBreakSensors.OrderBy(x => x.HardwareBreakSensorType.Code).ToObservableCollection(); + CurrentVersion.HardwareBreakSensors = CurrentVersion.HardwareBreakSensors.OrderBy(x => x.HardwareBreakSensorType.Code).ToSynchronizedObservableCollection(); }); } diff --git a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Logging/Properties/AssemblyInfo.cs b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Logging/Properties/AssemblyInfo.cs index f0713376c..d36d85f22 100644 --- a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Logging/Properties/AssemblyInfo.cs +++ b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Logging/Properties/AssemblyInfo.cs @@ -5,7 +5,7 @@ using System.Runtime.InteropServices; using System.Windows; [assembly: AssemblyTitle("Tango - Machine Studio Logging Module")] -[assembly: AssemblyVersion("2.0.17.1159")] +[assembly: AssemblyVersion("2.0.18.1737")] [assembly: ComVisible(false)] diff --git a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.MachineDesigner/Properties/AssemblyInfo.cs b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.MachineDesigner/Properties/AssemblyInfo.cs index a5e99504c..e0203d2bd 100644 --- a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.MachineDesigner/Properties/AssemblyInfo.cs +++ b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.MachineDesigner/Properties/AssemblyInfo.cs @@ -5,7 +5,7 @@ using System.Runtime.InteropServices; using System.Windows; [assembly: AssemblyTitle("Tango - Machine Studio Machine Designer Module")] -[assembly: AssemblyVersion("2.0.10.1159")] +[assembly: AssemblyVersion("2.0.11.1737")] [assembly: ComVisible(false)] diff --git a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Stubs/Properties/AssemblyInfo.cs b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Stubs/Properties/AssemblyInfo.cs index 220526a23..cdf55c4db 100644 --- a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Stubs/Properties/AssemblyInfo.cs +++ b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Stubs/Properties/AssemblyInfo.cs @@ -5,7 +5,7 @@ using System.Runtime.InteropServices; using System.Windows; [assembly: AssemblyTitle("Tango - Machine Studio Stubs Module")] -[assembly: AssemblyVersion("2.0.9.1159")] +[assembly: AssemblyVersion("2.0.10.1737")] [assembly: ComVisible(false)] diff --git a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Technician/Editors/TextElementEditor.xaml b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Technician/Editors/TextElementEditor.xaml new file mode 100644 index 000000000..33b0645ab --- /dev/null +++ b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Technician/Editors/TextElementEditor.xaml @@ -0,0 +1,95 @@ +<local:ElementEditor x:Class="Tango.MachineStudio.Technician.Editors.TextElementEditor" + 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:sharedConverters="clr-namespace:Tango.SharedUI.Converters;assembly=Tango.SharedUI" + xmlns:items="clr-namespace:Tango.MachineStudio.Technician.TechItems" + xmlns:converters="clr-namespace:Tango.Editors.Converters;assembly=Tango.Editors" + xmlns:visuals="clr-namespace:Tango.Visuals;assembly=Tango.Visuals" + xmlns:local="clr-namespace:Tango.Editors;assembly=Tango.Editors" + mc:Ignorable="d" Background="Transparent" ClipToBounds="False" BorderThickness="0" MinWidth="1" MinHeight="1" RenderTransformOrigin="0.5,0.5" d:DataContext="{d:DesignInstance Type=items:TextItem, IsDesignTimeCreatable=False}" Height="99.188" Width="163.459"> + + <UserControl.Resources> + <converters:BoolToVisibilityConverter x:Key="BoolToVisibilityConverter"></converters:BoolToVisibilityConverter> + <sharedConverters:BooleanInverseConverter x:Key="BooleanInverseConverter" /> + + <!--Theme--> + <SolidColorBrush x:Key="BorderBrush" Color="Transparent"></SolidColorBrush> + <SolidColorBrush x:Key="CornersBrush" Color="Red"></SolidColorBrush> + </UserControl.Resources> + + <UserControl.RenderTransform> + <RotateTransform Angle="{Binding RelativeSource={RelativeSource AncestorType=local:ElementEditor},Path=Angle}"></RotateTransform> + </UserControl.RenderTransform> + + <Grid> + + + <!--Content--> + <Grid> + <Viewbox Stretch="Fill"> + <TextBox PreviewKeyDown="TextBox_PreviewKeyDown" Style="{x:Null}" BorderThickness="0" Background="Transparent" Text="{Binding Text,UpdateSourceTrigger=PropertyChanged}" CaretBrush="Transparent"> + <TextBox.Foreground> + <SolidColorBrush Color="{Binding Color}"></SolidColorBrush> + </TextBox.Foreground> + </TextBox> + </Viewbox> + </Grid> + <!--Content--> + + + <Border BorderThickness="1" BorderBrush="{Binding RelativeSource={RelativeSource AncestorType=local:ElementEditor},Path=BorderBrush,TargetNullValue={StaticResource BorderBrush},FallbackValue={StaticResource BorderBrush}}"> + <Border.Style> + <Style TargetType="Border"> + <Setter Property="Visibility" Value="Collapsed"></Setter> + <Style.Triggers> + <MultiDataTrigger> + <MultiDataTrigger.Conditions> + <Condition Binding="{Binding RelativeSource={RelativeSource AncestorType=local:ElementEditor},Path=(local:ElementsEditor.IsSelected)}" Value="True" /> + <Condition Binding="{Binding RelativeSource={RelativeSource AncestorType=local:ElementsEditor},Path=IsEditable}" Value="True" /> + </MultiDataTrigger.Conditions> + + <Setter Property="Visibility" Value="Visible"></Setter> + </MultiDataTrigger> + </Style.Triggers> + </Style> + </Border.Style> + <Grid> + <ContentPresenter Content="{Binding RelativeSource={RelativeSource AncestorType=local:ElementEditor},Path=InnerContent}"></ContentPresenter> + + <Thumb Opacity="0" DragDelta="MoveDrag" DragStarted="DragStarted" DragCompleted="OnDragEnded"></Thumb> + <Thumb HorizontalAlignment="Left" Cursor="SizeWE" Opacity="0" DragDelta="DragLeft" DragStarted="DragStarted" DragCompleted="OnDragEnded"></Thumb> + <Thumb HorizontalAlignment="Right" Cursor="SizeWE" Opacity="0" DragDelta="DragRight" DragStarted="DragStarted" DragCompleted="OnDragEnded"></Thumb> + <Thumb VerticalAlignment="Top" Cursor="SizeNS" Opacity="0" DragDelta="DragTop" DragStarted="DragStarted" DragCompleted="OnDragEnded"></Thumb> + <Thumb VerticalAlignment="Bottom" Cursor="SizeNS" Opacity="0" DragDelta="DragBottom" DragStarted="DragStarted" DragCompleted="OnDragEnded"></Thumb> + + <Grid ClipToBounds="False" HorizontalAlignment="Center" VerticalAlignment="Top" Margin="0 -20 0 0" Width="10" Height="10"> + <Ellipse Stroke="{Binding RelativeSource={RelativeSource AncestorType=local:ElementEditor},Path=CornersBrush,TargetNullValue={StaticResource CornersBrush},FallbackValue={StaticResource CornersBrush}}" StrokeThickness="2"></Ellipse> + <Rectangle HorizontalAlignment="Center" VerticalAlignment="Stretch" Margin="0 10 0 -8" StrokeThickness="1" Stroke="Red"></Rectangle> + <Thumb Opacity="0" DragDelta="DragAngle" DragStarted="DragStarted" Cursor="Arrow" DragCompleted="OnDragEnded"></Thumb> + </Grid> + + <Grid Width="10" Height="10" HorizontalAlignment="Left" VerticalAlignment="Top" Margin="-8 -8 0 0"> + <Border BorderBrush="{Binding RelativeSource={RelativeSource AncestorType=local:ElementEditor},Path=CornersBrush,TargetNullValue={StaticResource CornersBrush},FallbackValue={StaticResource CornersBrush}}" BorderThickness="2 2 0 0"></Border> + <Thumb Opacity="0" DragDelta="DragTopLeft" DragStarted="DragStarted" Cursor="SizeNWSE" DragCompleted="OnDragEnded"></Thumb> + </Grid> + + <Grid Width="10" Height="10" HorizontalAlignment="Right" VerticalAlignment="Top" Margin="0 -8 -8 0"> + <Border BorderBrush="{Binding RelativeSource={RelativeSource AncestorType=local:ElementEditor},Path=CornersBrush,TargetNullValue={StaticResource CornersBrush},FallbackValue={StaticResource CornersBrush}}" BorderThickness="0 2 2 0"></Border> + <Thumb Opacity="0" DragDelta="DragTopRight" DragStarted="DragStarted" Cursor="SizeNESW" DragCompleted="OnDragEnded"></Thumb> + </Grid> + + <Grid Width="10" Height="10" HorizontalAlignment="Right" VerticalAlignment="Bottom" Margin="0 0 -8 -8"> + <Border BorderBrush="{Binding RelativeSource={RelativeSource AncestorType=local:ElementEditor},Path=CornersBrush,TargetNullValue={StaticResource CornersBrush},FallbackValue={StaticResource CornersBrush}}" BorderThickness="0 0 2 2"></Border> + <Thumb Opacity="0" DragDelta="DragBottomRight" DragStarted="DragStarted" Cursor="SizeNWSE" DragCompleted="OnDragEnded"></Thumb> + </Grid> + + <Grid Width="10" Height="10" HorizontalAlignment="Left" VerticalAlignment="Bottom" Margin="-8 0 0 -8"> + <Border BorderBrush="{Binding RelativeSource={RelativeSource AncestorType=local:ElementEditor},Path=CornersBrush,TargetNullValue={StaticResource CornersBrush},FallbackValue={StaticResource CornersBrush}}" BorderThickness="2 0 0 2"></Border> + <Thumb Opacity="0" DragDelta="DragBottomLeft" DragStarted="DragStarted" Cursor="SizeNESW" DragCompleted="OnDragEnded"></Thumb> + </Grid> + </Grid> + </Border> + </Grid> +</local:ElementEditor> diff --git a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Technician/Editors/TextElementEditor.xaml.cs b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Technician/Editors/TextElementEditor.xaml.cs new file mode 100644 index 000000000..e7505fa35 --- /dev/null +++ b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Technician/Editors/TextElementEditor.xaml.cs @@ -0,0 +1,111 @@ +using System; +using System.Collections.Generic; +using System.Diagnostics; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using System.Windows; +using System.Windows.Controls; +using System.Windows.Controls.Primitives; +using System.Windows.Data; +using System.Windows.Documents; +using System.Windows.Input; +using System.Windows.Markup; +using System.Windows.Media; +using System.Windows.Media.Imaging; +using System.Windows.Navigation; +using System.Windows.Shapes; +using Tango.Editors; +using Tango.BL.Entities; +using Tango.MachineStudio.Technician.TechItems; +using Tango.Core; + +namespace Tango.MachineStudio.Technician.Editors +{ + [ContentProperty("InnerContent")] + public partial class TextElementEditor : ElementEditor + { + /// <summary> + /// Initializes a new instance of the <see cref="MonitorElementEditor"/> class. + /// </summary> + public TextElementEditor() + : base() + { + InitializeComponent(); + } + + /// <summary> + /// Initializes a new instance of the <see cref="MonitorElementEditor"/> class. + /// </summary> + /// <param name="frameworkElement">The framework element.</param> + public TextElementEditor(TextItem textItem) + : this() + { + TextItem = textItem; + DataContext = TextItem; + } + + /// <summary> + /// Initializes a new instance of the <see cref="MonitorElementEditor"/> class. + /// </summary> + /// <param name="frameworkElement">The framework element.</param> + /// <param name="bounds">The bounds.</param> + public TextElementEditor(TextItem textItem, Rect bounds) + : this(textItem) + { + Left = bounds.Left; + Top = bounds.Top; + Width = bounds.Width; + Height = bounds.Height; + } + + private TextItem _textItem; + + public TextItem TextItem + { + get { return _textItem; } + set { _textItem = value; RaisePropertyChanged(nameof(TextItem)); } + } + + + /// <summary> + /// Clones this instance. + /// </summary> + /// <returns></returns> + public override IElementEditor Clone() + { + try + { + var clonedItem = TextItem.Clone() as TextItem; + TextElementEditor cloned = new TextElementEditor(clonedItem); + cloned.Top = Top; + cloned.Left = Left; + cloned.Width = Width; + cloned.Height = Height; + cloned.Angle = Angle; + return cloned; + } + catch (Exception ex) + { + throw new InvalidOperationException("Could not clone this editor. You may have to create a custom editor and implement a custom Clone method.", ex); + } + } + + /// <summary> + /// Gets the hosted element. + /// </summary> + [ParameterIgnore] + public override Object HostedElement + { + get { return TextItem; } + } + + private void TextBox_PreviewKeyDown(object sender, KeyEventArgs e) + { + if (Keyboard.IsKeyDown(Key.LeftCtrl) && e.Key == Key.V) + { + e.Handled = true; + } + } + } +} diff --git a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Technician/Images/text.png b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Technician/Images/text.png Binary files differnew file mode 100644 index 000000000..c6c17bdad --- /dev/null +++ b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Technician/Images/text.png diff --git a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Technician/Properties/AssemblyInfo.cs b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Technician/Properties/AssemblyInfo.cs index b66227b98..69eb9c7ee 100644 --- a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Technician/Properties/AssemblyInfo.cs +++ b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Technician/Properties/AssemblyInfo.cs @@ -5,7 +5,7 @@ using System.Runtime.InteropServices; using System.Windows; [assembly: AssemblyTitle("Tango - Machine Studio Technician Module")] -[assembly: AssemblyVersion("2.0.14.1159")] +[assembly: AssemblyVersion("2.0.15.1737")] [assembly: ComVisible(false)] diff --git a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Technician/PropertiesTemplates/TextTemplate.xaml b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Technician/PropertiesTemplates/TextTemplate.xaml new file mode 100644 index 000000000..2193e6df4 --- /dev/null +++ b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Technician/PropertiesTemplates/TextTemplate.xaml @@ -0,0 +1,43 @@ +<UserControl x:Class="Tango.MachineStudio.Technician.PropertiesTemplates.TextTemplate" + 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:converters="clr-namespace:Tango.MachineStudio.Technician.Converters" + xmlns:sharedConverters="clr-namespace:Tango.SharedUI.Converters;assembly=Tango.SharedUI" + xmlns:items="clr-namespace:Tango.MachineStudio.Technician.TechItems" + xmlns:editors="clr-namespace:Tango.SharedUI.Editors;assembly=Tango.SharedUI" + xmlns:mahApps="http://metro.mahapps.com/winfx/xaml/controls" + xmlns:colorPicker="clr-namespace:Tango;assembly=Tango.ColorPicker" + xmlns:local="clr-namespace:Tango.MachineStudio.Technician.PropertiesTemplates" + mc:Ignorable="d" + d:DesignHeight="500" d:DesignWidth="200" d:DataContext="{d:DesignInstance Type=items:TextItem, IsDesignTimeCreatable=False}"> + + <UserControl.Resources> + <sharedConverters:DoubleToIntConverter x:Key="DoubleToIntConverter" /> + + <Style TargetType="{x:Type TabItem}" BasedOn="{StaticResource {x:Type TabItem}}"> + <Setter Property="mahApps:ControlsHelper.HeaderFontSize" Value="14" /> + <Setter Property="Margin" Value="2" /> + </Style> + </UserControl.Resources> + + <Grid> + <StackPanel> + <GroupBox Header="STATIC TEXT"> + <StackPanel> + <TextBlock FontSize="10">Text</TextBlock> + <TextBox Margin="0 5 0 0" Text="{Binding Text,UpdateSourceTrigger=PropertyChanged}"></TextBox> + </StackPanel> + </GroupBox> + + <GroupBox Header="COLOR" Margin="0 10 0 0"> + <StackPanel> + <Viewbox Margin="0 5 0 0"> + <colorPicker:ColorCanvas SelectedColor="{Binding Color,Mode=TwoWay}" Background="Transparent" /> + </Viewbox> + </StackPanel> + </GroupBox> + </StackPanel> + </Grid> +</UserControl> diff --git a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Technician/PropertiesTemplates/TextTemplate.xaml.cs b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Technician/PropertiesTemplates/TextTemplate.xaml.cs new file mode 100644 index 000000000..e5c204bef --- /dev/null +++ b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Technician/PropertiesTemplates/TextTemplate.xaml.cs @@ -0,0 +1,28 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using System.Windows; +using System.Windows.Controls; +using System.Windows.Data; +using System.Windows.Documents; +using System.Windows.Input; +using System.Windows.Media; +using System.Windows.Media.Imaging; +using System.Windows.Navigation; +using System.Windows.Shapes; + +namespace Tango.MachineStudio.Technician.PropertiesTemplates +{ + /// <summary> + /// Interaction logic for MonitorTemplate.xaml + /// </summary> + public partial class TextTemplate : UserControl + { + public TextTemplate() + { + InitializeComponent(); + } + } +} diff --git a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Technician/Tango.MachineStudio.Technician.csproj b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Technician/Tango.MachineStudio.Technician.csproj index e187db982..73039bc4b 100644 --- a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Technician/Tango.MachineStudio.Technician.csproj +++ b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Technician/Tango.MachineStudio.Technician.csproj @@ -100,6 +100,9 @@ <Compile Include="Converters\TechIosToDigitalInsConverter.cs" /> <Compile Include="Converters\TechIosToDigitalOutsConverter.cs" /> <Compile Include="Converters\TransitionLinkConverter.cs" /> + <Compile Include="Editors\TextElementEditor.xaml.cs"> + <DependentUpon>TextElementEditor.xaml</DependentUpon> + </Compile> <Compile Include="Editors\ControllerElementEditor.xaml.cs"> <DependentUpon>ControllerElementEditor.xaml</DependentUpon> </Compile> @@ -165,6 +168,9 @@ <Compile Include="Models\TechRecordingData.cs" /> <Compile Include="Models\TechRecordingValue.cs" /> <Compile Include="Project\MachineTechViewProject.cs" /> + <Compile Include="PropertiesTemplates\TextTemplate.xaml.cs"> + <DependentUpon>TextTemplate.xaml</DependentUpon> + </Compile> <Compile Include="PropertiesTemplates\JobRunnerTemplate.xaml.cs"> <DependentUpon>JobRunnerTemplate.xaml</DependentUpon> </Compile> @@ -234,6 +240,7 @@ <Compile Include="TechItems\DancerItem.cs" /> <Compile Include="TechItems\ProcessParametersItem.cs" /> <Compile Include="TechItems\SpeedSensorItem.cs" /> + <Compile Include="TechItems\TextItem.cs" /> <Compile Include="TechItems\WinderItem.cs" /> <Compile Include="TechItems\PidItem.cs" /> <Compile Include="TechItems\MotorItem.cs" /> @@ -251,6 +258,10 @@ <Compile Include="Views\MachineTechView.xaml.cs"> <DependentUpon>MachineTechView.xaml</DependentUpon> </Compile> + <Page Include="Editors\TextElementEditor.xaml"> + <Generator>MSBuild:Compile</Generator> + <SubType>Designer</SubType> + </Page> <Page Include="Editors\ControllerElementEditor.xaml"> <Generator>MSBuild:Compile</Generator> <SubType>Designer</SubType> @@ -327,6 +338,10 @@ <Generator>MSBuild:Compile</Generator> <SubType>Designer</SubType> </Page> + <Page Include="PropertiesTemplates\TextTemplate.xaml"> + <Generator>MSBuild:Compile</Generator> + <SubType>Designer</SubType> + </Page> <Page Include="PropertiesTemplates\JobRunnerTemplate.xaml"> <Generator>MSBuild:Compile</Generator> <SubType>Designer</SubType> @@ -616,10 +631,13 @@ <ItemGroup> <Resource Include="Images\blower-big.png" /> </ItemGroup> + <ItemGroup> + <Resource Include="Images\text.png" /> + </ItemGroup> <Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" /> <ProjectExtensions> <VisualStudio> - <UserProperties BuildVersion_StartDate="2000/1/1" BuildVersion_UseGlobalSettings="False" BuildVersion_BuildVersioningStyle="None.None.Increment.TimeStamp" BuildVersion_UpdateAssemblyVersion="True" BuildVersion_AssemblyInfoFilename="Properties\AssemblyInfo.cs" /> + <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/MachineStudio/Modules/Tango.MachineStudio.Technician/TechItems/DispenserItem.cs b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Technician/TechItems/DispenserItem.cs index 7945c5b73..d3cd9622f 100644 --- a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Technician/TechItems/DispenserItem.cs +++ b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Technician/TechItems/DispenserItem.cs @@ -63,7 +63,11 @@ namespace Tango.MachineStudio.Technician.TechItems if (_techDispenser != null) { DispenserType = DispenserTypes.SingleOrDefault(x => x.Code == int.Parse(_techDispenser.Name.Replace("Dispenser", "")) - 1); - DisplayName = _techDispenser.Description; + + if (String.IsNullOrEmpty(DisplayName)) + { + DisplayName = _techDispenser.Description; + } } } } diff --git a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Technician/TechItems/TechItem.cs b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Technician/TechItems/TechItem.cs index b6ebf2857..04b6c1fab 100644 --- a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Technician/TechItems/TechItem.cs +++ b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Technician/TechItems/TechItem.cs @@ -38,6 +38,7 @@ namespace Tango.MachineStudio.Technician.TechItems [XmlInclude(typeof(BreakSensorItem))] [XmlInclude(typeof(ProcessParametersItem))] [XmlInclude(typeof(JobRunnerItem))] + [XmlInclude(typeof(TextItem))] public abstract class TechItem : ExtendedObject { /// <summary> diff --git a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Technician/TechItems/TextItem.cs b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Technician/TechItems/TextItem.cs new file mode 100644 index 000000000..939809504 --- /dev/null +++ b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Technician/TechItems/TextItem.cs @@ -0,0 +1,49 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using System.Windows.Media; +using Tango.SharedUI.Helpers; + +namespace Tango.MachineStudio.Technician.TechItems +{ + [TechItem(25)] + public class TextItem : TechItem + { + private String _text; + public String Text + { + get { return _text; } + set { _text = value; RaisePropertyChangedAuto(); } + } + + /// <summary> + /// Initializes a new instance of the <see cref="MeterItem"/> class. + /// </summary> + public TextItem() : base() + { + Name = "Static Text"; + Description = "Static Text"; + Text = "Static Text"; + Image = ResourceHelper.GetImageFromResources("Images/text.png"); + Color = Colors.DodgerBlue; + } + + /// <summary> + /// Initializes a new instance of the <see cref="TextItem"/> class. + /// </summary> + /// <param name="obj">The object.</param> + public TextItem(Object obj) : this() + { + + } + + public override TechItem Clone() + { + TextItem cloned = base.Clone() as TextItem; + cloned.Text = Text; + return cloned; + } + } +} diff --git a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Technician/ViewModels/MachineTechViewVM.cs b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Technician/ViewModels/MachineTechViewVM.cs index 55235b3c2..9ecfa2312 100644 --- a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Technician/ViewModels/MachineTechViewVM.cs +++ b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Technician/ViewModels/MachineTechViewVM.cs @@ -635,6 +635,10 @@ namespace Tango.MachineStudio.Technician.ViewModels var editor = CreateElement<JobRunnerElementEditor, JobRunnerItem, object>(bounds, null); InitJobRunnerItem(editor.JobRunnerItem); } + else if (item is TextItem) + { + CreateElement<TextElementEditor, TextItem, object>(bounds, null); + } } /// <summary> @@ -774,6 +778,10 @@ namespace Tango.MachineStudio.Technician.ViewModels var editor = CreateElement<JobRunnerElementEditor>(item); InitJobRunnerItem(editor.JobRunnerItem); } + else if (item is TextItem) + { + CreateElement<TextElementEditor>(item); + } } /// <summary> @@ -1574,7 +1582,7 @@ namespace Tango.MachineStudio.Technician.ViewModels public override void OnApplicationReady() { - + } #endregion diff --git a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Technician/Views/MachineTechView.xaml b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Technician/Views/MachineTechView.xaml index cc6ade388..3fe82944c 100644 --- a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Technician/Views/MachineTechView.xaml +++ b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Technician/Views/MachineTechView.xaml @@ -394,6 +394,9 @@ <DataTemplate DataType="{x:Type sys:Nullable}"> </DataTemplate> + <DataTemplate DataType="{x:Type items:TextItem}"> + <templates:TextTemplate/> + </DataTemplate> <DataTemplate DataType="{x:Type items:JobRunnerItem}"> <templates:JobRunnerTemplate/> </DataTemplate> diff --git a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.UsersAndRoles/Properties/AssemblyInfo.cs b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.UsersAndRoles/Properties/AssemblyInfo.cs index b5f0f2d5b..288202752 100644 --- a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.UsersAndRoles/Properties/AssemblyInfo.cs +++ b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.UsersAndRoles/Properties/AssemblyInfo.cs @@ -5,7 +5,7 @@ using System.Runtime.InteropServices; using System.Windows; [assembly: AssemblyTitle("Tango - Machine Studio Users & Roles Module")] -[assembly: AssemblyVersion("2.0.9.1159")] +[assembly: AssemblyVersion("2.0.10.1737")] [assembly: ComVisible(false)] diff --git a/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.Common/Properties/AssemblyInfo.cs b/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.Common/Properties/AssemblyInfo.cs index cd70982d5..f6a6563dc 100644 --- a/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.Common/Properties/AssemblyInfo.cs +++ b/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.Common/Properties/AssemblyInfo.cs @@ -5,7 +5,7 @@ using System.Runtime.InteropServices; using System.Windows; [assembly: AssemblyTitle("Tango - Machine Studio Common Components")] -[assembly: AssemblyVersion("2.0.26.1159")] +[assembly: AssemblyVersion("2.0.27.1737")] [assembly: ComVisible(false)] [assembly:ThemeInfo( diff --git a/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.UI/App.xaml.cs b/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.UI/App.xaml.cs index 4e1c36593..9c69bee75 100644 --- a/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.UI/App.xaml.cs +++ b/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.UI/App.xaml.cs @@ -22,6 +22,7 @@ using Tango.MachineStudio.UI.ViewModels; using Tango.MachineStudio.UI.Views; using Tango.MachineStudio.Common; using Tango.Core; +using Tango.BL; namespace Tango.MachineStudio.UI { @@ -35,6 +36,8 @@ namespace Tango.MachineStudio.UI protected override void OnStartup(StartupEventArgs e) { + ObservableEntityCollectionSettings.SetDispatcher(Application.Current.Dispatcher); + #if DEBUG CoreSettings.DefaultDataSource = new DataSource() diff --git a/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.UI/Authentication/DefaultAuthenticationProvider.cs b/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.UI/Authentication/DefaultAuthenticationProvider.cs index c16f76449..fd68ed8d1 100644 --- a/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.UI/Authentication/DefaultAuthenticationProvider.cs +++ b/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.UI/Authentication/DefaultAuthenticationProvider.cs @@ -60,6 +60,8 @@ namespace Tango.MachineStudio.UI.Authentication User user = db.Users .Include(x => x.UsersRoles) + .Include(x => x.Contact) + .Include(x => x.Address) .Include(x => x.Organization).SingleOrDefault(x => x.Email.ToLower() == email.ToLower() && x.Password == hash); if (user == null) 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 2ba2c2d37..067d30413 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("3.1.32.18235")] +[assembly: AssemblyVersion("3.2.35.18238")] [assembly: ComVisible(false)]
\ No newline at end of file diff --git a/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.Updater/Properties/AssemblyInfo.cs b/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.Updater/Properties/AssemblyInfo.cs index 10e0e252e..d492849fa 100644 --- a/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.Updater/Properties/AssemblyInfo.cs +++ b/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.Updater/Properties/AssemblyInfo.cs @@ -5,7 +5,7 @@ using System.Runtime.InteropServices; using System.Windows; [assembly: AssemblyTitle("Tango - Machine Studio Updater Utility")] -[assembly: AssemblyVersion("2.0.8.1159")] +[assembly: AssemblyVersion("2.0.9.1737")] [assembly: ComVisible(false)] [assembly:ThemeInfo( |
