diff options
| author | Avi Levkovich <avi@twine-s.com> | 2019-02-25 09:20:02 +0200 |
|---|---|---|
| committer | Avi Levkovich <avi@twine-s.com> | 2019-02-25 09:20:02 +0200 |
| commit | 44a35db8a2929fb3f6aa56ed08185e066292f106 (patch) | |
| tree | ac744ffceb5f2a1d26852f66f52120781d0ac8d9 /Software/Visual_Studio/MachineStudio/Tango.MachineStudio.UI/ViewModels | |
| parent | a9713d76bb1602c38cf204bf7e7b2daeb714bda2 (diff) | |
| parent | cc7cafd24fdb59afc78d198062c469344177f553 (diff) | |
| download | Tango-44a35db8a2929fb3f6aa56ed08185e066292f106.tar.gz Tango-44a35db8a2929fb3f6aa56ed08185e066292f106.zip | |
Merge branch 'master' of https://twinetfs.visualstudio.com/_git/Tango
Diffstat (limited to 'Software/Visual_Studio/MachineStudio/Tango.MachineStudio.UI/ViewModels')
| -rw-r--r-- | Software/Visual_Studio/MachineStudio/Tango.MachineStudio.UI/ViewModels/FirmwareUpgradeViewVM.cs | 32 |
1 files changed, 28 insertions, 4 deletions
diff --git a/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.UI/ViewModels/FirmwareUpgradeViewVM.cs b/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.UI/ViewModels/FirmwareUpgradeViewVM.cs index e54c28e17..e45c29f73 100644 --- a/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.UI/ViewModels/FirmwareUpgradeViewVM.cs +++ b/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.UI/ViewModels/FirmwareUpgradeViewVM.cs @@ -61,6 +61,7 @@ namespace Tango.MachineStudio.UI.ViewModels if (_dfu) { UploadTFP = false; + DFUAndTFP = false; } } } @@ -76,10 +77,29 @@ namespace Tango.MachineStudio.UI.ViewModels if (_uploadTFP) { DFU = false; + DFUAndTFP = false; } } } + private bool _dfuAndTFP; + + public bool DFUAndTFP + { + get { return _dfuAndTFP; } + set + { + _dfuAndTFP = value; RaisePropertyChangedAuto(); + + if (_dfuAndTFP) + { + DFU = false; + UploadTFP = false; + } + } + } + + public RelayCommand SelectCommand { get; set; } public RelayCommand UpgradeCommand { get; set; } @@ -131,13 +151,17 @@ namespace Tango.MachineStudio.UI.ViewModels { IsFree = false; - if (UploadTFP) + if (DFU) { - _operator.FirmwareUpgradeMode = FirmwareUpgradeModes.DFU | FirmwareUpgradeModes.TFP_PACKAGE; + _operator.FirmwareUpgradeMode = FirmwareUpgradeModes.DFU; } - else + else if (UploadTFP) { - _operator.FirmwareUpgradeMode = FirmwareUpgradeModes.DFU; + _operator.FirmwareUpgradeMode = FirmwareUpgradeModes.TFP_PACKAGE; + } + else if (DFUAndTFP) + { + _operator.FirmwareUpgradeMode = FirmwareUpgradeModes.DFU | FirmwareUpgradeModes.TFP_PACKAGE; } _stream = new FileStream(SelectedFile, FileMode.Open); |
