aboutsummaryrefslogtreecommitdiffstats
path: root/Software/Visual_Studio/PPC/Tango.PPC.Publisher.UI
diff options
context:
space:
mode:
authorRoy Ben Shabat <Roy.mail.net@gmail.com>2020-08-05 22:18:14 +0300
committerRoy Ben Shabat <Roy.mail.net@gmail.com>2020-08-05 22:18:14 +0300
commit03bc9bd370929884f98ee9488146646d44911efd (patch)
treeb4c694fa99ab2f351f4097ae0467a320cc5d9a59 /Software/Visual_Studio/PPC/Tango.PPC.Publisher.UI
parent568ffe0a9c0141c4530d962f134b4c5960d6ff9b (diff)
downloadTango-03bc9bd370929884f98ee9488146646d44911efd.tar.gz
Tango-03bc9bd370929884f98ee9488146646d44911efd.zip
Improved PPC Publisher for Firmware version display and validation.
Diffstat (limited to 'Software/Visual_Studio/PPC/Tango.PPC.Publisher.UI')
-rw-r--r--Software/Visual_Studio/PPC/Tango.PPC.Publisher.UI/MainWindow.xaml10
-rw-r--r--Software/Visual_Studio/PPC/Tango.PPC.Publisher.UI/MainWindowVM.cs26
2 files changed, 31 insertions, 5 deletions
diff --git a/Software/Visual_Studio/PPC/Tango.PPC.Publisher.UI/MainWindow.xaml b/Software/Visual_Studio/PPC/Tango.PPC.Publisher.UI/MainWindow.xaml
index f74194222..1d60a70be 100644
--- a/Software/Visual_Studio/PPC/Tango.PPC.Publisher.UI/MainWindow.xaml
+++ b/Software/Visual_Studio/PPC/Tango.PPC.Publisher.UI/MainWindow.xaml
@@ -67,15 +67,17 @@
<TextBlock Margin="0 20 0 0">
<TextBlock>
- <Run>Remote Version:</Run>
- <Run Text="{Binding RemoteVersion}"></Run>
+ <Run>Remote Versions:</Run>
+ <Run Text="{Binding RemoteVersion}"></Run>,
+ <Run Text="{Binding RemoteFirmwareVersion}"></Run>
</TextBlock>
</TextBlock>
<TextBlock Margin="0 20 0 0">
<TextBlock>
- <Run>Local Version:</Run>
- <Run Text="{Binding LocalVersion}"></Run>
+ <Run>Local Versions:</Run>
+ <Run Text="{Binding LocalVersion}"></Run>,
+ <Run Text="{Binding LocalFirmwareVersion}"></Run>
</TextBlock>
</TextBlock>
diff --git a/Software/Visual_Studio/PPC/Tango.PPC.Publisher.UI/MainWindowVM.cs b/Software/Visual_Studio/PPC/Tango.PPC.Publisher.UI/MainWindowVM.cs
index 98b35ed3f..d935c44d2 100644
--- a/Software/Visual_Studio/PPC/Tango.PPC.Publisher.UI/MainWindowVM.cs
+++ b/Software/Visual_Studio/PPC/Tango.PPC.Publisher.UI/MainWindowVM.cs
@@ -67,6 +67,13 @@ namespace Tango.PPC.Publisher.UI
set { _localVersion = value; RaisePropertyChangedAuto(); }
}
+ private String _localFirmwareVersion;
+ public String LocalFirmwareVersion
+ {
+ get { return _localFirmwareVersion; }
+ set { _localFirmwareVersion = value; RaisePropertyChangedAuto(); }
+ }
+
private String _remoteVersion;
public String RemoteVersion
{
@@ -74,6 +81,13 @@ namespace Tango.PPC.Publisher.UI
set { _remoteVersion = value; RaisePropertyChangedAuto(); }
}
+ private String _remoteFirmwareVersion;
+ public String RemoteFirmwareVersion
+ {
+ get { return _remoteFirmwareVersion; }
+ set { _remoteFirmwareVersion = value; RaisePropertyChangedAuto(); }
+ }
+
private ICollectionView _provisionSequenceItemsView;
public ICollectionView ProvisionSequenceItemsView
{
@@ -127,6 +141,7 @@ namespace Tango.PPC.Publisher.UI
Options.BasicInfoChanged += (_, __) => InvalidateRelayCommands();
Options.EnvironmentChanged += async (_, __) => await OnEnvironmentChanged();
Options.BuidConfigChanged += async (_, __) => await UpdateVersions();
+ Options.TfpPathChanged += async (_, __) => await UpdateVersions();
Init();
}
@@ -165,9 +180,18 @@ namespace Tango.PPC.Publisher.UI
{
IsFree = false;
LocalVersion = _publisher.GetLocalVersion();
+
+ try
+ {
+ LocalFirmwareVersion = _publisher.GetLocalFirmwareVersion(Options.TfpPath);
+ }
+ catch {}
+
if (SelectedMachineVersion != null)
{
- RemoteVersion = await _publisher.GetRemoteVersion(SelectedMachineVersion.Guid);
+ var latestVersion = await _publisher.GetRemoteVersion(SelectedMachineVersion.Guid);
+ RemoteVersion = latestVersion.Version;
+ RemoteFirmwareVersion = latestVersion.FirmwareVersion;
}
InvalidateRelayCommands();
IsFree = true;