From 739fd56662cdee59f42ec8d80654babf158b9f51 Mon Sep 17 00:00:00 2001 From: Roy Ben-Shabat Date: Sun, 11 Nov 2018 16:18:23 +0200 Subject: Machine Studio v3.5.63 --- .../ViewModels/MachineTechViewVM.cs | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) (limited to 'Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Technician/ViewModels/MachineTechViewVM.cs') 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 a02e09e9a..4b362688f 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 @@ -1276,10 +1276,15 @@ namespace Tango.MachineStudio.Technician.ViewModels }) .Subscribe((response) => { - item.HomingMaximumProgress = response.MaxProgress; item.HomingProgress = response.Progress; + },(ex) => + { + + item.IsHoming = false; + item.IsHomingCompleted = true; + }, () => { @@ -1372,6 +1377,12 @@ namespace Tango.MachineStudio.Technician.ViewModels item.HomingMaximumProgress = response.MaxProgress; item.HomingProgress = response.Progress; + }, (ex) => + { + + item.IsHoming = false; + item.IsHomingCompleted = true; + }, () => { -- cgit v1.3.1 From 996422d12e0a40aa408757989232f0225dc29a28 Mon Sep 17 00:00:00 2001 From: Roy Ben-Shabat Date: Tue, 13 Nov 2018 09:37:40 +0200 Subject: Fixed issue with CSV monitor recorder. Machine Studio v3.5.65 --- Software/DB/PPC/Tango.mdf | Bin 75497472 -> 75497472 bytes Software/DB/PPC/Tango_log.ldf | Bin 20578304 -> 20578304 bytes Software/DB/Tango.mdf | Bin 75497472 -> 75497472 bytes Software/DB/Tango_log.ldf | Bin 15400960 -> 15400960 bytes .../Build/Shortcuts/Machine Studio.lnk | Bin 1532 -> 1532 bytes .../TechItems/MonitorRecorderItem.cs | 23 +++++++++++++++++++++ .../ViewModels/MachineTechViewVM.cs | 7 ++++++- .../Properties/AssemblyInfo.cs | 2 +- .../Components/SelectedObjectCollection.cs | 3 +++ 9 files changed, 33 insertions(+), 2 deletions(-) (limited to 'Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Technician/ViewModels/MachineTechViewVM.cs') diff --git a/Software/DB/PPC/Tango.mdf b/Software/DB/PPC/Tango.mdf index 7a00ca094..af81d06b8 100644 Binary files a/Software/DB/PPC/Tango.mdf and b/Software/DB/PPC/Tango.mdf differ diff --git a/Software/DB/PPC/Tango_log.ldf b/Software/DB/PPC/Tango_log.ldf index ffb2044cf..b2589d464 100644 Binary files a/Software/DB/PPC/Tango_log.ldf and b/Software/DB/PPC/Tango_log.ldf differ diff --git a/Software/DB/Tango.mdf b/Software/DB/Tango.mdf index e3cd1d1a2..7aa106704 100644 Binary files a/Software/DB/Tango.mdf and b/Software/DB/Tango.mdf differ diff --git a/Software/DB/Tango_log.ldf b/Software/DB/Tango_log.ldf index a9975f8dd..fef43d7a0 100644 Binary files a/Software/DB/Tango_log.ldf and b/Software/DB/Tango_log.ldf differ diff --git a/Software/Visual_Studio/Build/Shortcuts/Machine Studio.lnk b/Software/Visual_Studio/Build/Shortcuts/Machine Studio.lnk index 3b408cedd..0f274349d 100644 Binary files a/Software/Visual_Studio/Build/Shortcuts/Machine Studio.lnk and b/Software/Visual_Studio/Build/Shortcuts/Machine Studio.lnk differ diff --git a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Technician/TechItems/MonitorRecorderItem.cs b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Technician/TechItems/MonitorRecorderItem.cs index e2b62092d..321d87632 100644 --- a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Technician/TechItems/MonitorRecorderItem.cs +++ b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Technician/TechItems/MonitorRecorderItem.cs @@ -29,6 +29,8 @@ namespace Tango.MachineStudio.Technician.TechItems [XmlIgnore] public SelectedObjectCollection Monitors { get; set; } + public List SelectedMonitorsGuids { get; set; } + private bool _isRecording; /// /// Gets or sets a value indicating whether this instance is recording. @@ -75,7 +77,10 @@ namespace Tango.MachineStudio.Technician.TechItems _timer.Tick += _timer_Tick; _timer.Interval = TimeSpan.FromSeconds(1); + SelectedMonitorsGuids = new List(); + Monitors = new SelectedObjectCollection(Adapter.TechMonitors.ToObservableCollection(), new ObservableCollection()); + Monitors.SelectionChanged += Monitors_SelectionChanged; Name = "CSV Recorder"; Description = "Record multiple monitors to a CSV file"; Image = ResourceHelper.GetImageFromResources("Images/csv.png"); @@ -85,6 +90,11 @@ namespace Tango.MachineStudio.Technician.TechItems TogglePauseCommand = new RelayCommand(() => { IsPaused = !IsPaused; }); } + private void Monitors_SelectionChanged(object sender, EventArgs e) + { + SelectedMonitorsGuids = GetSelectedMonitors().Select(x => x.Guid).ToList(); + } + public MonitorRecorderItem(object dummy) : this() { @@ -127,5 +137,18 @@ namespace Tango.MachineStudio.Technician.TechItems { return Monitors.SynchedSource.ToList(); } + + public void SetSelectedMonitors(IEnumerable monitors) + { + foreach (var monitor in monitors.ToList()) + { + var item = Monitors.ToList().SingleOrDefault(x => x.Data == monitor); + + if (item != null) + { + item.IsSelected = true; + } + } + } } } 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 4b362688f..85b32437b 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 @@ -962,7 +962,8 @@ namespace Tango.MachineStudio.Technician.ViewModels } else if (item is MonitorRecorderItem) { - CreateElement(item); + var editor = CreateElement(item); + InitMonitorRecorderItem(editor.MonitorRecorderItem); } } @@ -1880,6 +1881,10 @@ namespace Tango.MachineStudio.Technician.ViewModels { (item as MotorGroupItem).TechMotors = ObservablesStaticCollections.Instance.HardwareMotorTypes.Where(x => (item as MotorGroupItem).ItemsGuids.Contains(x.Guid)).ToObservableCollection(); } + else if (item is MonitorRecorderItem) + { + (item as MonitorRecorderItem).SetSelectedMonitors(ObservablesStaticCollections.Instance.TechMonitors.Where(x => (item as MonitorRecorderItem).SelectedMonitorsGuids.Contains(x.Guid)).ToList()); + } AddTechItem(item); } 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 ac17165ca..1bbeea6c0 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.5.64.18305")] +[assembly: AssemblyVersion("3.5.65.18305")] [assembly: ComVisible(false)] \ No newline at end of file diff --git a/Software/Visual_Studio/Tango.SharedUI/Components/SelectedObjectCollection.cs b/Software/Visual_Studio/Tango.SharedUI/Components/SelectedObjectCollection.cs index c9a1a6293..e09bb832e 100644 --- a/Software/Visual_Studio/Tango.SharedUI/Components/SelectedObjectCollection.cs +++ b/Software/Visual_Studio/Tango.SharedUI/Components/SelectedObjectCollection.cs @@ -10,6 +10,7 @@ namespace Tango.SharedUI.Components { public class SelectedObjectCollection : ObservableCollection> { + public event EventHandler SelectionChanged; public ObservableCollection Source { get; set; } public ObservableCollection SynchedSource { get; set; } @@ -41,6 +42,8 @@ namespace Tango.SharedUI.Components { SynchedSource.Remove(item.Data); } + + SelectionChanged?.Invoke(this, new EventArgs()); } } } -- cgit v1.3.1