aboutsummaryrefslogtreecommitdiffstats
path: root/Software/Visual_Studio/MachineStudio/Modules
diff options
context:
space:
mode:
authorRoy Ben-Shabat <Roy@Twine-s.com>2019-01-14 12:48:33 +0200
committerRoy Ben-Shabat <Roy@Twine-s.com>2019-01-14 12:48:33 +0200
commit4ca2cb29d8bf2b93c35ac12e6d629a3537bb4a0b (patch)
tree6d5188c6b353632dda0bbe3a0751c3dec454ad6a /Software/Visual_Studio/MachineStudio/Modules
parentf61363eb0a1f2237e7185118badf586889465064 (diff)
downloadTango-4ca2cb29d8bf2b93c35ac12e6d629a3537bb4a0b.tar.gz
Tango-4ca2cb29d8bf2b93c35ac12e6d629a3537bb4a0b.zip
Machine Studio v4.0.0.0
Added reset all graphs to tech board.
Diffstat (limited to 'Software/Visual_Studio/MachineStudio/Modules')
-rw-r--r--Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Technician/ViewModels/MachineTechViewVM.cs12
-rw-r--r--Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Technician/Views/MachineTechView.xaml5
2 files changed, 17 insertions, 0 deletions
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 adf85516e..e1fddac83 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
@@ -281,6 +281,12 @@ namespace Tango.MachineStudio.Technician.ViewModels
/// Gets or sets the upload partial hardware configuration command.
/// </summary>
public RelayCommand UploadPartialHardwareConfigurationCommand { get; set; }
+
+ /// <summary>
+ /// Gets or sets the reset command.
+ /// </summary>
+ public RelayCommand ResetGraphsCommand { get; set; }
+
#endregion
#region Constructors
@@ -356,6 +362,7 @@ namespace Tango.MachineStudio.Technician.ViewModels
RenameTabCommand = new RelayCommand(RenameTab);
ImportProjectTabsCommand = new RelayCommand(ImportProjectTabs);
UploadPartialHardwareConfigurationCommand = new RelayCommand(UploadPartialHardwareConfiguration);
+ ResetGraphsCommand = new RelayCommand(ClearAllGraphs);
}
#endregion
@@ -375,6 +382,8 @@ namespace Tango.MachineStudio.Technician.ViewModels
{
ResetHardwareConfiguration(false);
}
+
+ ClearAllGraphs();
}
/// <summary>
@@ -2462,6 +2471,9 @@ namespace Tango.MachineStudio.Technician.ViewModels
public void ClearAllGraphs()
{
+ _start_time = new DateTime(DateTime.Now.Year, DateTime.Now.Month, DateTime.Now.Day, 0, 0, 0);
+ _last_time = DateTime.Now;
+
foreach (var controller in _singleControllers)
{
controller.Value.Clear();
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 3072ea98c..92e2b292a 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
@@ -234,6 +234,11 @@
<fa:ImageAwesome Icon="Upload" Width="16" />
</MenuItem.Icon>
</MenuItem>
+ <MenuItem Header="Reset all graphs" Command="{Binding ResetGraphsCommand}">
+ <MenuItem.Icon>
+ <fa:ImageAwesome Icon="Refresh" Width="16" />
+ </MenuItem.Icon>
+ </MenuItem>
</MenuItem>
<MenuItem Header="Components">
<MenuItem.ItemContainerStyle>