From b9ff3e2b899b22090b5d206c1f95189aa7fd7ecb Mon Sep 17 00:00:00 2001 From: Roy Ben-Shabat Date: Wed, 16 May 2018 18:22:47 +0300 Subject: New Settings Library. --- .../ViewModels/MainViewVM.cs | 2 +- .../DeveloperModuleSettings.cs | 16 ++ .../Tango.MachineStudio.Developer.csproj | 1 + .../ViewModels/MainViewVM.cs | 15 +- .../Parsing/EmbeddedLogFileParser.cs | 2 +- .../StubsModuleSettings.cs | 30 ++++ .../Tango.MachineStudio.Stubs.csproj | 1 + .../ViewModels/MainViewVM.cs | 13 +- .../SynchronizationModuleSettings.cs | 27 +++ .../Tango.MachineStudio.Synchronization.csproj | 1 + .../ViewModels/LocalSynchronizationViewVM.cs | 17 +- .../ViewModels/RemoteSynchronizationViewVM.cs | 11 +- .../Helpers/GraphsHelper.cs | 6 +- .../Navigation/TechNavigationManager.cs | 24 --- .../Navigation/TechNavigationView.cs | 18 -- .../Tango.MachineStudio.Technician.csproj | 33 +--- .../TechItems/MultiGraphItem.cs | 3 +- .../TechItems/SingleGraphItem.cs | 3 +- .../TechnicianModuleSettings.cs | 36 ++++ .../ViewModelLocator.cs | 23 --- .../ViewModels/MachineTechViewVM.cs | 17 +- .../ViewModels/MainViewVM.cs | 56 ------ .../ViewModels/SensorsViewVM.cs | 193 --------------------- .../Views/MainView.xaml | 102 ----------- .../Views/MainView.xaml.cs | 31 ---- .../Views/MotorsView.xaml | 12 -- .../Views/MotorsView.xaml.cs | 28 --- .../Views/OverviewView.xaml | 12 -- .../Views/OverviewView.xaml.cs | 28 --- .../Views/SensorsView.xaml | 173 ------------------ .../Views/SensorsView.xaml.cs | 53 ------ 31 files changed, 168 insertions(+), 819 deletions(-) create mode 100644 Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Developer/DeveloperModuleSettings.cs create mode 100644 Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Stubs/StubsModuleSettings.cs create mode 100644 Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Synchronization/SynchronizationModuleSettings.cs delete mode 100644 Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Technician/Navigation/TechNavigationManager.cs delete mode 100644 Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Technician/Navigation/TechNavigationView.cs create mode 100644 Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Technician/TechnicianModuleSettings.cs delete mode 100644 Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Technician/ViewModels/MainViewVM.cs delete mode 100644 Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Technician/ViewModels/SensorsViewVM.cs delete mode 100644 Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Technician/Views/MainView.xaml delete mode 100644 Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Technician/Views/MainView.xaml.cs delete mode 100644 Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Technician/Views/MotorsView.xaml delete mode 100644 Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Technician/Views/MotorsView.xaml.cs delete mode 100644 Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Technician/Views/OverviewView.xaml delete mode 100644 Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Technician/Views/OverviewView.xaml.cs delete mode 100644 Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Technician/Views/SensorsView.xaml delete mode 100644 Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Technician/Views/SensorsView.xaml.cs (limited to 'Software/Visual_Studio/MachineStudio/Modules') diff --git a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.DataCapture/ViewModels/MainViewVM.cs b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.DataCapture/ViewModels/MainViewVM.cs index fdd0fed5b..427d1d003 100644 --- a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.DataCapture/ViewModels/MainViewVM.cs +++ b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.DataCapture/ViewModels/MainViewVM.cs @@ -206,7 +206,7 @@ namespace Tango.MachineStudio.DataCapture.ViewModels MediaSeekCommand = new RelayCommand(MediaSeek, (x) => Player.IsPlaying); MediaSeekHoldCommand = new RelayCommand(MediaSeekHold, () => Player.IsPlaying); - _recordingsFolder = Path.Combine(SettingsManager.DefaultFolder, "Recordings"); + _recordingsFolder = Path.Combine(SettingsManager.Default.Folder, "Recordings"); Directory.CreateDirectory(_recordingsFolder); _frameProvider.FrameReceived += _frameProvider_FrameReceived; diff --git a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Developer/DeveloperModuleSettings.cs b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Developer/DeveloperModuleSettings.cs new file mode 100644 index 000000000..73d979662 --- /dev/null +++ b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Developer/DeveloperModuleSettings.cs @@ -0,0 +1,16 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using Tango.Settings; + +namespace Tango.MachineStudio.Developer +{ + public class DeveloperModuleSettings : SettingsBase + { + public String LastSelectedMachineGuid { get; set; } + + public String LastSelectedJobGuid { get; set; } + } +} 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 ddea73858..5a81c358f 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 @@ -108,6 +108,7 @@ + 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 739f0bcde..106848b7a 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 @@ -63,6 +63,7 @@ namespace Tango.MachineStudio.Developer.ViewModels private ISpeechProvider _speech; private DataCapture.ViewModels.MainViewVM _dataCaptureVM; private bool _isRecording; + private DeveloperModuleSettings _settings; #region Properties @@ -620,6 +621,8 @@ namespace Tango.MachineStudio.Developer.ViewModels /// The notification provider. public MainViewVM(IStudioApplicationManager applicationManager, INotificationProvider notificationProvider, IDiagnosticsFrameProvider diagnosticsFrameProvider, IVideoCaptureProvider videoCaptureProvider, DeveloperNavigationManager navigation, IAuthenticationProvider authentication, IEventLogger eventLogger, ISpeechProvider speech) { + _settings = SettingsManager.Default.GetOrCreate(); + SelectedJobs = new ObservableCollection(); JobEvents = new ObservableCollection(); @@ -629,16 +632,16 @@ namespace Tango.MachineStudio.Developer.ViewModels Machines = _machineDbContext.Machines.ToObservableCollection(); - if (SettingsManager.Default.MachineStudio.DeveloperModule.LastSelectedMachineGuid != null) + if (_settings.LastSelectedMachineGuid != null) { LogManager.Log("Setting last selected machine from settings..."); - SelectedMachine = _machineDbContext.Machines.SingleOrDefault(x => x.Guid == SettingsManager.Default.MachineStudio.DeveloperModule.LastSelectedMachineGuid); + SelectedMachine = _machineDbContext.Machines.SingleOrDefault(x => x.Guid == _settings.LastSelectedMachineGuid); } - if (SettingsManager.Default.MachineStudio.DeveloperModule.LastSelectedJobGuid != null && SelectedMachine != null) + if (_settings.LastSelectedJobGuid != null && SelectedMachine != null) { LogManager.Log("Setting last selected job from settings..."); - SelectedMachineJob = SelectedMachine.Jobs.SingleOrDefault(x => x.Guid == SettingsManager.Default.MachineStudio.DeveloperModule.LastSelectedJobGuid); + SelectedMachineJob = SelectedMachine.Jobs.SingleOrDefault(x => x.Guid == _settings.LastSelectedJobGuid); } _authentication = authentication; @@ -1907,8 +1910,8 @@ namespace Tango.MachineStudio.Developer.ViewModels public override void OnShuttingDown() { - SettingsManager.Default.MachineStudio.DeveloperModule.LastSelectedMachineGuid = SelectedMachine != null ? SelectedMachine.Guid : null; - SettingsManager.Default.MachineStudio.DeveloperModule.LastSelectedJobGuid = SelectedMachineJob != null ? SelectedMachineJob.Guid : null; + _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.Logging/Parsing/EmbeddedLogFileParser.cs b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Logging/Parsing/EmbeddedLogFileParser.cs index e97ffb249..09cb9a8b6 100644 --- a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Logging/Parsing/EmbeddedLogFileParser.cs +++ b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Logging/Parsing/EmbeddedLogFileParser.cs @@ -22,7 +22,7 @@ namespace Tango.MachineStudio.Logging.Parsing String logFile = logger != null ? logger.LogFile : null; - foreach (var file in Directory.GetFiles(SettingsManager.DefaultFolder + "\\embedded logs", "*.log").Where(x => Path.GetFileName(x).StartsWith("embedded") && x != logFile)) + foreach (var file in Directory.GetFiles(SettingsManager.Default.Folder + "\\embedded logs", "*.log").Where(x => Path.GetFileName(x).StartsWith("embedded") && x != logFile)) { String dateString = Path.GetFileNameWithoutExtension(file).Replace("embedded-", ""); DateTime date = DateTime.ParseExact(dateString, "dd-MM-yyyy_HH-mm-ss", CultureInfo.InvariantCulture); diff --git a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Stubs/StubsModuleSettings.cs b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Stubs/StubsModuleSettings.cs new file mode 100644 index 000000000..1aa775fdc --- /dev/null +++ b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Stubs/StubsModuleSettings.cs @@ -0,0 +1,30 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using Tango.Settings; + +namespace Tango.MachineStudio.Stubs +{ + public class StubsModuleSettings : SettingsBase + { + /// + /// Gets or sets the last selected port. + /// + public String SelectedPort { get; set; } + + /// + /// Gets or sets the last tabs. + /// + public List LastTabs { get; set; } + + /// + /// Initializes a new instance of the class. + /// + public StubsModuleSettings() + { + LastTabs = new List(); + } + } +} diff --git a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Stubs/Tango.MachineStudio.Stubs.csproj b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Stubs/Tango.MachineStudio.Stubs.csproj index eb2248f61..ca3e77628 100644 --- a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Stubs/Tango.MachineStudio.Stubs.csproj +++ b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Stubs/Tango.MachineStudio.Stubs.csproj @@ -71,6 +71,7 @@ + diff --git a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Stubs/ViewModels/MainViewVM.cs b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Stubs/ViewModels/MainViewVM.cs index df47273d0..afd5e4d70 100644 --- a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Stubs/ViewModels/MainViewVM.cs +++ b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Stubs/ViewModels/MainViewVM.cs @@ -30,6 +30,7 @@ namespace Tango.MachineStudio.Stubs.ViewModels private UsbTransportAdapter _adapter; //Holds the USB transport adapter. private StubManager _stubManager; private INotificationProvider _notification; + private StubsModuleSettings _settings; #region Properties @@ -220,6 +221,8 @@ namespace Tango.MachineStudio.Stubs.ViewModels /// public MainViewVM(IStudioApplicationManager applicationManager, INotificationProvider notification) { + _settings = SettingsManager.Default.GetOrCreate(); + ApplicationManager = applicationManager; _notification = notification; @@ -264,13 +267,13 @@ namespace Tango.MachineStudio.Stubs.ViewModels "COM9", }; - SelectedPort = SettingsManager.Default.MachineStudio.StubsModule.SelectedPort != null ? SettingsManager.Default.MachineStudio.StubsModule.SelectedPort : Ports.First(); + SelectedPort = _settings.SelectedPort != null ? _settings.SelectedPort : Ports.First(); Status = "Ready"; - if (SettingsManager.Default.MachineStudio.StubsModule.LastTabs.Count > 0) + if (_settings.LastTabs.Count > 0) { - foreach (var file in SettingsManager.Default.MachineStudio.StubsModule.LastTabs) + foreach (var file in _settings.LastTabs) { if (File.Exists(file)) { @@ -534,8 +537,8 @@ namespace Tango.MachineStudio.Stubs.ViewModels /// public override void OnShuttingDown() { - SettingsManager.Default.MachineStudio.StubsModule.SelectedPort = SelectedPort; - SettingsManager.Default.MachineStudio.StubsModule.LastTabs = CodeTabs.Select(x => x.File).ToList(); + _settings.SelectedPort = SelectedPort; + _settings.LastTabs = CodeTabs.Select(x => x.File).ToList(); } #endregion diff --git a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Synchronization/SynchronizationModuleSettings.cs b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Synchronization/SynchronizationModuleSettings.cs new file mode 100644 index 000000000..9b9e10a7f --- /dev/null +++ b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Synchronization/SynchronizationModuleSettings.cs @@ -0,0 +1,27 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using Tango.Settings; + +namespace Tango.MachineStudio.Synchronization +{ + public class SynchronizationModuleSettings : SettingsBase + { + /// + /// Gets or sets the local master database file. + /// + public String LocalMasterDBFile { get; set; } + + /// + /// Gets or sets the local slave database file. + /// + public String LocalSlaveDBFile { get; set; } + + /// + /// Gets or sets the remote SQLite file. + /// + public String RemoteSQLiteFile { get; set; } + } +} diff --git a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Synchronization/Tango.MachineStudio.Synchronization.csproj b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Synchronization/Tango.MachineStudio.Synchronization.csproj index f863df9c2..f38fe5dbf 100644 --- a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Synchronization/Tango.MachineStudio.Synchronization.csproj +++ b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Synchronization/Tango.MachineStudio.Synchronization.csproj @@ -93,6 +93,7 @@ + diff --git a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Synchronization/ViewModels/LocalSynchronizationViewVM.cs b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Synchronization/ViewModels/LocalSynchronizationViewVM.cs index d3cb23d64..879f6e493 100644 --- a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Synchronization/ViewModels/LocalSynchronizationViewVM.cs +++ b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Synchronization/ViewModels/LocalSynchronizationViewVM.cs @@ -33,6 +33,7 @@ namespace Tango.MachineStudio.Synchronization.ViewModels private INotificationProvider _notification; private bool _isWorking; private MainViewVM _mainView; + private SynchronizationModuleSettings _settings; #region Constructors @@ -43,6 +44,8 @@ namespace Tango.MachineStudio.Synchronization.ViewModels /// The notification. public LocalSynchronizationViewVM(SyncNavigationManager navigation, INotificationProvider notification) { + _settings = SettingsManager.Default.GetOrCreate(); + _navigation = navigation; _notification = notification; @@ -57,15 +60,15 @@ namespace Tango.MachineStudio.Synchronization.ViewModels CommitAllCommand = new RelayCommand(CommitAll, (x) => Differences.Count > 0 && !_isWorking); CleanCommand = new RelayCommand(CleanSlave, (x) => !_isWorking && SlaveDBFile != null); - if (File.Exists(SettingsManager.Default.MachineStudio.SynchronizationModule.LocalMasterDBFile)) + if (File.Exists(_settings.LocalMasterDBFile)) { - MasterDBFile = SettingsManager.Default.MachineStudio.SynchronizationModule.LocalMasterDBFile; + MasterDBFile = _settings.LocalMasterDBFile; MasterDBName = Path.GetFileName(MasterDBFile); } - if (File.Exists(SettingsManager.Default.MachineStudio.SynchronizationModule.LocalSlaveDBFile)) + if (File.Exists(_settings.LocalSlaveDBFile)) { - SlaveDBFile = SettingsManager.Default.MachineStudio.SynchronizationModule.LocalSlaveDBFile; + SlaveDBFile = _settings.LocalSlaveDBFile; SlaveDBName = Path.GetFileName(SlaveDBFile); } } @@ -268,9 +271,9 @@ namespace Tango.MachineStudio.Synchronization.ViewModels SelectedDifference = null; InvalidateRelayCommands(); - SettingsManager.Default.MachineStudio.SynchronizationModule.LocalMasterDBFile = MasterDBFile; - SettingsManager.Default.MachineStudio.SynchronizationModule.LocalSlaveDBFile = SlaveDBFile; - SettingsManager.SaveDefaultSettings(); + _settings.LocalMasterDBFile = MasterDBFile; + _settings.LocalSlaveDBFile = SlaveDBFile; + _settings.Save(); } } }); diff --git a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Synchronization/ViewModels/RemoteSynchronizationViewVM.cs b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Synchronization/ViewModels/RemoteSynchronizationViewVM.cs index 75b5fe95a..2896f3e58 100644 --- a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Synchronization/ViewModels/RemoteSynchronizationViewVM.cs +++ b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Synchronization/ViewModels/RemoteSynchronizationViewVM.cs @@ -41,6 +41,7 @@ namespace Tango.MachineStudio.Synchronization.ViewModels private RemoteDB _remoteDB; private LocalDB _localDB; private MainViewVM _mainView; + private SynchronizationModuleSettings _settings; #region Constructors @@ -51,6 +52,8 @@ namespace Tango.MachineStudio.Synchronization.ViewModels /// The notification. public RemoteSynchronizationViewVM(SyncNavigationManager navigation, INotificationProvider notification) { + _settings = SettingsManager.Default.GetOrCreate(); + _navigation = navigation; _notification = notification; @@ -64,9 +67,9 @@ namespace Tango.MachineStudio.Synchronization.ViewModels CommitAllCommand = new RelayCommand(CommitAll, (x) => Differences.Count > 0 && !_isWorking && SelectedMachine != null); CleanCommand = new RelayCommand(CleanSlave, (x) => !_isWorking && SlaveDBFile != null); - if (File.Exists(SettingsManager.Default.MachineStudio.SynchronizationModule.RemoteSQLiteFile)) + if (File.Exists(_settings.RemoteSQLiteFile)) { - SlaveDBFile = SettingsManager.Default.MachineStudio.SynchronizationModule.RemoteSQLiteFile; + SlaveDBFile = _settings.RemoteSQLiteFile; SlaveDBName = Path.GetFileName(SlaveDBFile); } } @@ -266,8 +269,8 @@ namespace Tango.MachineStudio.Synchronization.ViewModels SelectedDifference = null; InvalidateRelayCommands(); - SettingsManager.Default.MachineStudio.SynchronizationModule.RemoteSQLiteFile = SlaveDBFile; - SettingsManager.SaveDefaultSettings(); + _settings.RemoteSQLiteFile = SlaveDBFile; + _settings.Save(); } } }); diff --git a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Technician/Helpers/GraphsHelper.cs b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Technician/Helpers/GraphsHelper.cs index 78466ace8..0cd14f917 100644 --- a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Technician/Helpers/GraphsHelper.cs +++ b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Technician/Helpers/GraphsHelper.cs @@ -3,6 +3,7 @@ using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading.Tasks; +using Tango.MachineStudio.Common; using Tango.Settings; namespace Tango.MachineStudio.Technician.Helpers @@ -21,8 +22,9 @@ namespace Tango.MachineStudio.Technician.Helpers { try { - double seconds = SettingsManager.Default.MachineStudio.TechnicianModule.GraphsDuration; - double pullRate = SettingsManager.Default.MachineStudio.TechnicianModule.GraphsPullingInterval; + var settings = SettingsManager.Default.GetOrCreate(); + double seconds = settings.GraphsViewDurationSeconds; + double pullRate = settings.DiagnosticsResponseIntervalMilli; return (int)(((pullRate * pointsPerFrame * 10 * seconds) * (10 / pullRate)) * 0.65); } catch (Exception) diff --git a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Technician/Navigation/TechNavigationManager.cs b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Technician/Navigation/TechNavigationManager.cs deleted file mode 100644 index ddfb84920..000000000 --- a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Technician/Navigation/TechNavigationManager.cs +++ /dev/null @@ -1,24 +0,0 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; -using System.Threading.Tasks; -using Tango.MachineStudio.Technician.Views; - -namespace Tango.MachineStudio.Technician.Navigation -{ - /// - /// Represents the technician module navigation manager. - /// - public class TechNavigationManager - { - /// - /// Navigates to the specified view. - /// - /// The view. - public void NavigateTo(TechNavigationView view) - { - MainView.Instance.TransitionControl.AutoNavigate(view.ToString()); - } - } -} diff --git a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Technician/Navigation/TechNavigationView.cs b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Technician/Navigation/TechNavigationView.cs deleted file mode 100644 index b4a85f92a..000000000 --- a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Technician/Navigation/TechNavigationView.cs +++ /dev/null @@ -1,18 +0,0 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; -using System.Threading.Tasks; - -namespace Tango.MachineStudio.Technician.Navigation -{ - /// - /// Represents the available technician module views. - /// - public enum TechNavigationView - { - Overview, - Motors, - Sensors, - } -} 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 93a99667a..f7bf69bc8 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 @@ -198,30 +198,15 @@ - - + - - MachineTechView.xaml - - MotorsView.xaml - - - OverviewView.xaml - - - SensorsView.xaml - - - MainView.xaml - GlobalVersionInfo.cs @@ -353,22 +338,6 @@ MSBuild:Compile Designer - - Designer - MSBuild:Compile - - - Designer - MSBuild:Compile - - - Designer - MSBuild:Compile - - - Designer - MSBuild:Compile - diff --git a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Technician/TechItems/MultiGraphItem.cs b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Technician/TechItems/MultiGraphItem.cs index 887417cf8..bd165623a 100644 --- a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Technician/TechItems/MultiGraphItem.cs +++ b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Technician/TechItems/MultiGraphItem.cs @@ -6,6 +6,7 @@ using System.Threading.Tasks; using System.Xml.Serialization; using Tango.BL.Entities; using Tango.MachineStudio.Technician.Editors; +using Tango.MachineStudio.Technician.Helpers; using Tango.SharedUI.Helpers; namespace Tango.MachineStudio.Technician.TechItems @@ -34,7 +35,7 @@ namespace Tango.MachineStudio.Technician.TechItems if (_techMonitor != old && Editor != null) { - Editor.InnerGraph.InnerGraph.MaxPoints = Common.Helpers.GraphsHelper.GetMaxPoints(TechMonitor.PointsPerFrame); + Editor.InnerGraph.InnerGraph.MaxPoints = GraphsHelper.GetMaxPoints(TechMonitor.PointsPerFrame); Editor.InnerGraph.InvalidateGraph(); } diff --git a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Technician/TechItems/SingleGraphItem.cs b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Technician/TechItems/SingleGraphItem.cs index 648d8eda3..19cbab426 100644 --- a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Technician/TechItems/SingleGraphItem.cs +++ b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Technician/TechItems/SingleGraphItem.cs @@ -7,6 +7,7 @@ using System.Windows.Media; using System.Xml.Serialization; using Tango.BL.Entities; using Tango.MachineStudio.Technician.Editors; +using Tango.MachineStudio.Technician.Helpers; using Tango.SharedUI.Helpers; namespace Tango.MachineStudio.Technician.TechItems @@ -35,7 +36,7 @@ namespace Tango.MachineStudio.Technician.TechItems if (_techMonitor != old && Editor != null) { - Editor.InnerGraph.InnerGraph.MaxPoints = Common.Helpers.GraphsHelper.GetMaxPoints(TechMonitor.PointsPerFrame); + Editor.InnerGraph.InnerGraph.MaxPoints = GraphsHelper.GetMaxPoints(TechMonitor.PointsPerFrame); Editor.InnerGraph.InvalidateGraph(); } diff --git a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Technician/TechnicianModuleSettings.cs b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Technician/TechnicianModuleSettings.cs new file mode 100644 index 000000000..12acaf3ee --- /dev/null +++ b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Technician/TechnicianModuleSettings.cs @@ -0,0 +1,36 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using Tango.Settings; + +namespace Tango.MachineStudio.Technician +{ + public class TechnicianModuleSettings : SettingsBase + { + /// + /// Gets or sets the graphs view duration in seconds. + /// + public int GraphsViewDurationSeconds { get; set; } + + /// + /// Gets or sets the diagnostics response interval in milliseconds. + /// + public int DiagnosticsResponseIntervalMilli { get; set; } + + /// + /// Gets or sets the las tech project file. + /// + public String LastTechProjectFile { get; set; } + + /// + /// Initializes a new instance of the class. + /// + public TechnicianModuleSettings() + { + GraphsViewDurationSeconds = 10; + DiagnosticsResponseIntervalMilli = 30; + } + } +} diff --git a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Technician/ViewModelLocator.cs b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Technician/ViewModelLocator.cs index 5921a2f15..a7d08eb45 100644 --- a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Technician/ViewModelLocator.cs +++ b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Technician/ViewModelLocator.cs @@ -1,5 +1,4 @@ using Tango.Core.DI; -using Tango.MachineStudio.Technician.Navigation; using Tango.MachineStudio.Technician.ViewModels; namespace Tango.MachineStudio.Technician @@ -15,29 +14,7 @@ namespace Tango.MachineStudio.Technician /// static ViewModelLocator() { - TangoIOC.Default.Register(); - TangoIOC.Default.Register(); TangoIOC.Default.Register(); - - TangoIOC.Default.Unregister(); - - TangoIOC.Default.Register(); - } - - public static MainViewVM MainViewVM - { - get - { - return TangoIOC.Default.GetInstance(); - } - } - - public static SensorsViewVM SensorsViewVM - { - get - { - return TangoIOC.Default.GetInstance(); - } } public static MachineTechViewVM MachineTechViewVM 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 ac78ef488..d8369ea7b 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 @@ -31,6 +31,7 @@ using Tango.BL; using Tango.MachineStudio.Common.EventLogging; using Tango.MachineStudio.Common; using Tango.Core.Commands; +using Tango.MachineStudio.Technician.Helpers; namespace Tango.MachineStudio.Technician.ViewModels { @@ -50,6 +51,8 @@ namespace Tango.MachineStudio.Technician.ViewModels private IEventLogger _eventLogger; private DateTime _lastDiagnosticsResponseUpdate; private const int MIN_DIAGNOSTICS_UPDATE_MILI = 500; + private TechnicianModuleSettings _settings; + #region Properties @@ -191,6 +194,8 @@ namespace Tango.MachineStudio.Technician.ViewModels /// The notification provider. public MachineTechViewVM(IStudioApplicationManager applicationManager, INotificationProvider notificationProvider, IDiagnosticsFrameProvider _diagnosticsFrameProvider, IEventLogger eventLogger) { + _settings = SettingsManager.Default.GetOrCreate(); + _notification = notificationProvider; _eventLogger = eventLogger; _singleControllers = new Dictionary(); @@ -208,7 +213,7 @@ namespace Tango.MachineStudio.Technician.ViewModels SaveAsProjectCommand = new RelayCommand(SaveAsProject); SaveProjectCommand = new RelayCommand(SaveProject); - _lastTechProjectFile = SettingsManager.Default.MachineStudio.TechnicianModule.LasTechProjectFile; + _lastTechProjectFile = _settings.LastTechProjectFile; if (File.Exists(_lastTechProjectFile)) { @@ -680,7 +685,7 @@ namespace Tango.MachineStudio.Technician.ViewModels var graphItem = element.HostedElement as SingleGraphItem; var editor = element as SingleGraphElementEditor; graphItem.Editor = editor; - editor.InnerGraph.InnerGraph.MaxPoints = Common.Helpers.GraphsHelper.GetMaxPoints(graphItem.TechMonitor.PointsPerFrame); + editor.InnerGraph.InnerGraph.MaxPoints = GraphsHelper.GetMaxPoints(graphItem.TechMonitor.PointsPerFrame); GraphController controller = new GraphController(); editor.InnerGraph.Controller = controller; @@ -691,7 +696,7 @@ namespace Tango.MachineStudio.Technician.ViewModels { var graphItem = element.HostedElement as MultiGraphItem; var editor = element as MultiGraphElementEditor; - editor.InnerGraph.InnerGraph.MaxPoints = Common.Helpers.GraphsHelper.GetMaxPoints(graphItem.TechMonitor.PointsPerFrame); + editor.InnerGraph.InnerGraph.MaxPoints = GraphsHelper.GetMaxPoints(graphItem.TechMonitor.PointsPerFrame); graphItem.Editor = editor; @@ -923,7 +928,7 @@ namespace Tango.MachineStudio.Technician.ViewModels /// The editor. private void InitSingleGraphitem(SingleGraphItem item, SingleGraphElementEditor editor) { - editor.InnerGraph.InnerGraph.MaxPoints = Common.Helpers.GraphsHelper.GetMaxPoints(item.TechMonitor.PointsPerFrame); + editor.InnerGraph.InnerGraph.MaxPoints = GraphsHelper.GetMaxPoints(item.TechMonitor.PointsPerFrame); item.Editor = editor; GraphController controller = new GraphController(); @@ -939,7 +944,7 @@ namespace Tango.MachineStudio.Technician.ViewModels /// The editor. private void InitMultiGraphItem(MultiGraphItem item, MultiGraphElementEditor editor) { - editor.InnerGraph.InnerGraph.MaxPoints = Common.Helpers.GraphsHelper.GetMaxPoints(item.TechMonitor.PointsPerFrame); + editor.InnerGraph.InnerGraph.MaxPoints = GraphsHelper.GetMaxPoints(item.TechMonitor.PointsPerFrame); item.Editor = editor; GraphMultiController controller = new GraphMultiController(); @@ -1280,7 +1285,7 @@ namespace Tango.MachineStudio.Technician.ViewModels { InvokeUINow(() => { - SettingsManager.Default.MachineStudio.TechnicianModule.LasTechProjectFile = _lastTechProjectFile; + _settings.LastTechProjectFile = _lastTechProjectFile; }); } diff --git a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Technician/ViewModels/MainViewVM.cs b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Technician/ViewModels/MainViewVM.cs deleted file mode 100644 index 306f15c5c..000000000 --- a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Technician/ViewModels/MainViewVM.cs +++ /dev/null @@ -1,56 +0,0 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; -using System.Threading.Tasks; -using Tango.Core.Commands; -using Tango.MachineStudio.Technician.Navigation; -using Tango.SharedUI; - -namespace Tango.MachineStudio.Technician.ViewModels -{ - /// - /// Represents the technician module main view, view model. - /// - /// - public class MainViewVM : ViewModel - { - private TechNavigationManager _navigation; - - #region Constructors - - /// - /// Initializes a new instance of the class. - /// - /// The navigation manager. - public MainViewVM(TechNavigationManager navigationManager) - { - _navigation = navigationManager; - NavigateToViewCommand = new RelayCommand(NavigateToView); - } - - #endregion - - #region Commands - - /// - /// Gets or sets the navigate to view command. - /// - public RelayCommand NavigateToViewCommand { get; set; } - - #endregion - - #region Private Methods - - /// - /// Navigates to the specified view. - /// - /// The view. - private void NavigateToView(string view) - { - _navigation.NavigateTo((TechNavigationView)Enum.Parse(typeof(TechNavigationView), view, true)); - } - - #endregion - } -} diff --git a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Technician/ViewModels/SensorsViewVM.cs b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Technician/ViewModels/SensorsViewVM.cs deleted file mode 100644 index 403a6d510..000000000 --- a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Technician/ViewModels/SensorsViewVM.cs +++ /dev/null @@ -1,193 +0,0 @@ -using RealTimeGraphEx.Controllers; -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; -using System.Threading.Tasks; -using Tango.Integration.Operation; -using Tango.Integration.Services; -using Tango.Logging; -using Tango.MachineStudio.Common.Modules; -using Tango.MachineStudio.Common.StudioApplication; -using Tango.PMR.Diagnostics; -using Tango.Settings; -using Tango.SharedUI; - -namespace Tango.MachineStudio.Technician.ViewModels -{ - /// - /// Represents the technician module sensors view, view model. - /// - /// - public class SensorsViewVM : ViewModel - { - private List _controllers; - - #region Properties - - /// - /// Gets or sets the application manager. - /// - public IStudioApplicationManager ApplicationManager { get; set; } - - private IMachineOperator _machineOperator; - /// - /// Gets or sets the machine operator. - /// - public IMachineOperator MachineOperator - { - get { return _machineOperator; } - set { _machineOperator = value; RaisePropertyChangedAuto(); } - } - - private int _graphSeconds; - /// - /// Gets or sets the graphs number of seconds to complete FIFO capacity. - /// - public int GraphSeconds - { - get { return _graphSeconds; } - set { _graphSeconds = value; RaisePropertyChanged(nameof(GraphSeconds)); } - } - - /// - /// Clears the graphs. - /// - public void ClearGraphs() - { - _controllers.ForEach(x => x.Clear()); - } - - #endregion - - #region Constructors - - /// - /// Initializes a new instance of the class. - /// - /// The application manager. - /// The module loader. - public SensorsViewVM(IStudioApplicationManager applicationManager, IStudioModuleLoader moduleLoader) - { - ApplicationManager = applicationManager; - ApplicationManager.ConnectedMachineChanged += ApplicationManager_ConnectedMachineChanged; - - InitializeConnectedMachine(ApplicationManager.ConnectedMachine); - - if (!DesignMode) - { - //Set graphs FIFO capacity by seconds (this will be converted to MaxPoints by the view). - GraphSeconds = SettingsManager.Default.MachineStudio.TechnicianModule.GraphsDuration; - - _controllers = new List(); - - TemperatureController = new GraphController(); - PressureController = new GraphController(); - VelocityController = new GraphController(); - - _controllers.Add(TemperatureController); - _controllers.Add(PressureController); - _controllers.Add(VelocityController); - - var module = moduleLoader.GetStudioModule(); - - if (module != null) - { - module.IsLoadedChanged += Module_IsLoadedChanged; - } - } - } - - #endregion - - #region Event Handlers - - /// - /// Handles the technician module IsLoaded changed event. - /// - /// The sender. - /// if set to true [loaded]. - private void Module_IsLoadedChanged(object sender, bool loaded) - { - _controllers.ForEach(x => x.ChangeRenderMode(loaded)); - } - - /// - /// Handles the application manager connected machine changed event. - /// - /// The sender. - /// The machine operator. - private void ApplicationManager_ConnectedMachineChanged(object sender, IExternalBridgeClient machineOperator) - { - InitializeConnectedMachine(machineOperator); - } - - /// - /// Handles the machine operator diagnostics data available event - /// - /// The sender. - /// The data. - private void MachineOperator_DiagnosticsDataAvailable(object sender, StartDiagnosticsResponse data) - { - //TemperatureController.PushData(data.Temperature.ToArray()); - //PressureController.PushData(data.Temperature.ToArray()); - //VelocityController.PushData(data.Velocity.ToArray()); - } - - #endregion - - #region Private Methods - - /// - /// Initializes the connected machine. - /// - /// The machine operator. - private void InitializeConnectedMachine(IMachineOperator machineOperator) - { - //MachineOperator = machineOperator; - - //if (MachineOperator != null) - //{ - // MachineOperator.EnableSensorsUpdate = true; - // MachineOperator.DiagnosticsDataAvailable -= MachineOperator_DiagnosticsDataAvailable; - // MachineOperator.DiagnosticsDataAvailable += MachineOperator_DiagnosticsDataAvailable; - //} - } - - #endregion - - #region Graphs Controllers - - private GraphController _temperatureController; - /// - /// Gets or sets the temperature sensor graph controller . - /// - public GraphController TemperatureController - { - get { return _temperatureController; } - set { _temperatureController = value; RaisePropertyChanged(nameof(TemperatureController)); } - } - - private GraphController _pressureController; - /// - /// Gets or sets the pressure sensor graph controller . - /// - public GraphController PressureController - { - get { return _pressureController; } - set { _pressureController = value; RaisePropertyChanged(nameof(PressureController)); } - } - - private GraphController _velocityController; - /// - /// Gets or sets the velocity sensor graph controller . - /// - public GraphController VelocityController - { - get { return _velocityController; } - set { _velocityController = value; RaisePropertyChanged(nameof(VelocityController)); } - } - - #endregion - } -} diff --git a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Technician/Views/MainView.xaml b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Technician/Views/MainView.xaml deleted file mode 100644 index 6b84881fd..000000000 --- a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Technician/Views/MainView.xaml +++ /dev/null @@ -1,102 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Technician/Views/MainView.xaml.cs b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Technician/Views/MainView.xaml.cs deleted file mode 100644 index b07fc597e..000000000 --- a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Technician/Views/MainView.xaml.cs +++ /dev/null @@ -1,31 +0,0 @@ -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.Views -{ - /// - /// Interaction logic for MainView.xaml - /// - public partial class MainView : UserControl - { - public static MainView Instance { get; set; } - - public MainView() - { - InitializeComponent(); - Instance = this; - } - } -} diff --git a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Technician/Views/MotorsView.xaml b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Technician/Views/MotorsView.xaml deleted file mode 100644 index 3fb49d457..000000000 --- a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Technician/Views/MotorsView.xaml +++ /dev/null @@ -1,12 +0,0 @@ - - - MOTORS - - diff --git a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Technician/Views/MotorsView.xaml.cs b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Technician/Views/MotorsView.xaml.cs deleted file mode 100644 index bd548766c..000000000 --- a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Technician/Views/MotorsView.xaml.cs +++ /dev/null @@ -1,28 +0,0 @@ -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.Views -{ - /// - /// Interaction logic for MotorsView.xaml - /// - public partial class MotorsView : UserControl - { - public MotorsView() - { - InitializeComponent(); - } - } -} diff --git a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Technician/Views/OverviewView.xaml b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Technician/Views/OverviewView.xaml deleted file mode 100644 index 3c064346d..000000000 --- a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Technician/Views/OverviewView.xaml +++ /dev/null @@ -1,12 +0,0 @@ - - - OVERVIEW - - diff --git a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Technician/Views/OverviewView.xaml.cs b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Technician/Views/OverviewView.xaml.cs deleted file mode 100644 index aeba42c00..000000000 --- a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Technician/Views/OverviewView.xaml.cs +++ /dev/null @@ -1,28 +0,0 @@ -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.Views -{ - /// - /// Interaction logic for OverviewView.xaml - /// - public partial class OverviewView : UserControl - { - public OverviewView() - { - InitializeComponent(); - } - } -} diff --git a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Technician/Views/SensorsView.xaml b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Technician/Views/SensorsView.xaml deleted file mode 100644 index 63feae2f3..000000000 --- a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Technician/Views/SensorsView.xaml +++ /dev/null @@ -1,173 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Technician/Views/SensorsView.xaml.cs b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Technician/Views/SensorsView.xaml.cs deleted file mode 100644 index e60deacbd..000000000 --- a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Technician/Views/SensorsView.xaml.cs +++ /dev/null @@ -1,53 +0,0 @@ -using RealTimeGraphEx.Synchronization; -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.Views -{ - /// - /// Interaction logic for DebugView.xaml - /// - public partial class SensorsView : UserControl - { - private SyncManager _syncManager; - - public SensorsView() - { - InitializeComponent(); - - _syncManager = new SyncManager(); - _syncManager.AddGraph(graphTemperature); - _syncManager.AddGraph(graphPressure); - _syncManager.AddGraph(graphVelocity); - _syncManager.RefreshRate = 30; - _syncManager.Start(); - } - - private void OnGraphFullScreen(object sender, RoutedEventArgs e) - { - - } - - private void Graph_MouseEnter(object sender, MouseEventArgs e) - { - - } - - private void Graph_MouseLeave(object sender, MouseEventArgs e) - { - - } - } -} -- cgit v1.3.1