aboutsummaryrefslogtreecommitdiffstats
path: root/Software/Visual_Studio/Azure/Tango.AzureUtils.UI/Controls/WebAppPropertiesControl.xaml.cs
diff options
context:
space:
mode:
authorRoy <Roy.mail.net@gmail.com>2022-11-20 19:06:28 +0200
committerRoy <Roy.mail.net@gmail.com>2022-11-20 19:06:28 +0200
commit7c7e27fad7deb4c82a5ca7e5cb19184fa324b8d5 (patch)
tree4ebd799531535c2415e9640d2a17e9763c83e2df /Software/Visual_Studio/Azure/Tango.AzureUtils.UI/Controls/WebAppPropertiesControl.xaml.cs
parentfa2c00989b50258d1195925030ed1da2a1d6d040 (diff)
downloadTango-7c7e27fad7deb4c82a5ca7e5cb19184fa324b8d5.tar.gz
Tango-7c7e27fad7deb4c82a5ca7e5cb19184fa324b8d5.zip
AzureUtils PPC VersionTag kind of working.
Diffstat (limited to 'Software/Visual_Studio/Azure/Tango.AzureUtils.UI/Controls/WebAppPropertiesControl.xaml.cs')
-rw-r--r--Software/Visual_Studio/Azure/Tango.AzureUtils.UI/Controls/WebAppPropertiesControl.xaml.cs29
1 files changed, 24 insertions, 5 deletions
diff --git a/Software/Visual_Studio/Azure/Tango.AzureUtils.UI/Controls/WebAppPropertiesControl.xaml.cs b/Software/Visual_Studio/Azure/Tango.AzureUtils.UI/Controls/WebAppPropertiesControl.xaml.cs
index a0e01e160..51303d126 100644
--- a/Software/Visual_Studio/Azure/Tango.AzureUtils.UI/Controls/WebAppPropertiesControl.xaml.cs
+++ b/Software/Visual_Studio/Azure/Tango.AzureUtils.UI/Controls/WebAppPropertiesControl.xaml.cs
@@ -26,6 +26,22 @@ namespace Tango.AzureUtils.UI.Controls
/// </summary>
public partial class WebAppPropertiesControl : UserControl
{
+ public IWebAppBase WebApp
+ {
+ get { return (IWebAppBase)GetValue(WebAppProperty); }
+ set { SetValue(WebAppProperty, value); }
+ }
+ public static readonly DependencyProperty WebAppProperty =
+ DependencyProperty.Register("WebApp", typeof(IWebAppBase), typeof(WebAppPropertiesControl), new PropertyMetadata(null, (d, e) => (d as WebAppPropertiesControl).UpdateControl()));
+
+ public String PPCVersionTag
+ {
+ get { return (String)GetValue(PPCVersionTagProperty); }
+ set { SetValue(PPCVersionTagProperty, value); }
+ }
+ public static readonly DependencyProperty PPCVersionTagProperty =
+ DependencyProperty.Register("PPCVersionTag", typeof(String), typeof(WebAppPropertiesControl), new PropertyMetadata(null, (d, e) => (d as WebAppPropertiesControl).UpdateControl()));
+
public MachineServiceSettings Settings
{
get { return (MachineServiceSettings)GetValue(SettingsProperty); }
@@ -99,15 +115,18 @@ namespace Tango.AzureUtils.UI.Controls
public WebAppPropertiesControl()
{
InitializeComponent();
+ }
- DataContextChanged += WebAppPropertiesControl_DataContextChanged;
+ private void WebAppPropertiesControl_DataContextChanged(object sender, DependencyPropertyChangedEventArgs e)
+ {
+ UpdateControl();
}
- private async void WebAppPropertiesControl_DataContextChanged(object sender, DependencyPropertyChangedEventArgs e)
+ private async void UpdateControl()
{
- if (DataContext != null && DataContext is IWebAppBase)
+ if (WebApp != null && WebApp is IWebAppBase)
{
- IWebAppBase app = DataContext as IWebAppBase;
+ IWebAppBase app = WebApp as IWebAppBase;
try
{
@@ -124,7 +143,7 @@ namespace Tango.AzureUtils.UI.Controls
var azure = await AzureUtilsAuthenticationFactory.AuthenticateOrGetAsync();
var databaseManager = new DatabaseManager(azure);
- TangoVersion = await databaseManager.GetLatestPPCVersion(app);
+ TangoVersion = await databaseManager.GetLatestPPCVersion(app, PPCVersionTag);
MachineStudioVersion = await databaseManager.GetLatestMachineStudioVersion(app);
FseVersion = await databaseManager.GetLatestFSEVersion(app, FSEBuildVariants.FSE);
TwineRSMVersion = await databaseManager.GetLatestFSEVersion(app, FSEBuildVariants.TwineRSM);