Fixed duplicate message on the UpsellDialog.

Signed-off-by: Konstantina Chremmou <Konstantina.Chremmou@cloud.com>
This commit is contained in:
Konstantina Chremmou 2023-09-08 16:13:34 +01:00
parent 7b41c3a82c
commit fce47b8152
2 changed files with 5 additions and 9 deletions

View File

@ -45,10 +45,10 @@ namespace XenAdmin.Controls
public UpsellPage()
{
InitializeComponent();
this.LearnMoreButton.Visible = !HiddenFeatures.LearnMoreButtonHidden;
LearnMoreButton.Visible = !HiddenFeatures.LearnMoreButtonHidden;
}
public void enableOkButton()
public void EnableOkButton()
{
OKButton.Visible = true;
}
@ -60,11 +60,9 @@ namespace XenAdmin.Controls
: value + string.Format(Messages.UPSELL_BLURB_TRIAL, BrandManager.ProductBrand);
}
public string LearnMoreUrl { private get; set; } = InvisibleMessages.UPSELL_LEARNMOREURL_TRIAL;
private void LearnMoreButton_Clicked(object sender, EventArgs e)
{
NavigateTo(LearnMoreUrl);
NavigateTo(InvisibleMessages.UPSELL_LEARNMOREURL_TRIAL);
}
private void NavigateTo(string url)

View File

@ -41,7 +41,7 @@ namespace XenAdmin.Dialogs
{
InitializeComponent();
upsellPage1.BlurbText = blurb;
upsellPage1.enableOkButton();
upsellPage1.EnableOkButton();
CancelButton = upsellPage1.OKButton;
Height = upsellPage1.Height;
}
@ -54,9 +54,7 @@ namespace XenAdmin.Dialogs
public static void ShowUpsellDialog(string message, IWin32Window parent)
{
using (var upsellDialog = new UpsellDialog(HiddenFeatures.LinkLabelHidden
? message
: message + string.Format(Messages.UPSELL_BLURB_TRIAL, BrandManager.ProductBrand)))
using (var upsellDialog = new UpsellDialog(message))
upsellDialog.ShowDialog(parent);
}
}