From aaf9291bed25209830f68a56e55234944b39d32b Mon Sep 17 00:00:00 2001 From: Victoria Plitt Date: Tue, 19 May 2020 15:27:53 +0300 Subject: Added sort RML by Name Related Work Items: #2806 --- .../Modules/Tango.MachineStudio.Developer/ViewModels/MainViewVM.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Developer/ViewModels') 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 9f0ea3423..5477f97d6 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 @@ -1849,7 +1849,7 @@ namespace Tango.MachineStudio.Developer.ViewModels //var processParams = _activeJobDbContext.ProcessParametersTables.ToList(); ColorSpaces = _activeJobDbContext.ColorSpaces.ToObservableCollection(); - Rmls = _activeJobDbContext.Rmls.ToObservableCollection(); + Rmls = _activeJobDbContext.Rmls.OrderBy(i => i.Name).ToObservableCollection(); WindingMethods = _activeJobDbContext.WindingMethods.ToObservableCollection(); SpoolTypes = _activeJobDbContext.SpoolTypes.ToObservableCollection(); -- cgit v1.3.1 From fd73c4f58e643ee43d2f487e7be0caa32a7cb073 Mon Sep 17 00:00:00 2001 From: Roy Ben Shabat Date: Thu, 28 May 2020 17:12:14 +0300 Subject: Improved machine site selection. Added support for job resume on MS --- .../Tango.MachineStudio.Developer/ViewModels/MainViewVM.cs | 4 ++-- .../ViewModels/MainViewVM.cs | 10 ++++++---- 2 files changed, 8 insertions(+), 6 deletions(-) (limited to 'Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Developer/ViewModels') 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 5477f97d6..eed594718 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 @@ -1376,7 +1376,7 @@ namespace Tango.MachineStudio.Developer.ViewModels /// /// Starts the job. /// - private async void StartJob(Func resumeFunc = null) + private async void StartJob(Func resumeFunc = null) { SettingsManager.Default.Save(); @@ -1441,7 +1441,7 @@ namespace Tango.MachineStudio.Developer.ViewModels } else { - JobHandler = resumeFunc(ActiveJob); + JobHandler = resumeFunc(); } _navigation.NavigateTo(DeveloperNavigationView.RunningJobView); diff --git a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.MachineDesigner/ViewModels/MainViewVM.cs b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.MachineDesigner/ViewModels/MainViewVM.cs index d52daaea2..9c4c2281d 100644 --- a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.MachineDesigner/ViewModels/MainViewVM.cs +++ b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.MachineDesigner/ViewModels/MainViewVM.cs @@ -615,8 +615,9 @@ namespace Tango.MachineStudio.MachineDesigner.ViewModels _all_sites = await ActiveMachineAdapter.Context.Sites.ToListAsync(); - Sites = ActiveMachine.Organization != null ? _all_sites.Where(x => ActiveMachine.Organization.Sites.All(y => y.OrganizationGuid == x.OrganizationGuid)).ToList() : new List() ; - Sites.Insert(0, new Site() { Name = "NONE", ID = -1 }); + var sites = ActiveMachine.Organization != null ? _all_sites.Where(x => x.OrganizationGuid == ActiveMachine.OrganizationGuid).ToList() : new List(); + sites.Insert(0, new Site() { Name = "NONE", ID = -1 }); + Sites = sites; SelectedSite = Sites.SingleOrDefault(x => x.Guid == ActiveMachine.SiteGuid); @@ -655,7 +656,7 @@ namespace Tango.MachineStudio.MachineDesigner.ViewModels } } } - + private async void Configuration_HardwareVersionChanged(object sender, HardwareVersion e) { var version = ActiveMachine.Configuration.HardwareVersion; @@ -1004,9 +1005,10 @@ namespace Tango.MachineStudio.MachineDesigner.ViewModels private void ActiveMachine_OrganizationChanged(object sender, Organization e) { - var sites = ActiveMachine.Organization != null ? _all_sites.Where(x => ActiveMachine.Organization.Sites.All(y => y.OrganizationGuid == x.OrganizationGuid)).ToList() : new List(); + var sites = ActiveMachine.Organization != null ? _all_sites.Where(x => x.OrganizationGuid == ActiveMachine.OrganizationGuid).ToList() : new List(); sites.Insert(0, new Site() { Name = "NONE", ID = -1 }); Sites = sites; + SelectedSite = Sites.SingleOrDefault(x => x.Guid == ActiveMachine.SiteGuid); } } -- cgit v1.3.1 From dc764da2430237c061bf2633d9becb91ece155ba Mon Sep 17 00:00:00 2001 From: Victoria Plitt Date: Thu, 9 Jul 2020 16:31:37 +0300 Subject: MS. Before removing a Brush stop check if the brush is existed in _activeJobDbContext.BrushStops. Related Work Items: #3139 --- .../Tango.MachineStudio.Developer/ViewModels/MainViewVM.cs | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) (limited to 'Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Developer/ViewModels') 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 eed594718..01def8679 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 @@ -2321,7 +2321,13 @@ namespace Tango.MachineStudio.Developer.ViewModels return; } SelectedSegment.BrushStops.Remove(x); - _activeJobDbContext.BrushStops.Remove(x); + var existingBrushStop = _activeJobDbContext.BrushStops.FirstOrDefault(y => y.Guid == x.Guid); + if(existingBrushStop != null) + { + _activeJobDbContext.BrushStops.Remove(existingBrushStop); + } + + }); ArrangeBrushStopsIndices(); @@ -2356,6 +2362,7 @@ namespace Tango.MachineStudio.Developer.ViewModels stop.SetAllDispensingStepDivisions(BL.Dispensing.DispenserStepDivisions.D8); stop.SetLiquidVolumes(SelectedMachine.Configuration, SelectedRML, SelectedProcessParametersTable); SelectedSegment.BrushStops.Add(stop); + // _activeJobDbContext.BrushStops.Add(stop); SelectedSegment.BrushStops.ToList().ForEach(x => x.RaiseOffsetChanged()); ArrangeBrushStopsIndices(); } -- cgit v1.3.1 From 91d5be468e28266a4ae18ee3845f0cb3433dd898 Mon Sep 17 00:00:00 2001 From: Roy Ben Shabat Date: Tue, 4 Aug 2020 14:18:28 +0300 Subject: Reset Application & Firmware "Logs" tab even when machine connection is the same. Fixed issue on FileSystem download. Ignored issue with procedure error highlighting caused application error. Fixed issue when logout/login with different environment did not refreshed the list of available machines for connection. --- .../Tango.FSE.Firmware/ViewModels/LogsViewVM.cs | 11 +++---- .../Tango.FSE.PPCConsole/ViewModels/LogsViewVM.cs | 11 +++---- .../FileSystem/FileSystemHandler.cs | 27 ++++++++++++---- .../DefaultAuthenticationProvider.cs | 2 ++ .../ViewModels/MainViewVM.cs | 14 ++++---- .../Tango.Scripting.Editors/ScriptEditor.cs | 13 ++++++-- Software/Visual_Studio/Tango.Logging/FileLogger.cs | 2 ++ .../Visual_Studio/Tango.Logging/LogItemBase.cs | 12 +++++++ Software/Visual_Studio/Tango.Logging/LogManager.cs | 37 ++++++---------------- .../Tango.Logging/SessionFileLogger.cs | 2 ++ 10 files changed, 73 insertions(+), 58 deletions(-) (limited to 'Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Developer/ViewModels') diff --git a/Software/Visual_Studio/FSE/Modules/Tango.FSE.Firmware/ViewModels/LogsViewVM.cs b/Software/Visual_Studio/FSE/Modules/Tango.FSE.Firmware/ViewModels/LogsViewVM.cs index 2860f8c63..0195d24c1 100644 --- a/Software/Visual_Studio/FSE/Modules/Tango.FSE.Firmware/ViewModels/LogsViewVM.cs +++ b/Software/Visual_Studio/FSE/Modules/Tango.FSE.Firmware/ViewModels/LogsViewVM.cs @@ -145,14 +145,11 @@ namespace Tango.FSE.Firmware.ViewModels private void MachineProvider_MachineConnected(object sender, MachineConnectedEventArgs e) { - if (e.DifferentFromPrevious) - { - _loaded = false; + _loaded = false; - if (MachineProvider.IsPPCAvailable && IsVisible) - { - LoadLogFiles(); - } + if (MachineProvider.IsPPCAvailable && IsVisible) + { + LoadLogFiles(); } } diff --git a/Software/Visual_Studio/FSE/Modules/Tango.FSE.PPCConsole/ViewModels/LogsViewVM.cs b/Software/Visual_Studio/FSE/Modules/Tango.FSE.PPCConsole/ViewModels/LogsViewVM.cs index 30946ba0f..66270df7e 100644 --- a/Software/Visual_Studio/FSE/Modules/Tango.FSE.PPCConsole/ViewModels/LogsViewVM.cs +++ b/Software/Visual_Studio/FSE/Modules/Tango.FSE.PPCConsole/ViewModels/LogsViewVM.cs @@ -147,14 +147,11 @@ namespace Tango.FSE.PPCConsole.ViewModels private void MachineProvider_MachineConnected(object sender, MachineConnectedEventArgs e) { - if (e.DifferentFromPrevious) - { - _loaded = false; + _loaded = false; - if (MachineProvider.ConnectionType.IsRemote() && IsVisible) - { - LoadLogFiles(); - } + if (MachineProvider.IsPPCAvailable && IsVisible) + { + LoadLogFiles(); } } diff --git a/Software/Visual_Studio/FSE/Tango.FSE.Common/FileSystem/FileSystemHandler.cs b/Software/Visual_Studio/FSE/Tango.FSE.Common/FileSystem/FileSystemHandler.cs index b1f4446d2..ab6a788f2 100644 --- a/Software/Visual_Studio/FSE/Tango.FSE.Common/FileSystem/FileSystemHandler.cs +++ b/Software/Visual_Studio/FSE/Tango.FSE.Common/FileSystem/FileSystemHandler.cs @@ -15,6 +15,7 @@ namespace Tango.FSE.Common.FileSystem private System.Timers.Timer _transferRateTimer; private double _lastPosition; private TaskCompletionSource _completionSource; + private bool _completed; public event EventHandler StatusChanged; public event EventHandler> ProgressChanged; @@ -134,21 +135,33 @@ namespace Tango.FSE.Common.FileSystem internal void RaiseFailed(Exception exception) { - Status = FileSystemHandlerStatus.Failed; - FailedException = exception; - _completionSource.SetException(exception); + if (!_completed) + { + _completed = true; + Status = FileSystemHandlerStatus.Failed; + FailedException = exception; + _completionSource.SetException(exception); + } } internal void RaiseAborted() { - Status = FileSystemHandlerStatus.Aborted; - _completionSource.SetException(new OperationCanceledException("File system operation aborted.")); + if (!_completed) + { + _completed = true; + Status = FileSystemHandlerStatus.Aborted; + _completionSource.SetException(new OperationCanceledException("File system operation aborted.")); + } } internal void RaiseCompleted() { - Status = FileSystemHandlerStatus.Completed; - _completionSource.SetResult(Status); + if (!_completed) + { + _completed = true; + Status = FileSystemHandlerStatus.Completed; + _completionSource.SetResult(Status); + } } public void Abort() diff --git a/Software/Visual_Studio/FSE/Tango.FSE.UI/Authentication/DefaultAuthenticationProvider.cs b/Software/Visual_Studio/FSE/Tango.FSE.UI/Authentication/DefaultAuthenticationProvider.cs index 14997cd32..309839831 100644 --- a/Software/Visual_Studio/FSE/Tango.FSE.UI/Authentication/DefaultAuthenticationProvider.cs +++ b/Software/Visual_Studio/FSE/Tango.FSE.UI/Authentication/DefaultAuthenticationProvider.cs @@ -237,6 +237,8 @@ namespace Tango.FSE.UI.Authentication _tokenRefreshTimer.Stop(); + MemoryCacheManager.Default.ClearAll(); + await NavigationManager.NavigateWithObject(NavigationView.LoginView, new LoginViewVM.NavigationObject() { IsLoggingOut = true, 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 01def8679..40710ea21 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 @@ -1709,12 +1709,12 @@ namespace Tango.MachineStudio.Developer.ViewModels { try { - LogManager.Log(String.Format("Uploading process parameters table {0}...", SelectedProcessParametersTable.Name)); + LogManager.Log($"Uploading process parameters table {SelectedProcessParametersTable.Name}..."); await MachineOperator.UploadProcessParameters(SelectedProcessParametersTable); } catch (Exception ex) { - LogManager.LogFormat(ex, "Failed to upload process parameters table {0}", SelectedProcessParametersTable.Name); + LogManager.Log(ex, $"Failed to upload process parameters table {SelectedProcessParametersTable.Name}"); _notification.ShowError("Failed to upload the selected process parameters." + Environment.NewLine + ex.Message); } } @@ -2189,7 +2189,7 @@ namespace Tango.MachineStudio.Developer.ViewModels { if (ActiveJob != null) { - LogManager.LogFormat("Adding new segment to job {0}...", ActiveJob.Name); + LogManager.Log($"Adding new segment to job {ActiveJob.Name}..."); Segment seg = new Segment(); seg.Job = ActiveJob; seg.Name = "SEGMENT"; @@ -2342,7 +2342,7 @@ namespace Tango.MachineStudio.Developer.ViewModels { if (SelectedSegment != null) { - LogManager.LogFormat("Adding new brush stop to segment...", SelectedSegment.SegmentIndex.ToString()); + LogManager.Log($"Adding new brush stop to segment '{SelectedSegment.SegmentIndex}'..."); var stop = new BrushStop(); @@ -2373,7 +2373,7 @@ namespace Tango.MachineStudio.Developer.ViewModels /// private void DuplicateSelectedBrushStops() { - LogManager.LogFormat("Duplicating {0} brush stops...", SelectedBrushStops.Count); + LogManager.Log($"Duplicating {SelectedBrushStops.Count} brush stops..."); foreach (var stop in SelectedBrushStops.OrderBy(x => x.StopIndex)) { @@ -2391,7 +2391,7 @@ namespace Tango.MachineStudio.Developer.ViewModels /// private void DuplicateSelectedSegments() { - LogManager.LogFormat("Duplicating {0} segments...", SelectedSegments.Count); + LogManager.Log($"Duplicating {SelectedSegments.Count} segments..."); int start_index = SelectedSegments.Max(x => x.SegmentIndex); @@ -2419,7 +2419,7 @@ namespace Tango.MachineStudio.Developer.ViewModels { CanWork = false; - LogManager.LogFormat("Duplicating {0} jobs...", SelectedJobs.Count); + LogManager.Log($"Duplicating {SelectedJobs.Count} jobs..."); int index = SelectedMachine.Jobs.Max(x => x.JobIndex); diff --git a/Software/Visual_Studio/Scripting/Tango.Scripting.Editors/ScriptEditor.cs b/Software/Visual_Studio/Scripting/Tango.Scripting.Editors/ScriptEditor.cs index 0e32af6ed..a3a682833 100644 --- a/Software/Visual_Studio/Scripting/Tango.Scripting.Editors/ScriptEditor.cs +++ b/Software/Visual_Studio/Scripting/Tango.Scripting.Editors/ScriptEditor.cs @@ -2458,9 +2458,16 @@ namespace Tango.Scripting.Editors public void HighlighError(int position, int length) { - ITextMarker marker = errorMarkerService.Create(position, length); - marker.MarkerTypes = TextMarkerTypes.SquigglyUnderline; - marker.MarkerColor = Colors.Red; + try + { + ITextMarker marker = errorMarkerService.Create(position, length); + marker.MarkerTypes = TextMarkerTypes.SquigglyUnderline; + marker.MarkerColor = Colors.Red; + } + catch (Exception ex) + { + Debug.WriteLine($"Error highlighting script error.\n{ex.ToString()}"); + } } public void ClearErrors() diff --git a/Software/Visual_Studio/Tango.Logging/FileLogger.cs b/Software/Visual_Studio/Tango.Logging/FileLogger.cs index 0839a5ee7..041b56be4 100644 --- a/Software/Visual_Studio/Tango.Logging/FileLogger.cs +++ b/Software/Visual_Studio/Tango.Logging/FileLogger.cs @@ -138,6 +138,8 @@ namespace Tango.Logging /// The output. public void OnLog(LogItemBase output) { + if (output.SkipFileLogging) return; + try { if (DateTime.Now.Date > _logFileTimeDate.Date) diff --git a/Software/Visual_Studio/Tango.Logging/LogItemBase.cs b/Software/Visual_Studio/Tango.Logging/LogItemBase.cs index 01d520f6a..944f61130 100644 --- a/Software/Visual_Studio/Tango.Logging/LogItemBase.cs +++ b/Software/Visual_Studio/Tango.Logging/LogItemBase.cs @@ -24,10 +24,22 @@ namespace Tango.Logging /// public Object LogObject { + get { return _logObject; } set { _logObject = value; } } + [NonSerialized] + private bool _skipFileLogging; + /// + /// Gets or sets a value indicating whether this log should not be written to a file. + /// + public bool SkipFileLogging + { + get { return _skipFileLogging; } + set { _skipFileLogging = value; } + } + /// /// Gets or sets the caller method adding the exception. /// diff --git a/Software/Visual_Studio/Tango.Logging/LogManager.cs b/Software/Visual_Studio/Tango.Logging/LogManager.cs index bbc6baf57..55264164a 100644 --- a/Software/Visual_Studio/Tango.Logging/LogManager.cs +++ b/Software/Visual_Studio/Tango.Logging/LogManager.cs @@ -102,9 +102,9 @@ namespace Tango.Logging /// /// Exception. /// Error description. - public Exception Log(Exception e, String description = null, [CallerMemberName] string caller = null, [CallerFilePath] string file = null, [CallerLineNumber] int lineNumber = 0) + public Exception Log(Exception e, String description = null, bool skipFileLogging = false, [CallerMemberName] string caller = null, [CallerFilePath] string file = null, [CallerLineNumber] int lineNumber = 0) { - return Log(e, LogCategory.Error, description, caller, file, lineNumber); + return Log(e, LogCategory.Error, description, skipFileLogging, caller, file, lineNumber); } /// @@ -112,7 +112,7 @@ namespace Tango.Logging /// /// Exception. /// Error description. - public Exception Log(Exception e, LogCategory category, String description = null, [CallerMemberName] string caller = null, [CallerFilePath] string file = null, [CallerLineNumber] int lineNumber = 0) + public Exception Log(Exception e, LogCategory category, String description = null, bool skipFileLogging = false, [CallerMemberName] string caller = null, [CallerFilePath] string file = null, [CallerLineNumber] int lineNumber = 0) { if (!Categories.Contains(category)) return e; @@ -125,54 +125,36 @@ namespace Tango.Logging log.Category = category; log.Description = description; log.Message = log.Description + Environment.NewLine + log.Exception.FlattenException(); + log.SkipFileLogging = skipFileLogging; AppendLog(log); return e; } - /// - /// Add new exception log item. - /// - /// Exception. - /// Error description. - public Exception LogFormat(Exception e, String description, object argument, [CallerMemberName] string caller = null, [CallerFilePath] string file = null, [CallerLineNumber] int lineNumber = 0) - { - return Log(e, LogCategory.Error, String.Format(description, argument), caller, file, lineNumber); - } - - /// - /// Add new message log item. - /// - /// Message. - public String LogFormat(String message, object argument, [CallerMemberName] string caller = null, [CallerFilePath] string file = null, [CallerLineNumber] int lineNumber = 0) - { - return Log(String.Format(message, argument), LogCategory.Info, null, caller, file, lineNumber); - } - /// /// Add new message log item. /// /// Message. - public String Log(String message, [CallerMemberName] string caller = null, [CallerFilePath] string file = null, [CallerLineNumber] int lineNumber = 0) + public String Log(String message, bool skipFileLogging = false, [CallerMemberName] string caller = null, [CallerFilePath] string file = null, [CallerLineNumber] int lineNumber = 0) { - return Log(message, LogCategory.Info, null, caller, file, lineNumber); + return Log(message, LogCategory.Info, null, skipFileLogging, caller, file, lineNumber); } /// /// Add new message log item. /// /// Message. - public String Log(String message, LogCategory category, [CallerMemberName] string caller = null, [CallerFilePath] string file = null, [CallerLineNumber] int lineNumber = 0) + public String Log(String message, LogCategory category, bool skipFileLogging = false, [CallerMemberName] string caller = null, [CallerFilePath] string file = null, [CallerLineNumber] int lineNumber = 0) { - return Log(message, category, null, caller, file, lineNumber); + return Log(message, category, null, skipFileLogging, caller, file, lineNumber); } /// /// Add new message log item. /// /// Message. - public String Log(String message, LogCategory category, Object logObject, [CallerMemberName] string caller = null, [CallerFilePath] string file = null, [CallerLineNumber] int lineNumber = 0) + public String Log(String message, LogCategory category, Object logObject, bool skipFileLogging = false, [CallerMemberName] string caller = null, [CallerFilePath] string file = null, [CallerLineNumber] int lineNumber = 0) { if (!Categories.Contains(category)) return message; @@ -184,6 +166,7 @@ namespace Tango.Logging log.Category = category; log.Message = message; log.LogObject = logObject; + log.SkipFileLogging = skipFileLogging; AppendLog(log); diff --git a/Software/Visual_Studio/Tango.Logging/SessionFileLogger.cs b/Software/Visual_Studio/Tango.Logging/SessionFileLogger.cs index 4e378bfbf..efe74c899 100644 --- a/Software/Visual_Studio/Tango.Logging/SessionFileLogger.cs +++ b/Software/Visual_Studio/Tango.Logging/SessionFileLogger.cs @@ -102,6 +102,8 @@ namespace Tango.Logging /// The output. public void OnLog(LogItemBase output) { + if (output.SkipFileLogging) return; + if (_inInSession) { try -- cgit v1.3.1 From 0e32cd5fb97c40624d5323cb265d070b2140d2bc Mon Sep 17 00:00:00 2001 From: Roy Ben Shabat Date: Mon, 14 Sep 2020 16:49:01 +0300 Subject: Refactored SearchComboBox !!! --- .../ViewModels/MainViewVM.cs | 12 +- .../Resources/MaterialDesign.xaml | 239 ++++----------------- .../Tango.SharedUI/Controls/SearchComboBox.cs | 112 +++++----- 3 files changed, 109 insertions(+), 254 deletions(-) (limited to 'Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Developer/ViewModels') 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 40710ea21..8f02749da 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 @@ -1673,7 +1673,17 @@ namespace Tango.MachineStudio.Developer.ViewModels { await Task.Factory.StartNew(() => { - InvalidateLiquidFactorsAndProcessTables(); + try + { + IsFree = false; + InvalidateLiquidFactorsAndProcessTables(); + } + catch + {} + finally + { + IsFree = true; + } }); } } diff --git a/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.Common/Resources/MaterialDesign.xaml b/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.Common/Resources/MaterialDesign.xaml index 4e8a0a1d7..f5f64f992 100644 --- a/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.Common/Resources/MaterialDesign.xaml +++ b/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.Common/Resources/MaterialDesign.xaml @@ -10,7 +10,7 @@ xmlns:local="clr-namespace:Tango.MachineStudio.Common.Resources" xmlns:materialDesign="http://materialdesigninxaml.net/winfx/xaml/themes"> - + + + @@ -66,7 +68,7 @@ ../Fonts/#digital-7 ../Fonts/#flexo - + @@ -769,214 +771,45 @@