From 3b3967d9d1106c1df0d975eb1c2e47170746528c Mon Sep 17 00:00:00 2001 From: Victoria Plitt Date: Mon, 2 Sep 2019 14:46:14 +0300 Subject: Implemented hardware versions comparison tool. --- .../ViewModels/MainViewVM.cs | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) (limited to 'Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.HardwareDesigner/ViewModels/MainViewVM.cs') diff --git a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.HardwareDesigner/ViewModels/MainViewVM.cs b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.HardwareDesigner/ViewModels/MainViewVM.cs index 6cc8289f4..918eb02d4 100644 --- a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.HardwareDesigner/ViewModels/MainViewVM.cs +++ b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.HardwareDesigner/ViewModels/MainViewVM.cs @@ -13,6 +13,7 @@ using Tango.SharedUI.Components; using System.Runtime.CompilerServices; using Tango.MachineStudio.Common; using Tango.Core.ExtensionMethods; +using Tango.MachineStudio.HardwareDesigner.Views; namespace Tango.MachineStudio.HardwareDesigner.ViewModels { @@ -86,7 +87,7 @@ namespace Tango.MachineStudio.HardwareDesigner.ViewModels return name; } } - + private ObservableCollection _hardwareVersions; public ObservableCollection HardwareVersions { @@ -104,6 +105,8 @@ namespace Tango.MachineStudio.HardwareDesigner.ViewModels public RelayCommand CopyParametersCommand { get; set; } + public RelayCommand OpenComparisonWizardCommand { get; set; } + public MainViewVM(INotificationProvider notification) { _notification = notification; @@ -118,6 +121,8 @@ namespace Tango.MachineStudio.HardwareDesigner.ViewModels CopyParametersCommand = new RelayCommand(CopyParameters, (x) => SelectedVersion != null && IsFree); CloneCommand = new RelayCommand(CloneCurrentVersion, () => SelectedVersion != null && IsFree); + + OpenComparisonWizardCommand = new RelayCommand(OpenComparisonWizard); } public override void OnApplicationReady() @@ -428,6 +433,12 @@ namespace Tango.MachineStudio.HardwareDesigner.ViewModels } } + private void OpenComparisonWizard() + { + ComparisonWizardViewVM vm = new ComparisonWizardViewVM(HardwareVersions, SelectedVersion, _notification); + _notification.ShowModalDialog(vm, (x) => { }, () => { }); + } + protected override void RaisePropertyChangedAuto([CallerMemberName] string caller = null) { base.RaisePropertyChangedAuto(caller); -- cgit v1.3.1