diff options
Diffstat (limited to 'Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Technician/TechItems/MultiGraphItem.cs')
| -rw-r--r-- | Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Technician/TechItems/MultiGraphItem.cs | 35 |
1 files changed, 24 insertions, 11 deletions
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 d4bdfb7b2..5a3bd0327 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 @@ -79,16 +79,6 @@ namespace Tango.MachineStudio.Technician.TechItems set { _max = value; RaisePropertyChangedAuto(); } } - private bool _useMinMax; - /// <summary> - /// Gets or sets a value indicating whether [use minimum maximum]. - /// </summary> - public bool UseMinMax - { - get { return _useMinMax; } - set { _useMinMax = value; RaisePropertyChangedAuto(); } - } - private bool _useAutoRange; /// <summary> /// Gets or sets a value indicating whether [use automatic range]. @@ -144,6 +134,12 @@ namespace Tango.MachineStudio.Technician.TechItems public RelayCommand ToggleRecordingCommand { get; set; } /// <summary> + /// Gets or sets the reset minimum maximum to default command. + /// </summary> + [XmlIgnore] + public RelayCommand ResetMinMaxToDefaultCommand { get; set; } + + /// <summary> /// Initializes a new instance of the <see cref="MultiGraphItem"/> class. /// </summary> public MultiGraphItem() : base() @@ -166,6 +162,24 @@ namespace Tango.MachineStudio.Technician.TechItems }); ToggleRecordingCommand = new RelayCommand(ToggleRecording); + + ResetMinMaxToDefaultCommand = new RelayCommand(() => + { + if (TechMonitor != null) + { + Min = TechMonitor.Min; + Max = TechMonitor.Max; + } + }); + } + + private void OnTechMonitorChanged() + { + if (TechMonitor != null) + { + Min = TechMonitor.Min; + Max = TechMonitor.Max; + } } private void _timer_Tick(object sender, EventArgs e) @@ -210,7 +224,6 @@ namespace Tango.MachineStudio.Technician.TechItems cloned.TechMonitor = TechMonitor; cloned.Min = Min; cloned.Max = Max; - cloned.UseMinMax = UseMinMax; cloned.UseAutoRange = UseAutoRange; return cloned; } |
