CP-41432: Replaced the HomePage .mht files with an html file.

Signed-off-by: Konstantina Chremmou <Konstantina.Chremmou@cloud.com>
This commit is contained in:
Konstantina Chremmou 2022-12-07 21:58:02 +00:00
parent 21716c1b06
commit 6f41019ad9
14 changed files with 1403 additions and 4034 deletions

460
Branding/HomePage.html Normal file

File diff suppressed because one or more lines are too long

460
Branding/HomePage.ja.html Normal file

File diff suppressed because one or more lines are too long

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because one or more lines are too long

File diff suppressed because it is too large Load Diff

View File

@ -75,9 +75,9 @@
<File Id="DiscUtils" Source="$(env.RepoRoot)\XenAdmin\bin\Release\DiscUtils.dll" /> <File Id="DiscUtils" Source="$(env.RepoRoot)\XenAdmin\bin\Release\DiscUtils.dll" />
<File Id="XenOvf" Source="$(env.RepoRoot)\XenAdmin\bin\Release\XenOvf.dll" /> <File Id="XenOvf" Source="$(env.RepoRoot)\XenAdmin\bin\Release\XenOvf.dll" />
<!-- Homepage --> <!-- Homepage -->
<File Id="XenCenterHomePage" Source="$(env.RepoRoot)\XenAdmin\bin\Release\HomePage.mht" /> <File Id="XenCenterHomePage" Source="$(env.RepoRoot)\XenAdmin\bin\Release\HomePage.html" />
<File Id="XenCenterJaHomePage" Source="$(env.RepoRoot)\XenAdmin\bin\Release\HomePage.ja.mht" /> <File Id="XenCenterJaHomePage" Source="$(env.RepoRoot)\XenAdmin\bin\Release\HomePage.ja.html" />
<File Id="XenCenterScHomePage" Source="$(env.RepoRoot)\XenAdmin\bin\Release\HomePage.zh-CN.mht" /> <File Id="XenCenterScHomePage" Source="$(env.RepoRoot)\XenAdmin\bin\Release\HomePage.zh-CN.html" />
<!-- Icons --> <!-- Icons -->
<File Id="XenCenterIcon" Source="$(env.RepoRoot)\Branding\Images\AppIcon.ico" /> <File Id="XenCenterIcon" Source="$(env.RepoRoot)\Branding\Images\AppIcon.ico" />
<File Id="XvaIcon" Source="$(env.RepoRoot)\Branding\Images\file_vm.ico" /> <File Id="XvaIcon" Source="$(env.RepoRoot)\Branding\Images\file_vm.ico" />

View File

@ -35,6 +35,7 @@ namespace XenAdmin.TabPages
// webBrowser // webBrowser
// //
resources.ApplyResources(this.webBrowser, "webBrowser"); resources.ApplyResources(this.webBrowser, "webBrowser");
this.webBrowser.IsWebBrowserContextMenuEnabled = false;
this.webBrowser.Name = "webBrowser"; this.webBrowser.Name = "webBrowser";
this.webBrowser.Navigating += new System.Windows.Forms.WebBrowserNavigatingEventHandler(this.webBrowser_Navigating); this.webBrowser.Navigating += new System.Windows.Forms.WebBrowserNavigatingEventHandler(this.webBrowser_Navigating);
// //

View File

@ -43,40 +43,40 @@ namespace XenAdmin.TabPages
private static readonly log4net.ILog log = log4net.LogManager.GetLogger(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); private static readonly log4net.ILog log = log4net.LogManager.GetLogger(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType);
private const string XCNS = "XenCenter://"; private const string XCNS = "XenCenter://";
bool initializing = true; private readonly bool _initializing = true;
public HomePage() public HomePage()
{ {
InitializeComponent(); InitializeComponent();
string path = string.Empty;
try try
{ {
var location = System.IO.Path.Combine(System.IO.Path.GetDirectoryName(System.Reflection.Assembly.GetExecutingAssembly().Location), InvisibleMessages.HOMEPAGE_FILENAME); path = System.IO.Path.Combine(System.IO.Path.GetDirectoryName(System.Reflection.Assembly.GetExecutingAssembly().Location), InvisibleMessages.HOMEPAGE_FILENAME);
webBrowser.Navigate(location); webBrowser.Navigate(path);
} }
catch (Exception ex) catch (Exception ex)
{ {
log.Error(string.Format("Failed to load the HomePage. Url = {0}", Location), ex); log.Error($"Failed to load the HomePage. Url = {path}", ex);
} }
initializing = false; _initializing = false;
} }
private void webBrowser_Navigating(object sender, WebBrowserNavigatingEventArgs e) private void webBrowser_Navigating(object sender, WebBrowserNavigatingEventArgs e)
{ {
if (initializing) if (_initializing)
return; return;
e.Cancel = true; e.Cancel = true;
string url = e.Url.OriginalString; string url = e.Url.OriginalString;
// this is not abstracted away as long as we have only a very limited number of functionalities: if (url.StartsWith(XCNS, StringComparison.InvariantCultureIgnoreCase))
if (url != null && url.StartsWith(XCNS, StringComparison.InvariantCultureIgnoreCase))
{ {
if (url.Contains("HelpContents")) if (url.Contains("HelpContents"))
{ {
XenAdmin.Help.HelpManager.Launch(null); HelpManager.Launch(null);
} }
else if (url.Contains("AddServer")) else if (url.Contains("AddServer"))
{ {

View File

@ -2808,16 +2808,16 @@
<DependentUpon>XenWizardBase.cs</DependentUpon> <DependentUpon>XenWizardBase.cs</DependentUpon>
<SubType>Designer</SubType> <SubType>Designer</SubType>
</EmbeddedResource> </EmbeddedResource>
<None Include="..\Branding\HomePage.ja.mht"> <None Include="..\Branding\HomePage.html">
<Link>HomePage.ja.mht</Link> <Link>HomePage.html</Link>
<CopyToOutputDirectory>Always</CopyToOutputDirectory> <CopyToOutputDirectory>Always</CopyToOutputDirectory>
</None> </None>
<None Include="..\Branding\HomePage.mht"> <None Include="..\Branding\HomePage.ja.html">
<Link>HomePage.mht</Link> <Link>HomePage.ja.html</Link>
<CopyToOutputDirectory>Always</CopyToOutputDirectory> <CopyToOutputDirectory>Always</CopyToOutputDirectory>
</None> </None>
<None Include="..\Branding\HomePage.zh-CN.mht"> <None Include="..\Branding\HomePage.zh-CN.html">
<Link>HomePage.zh-CN.mht</Link> <Link>HomePage.zh-CN.html</Link>
<CopyToOutputDirectory>Always</CopyToOutputDirectory> <CopyToOutputDirectory>Always</CopyToOutputDirectory>
</None> </None>
<None Include="app.config"> <None Include="app.config">

View File

@ -106,7 +106,7 @@ namespace XenAdmin {
} }
/// <summary> /// <summary>
/// Looks up a localized string similar to HomePage.mht. /// Looks up a localized string similar to HomePage.html.
/// </summary> /// </summary>
public static string HOMEPAGE_FILENAME { public static string HOMEPAGE_FILENAME {
get { get {

View File

@ -133,7 +133,7 @@
<value>https://www.citrix.com/ja-jp/products/citrix-hypervisor</value> <value>https://www.citrix.com/ja-jp/products/citrix-hypervisor</value>
</data> </data>
<data name="HOMEPAGE_FILENAME" xml:space="preserve"> <data name="HOMEPAGE_FILENAME" xml:space="preserve">
<value>HomePage.ja.mht</value> <value>HomePage.ja.html</value>
</data> </data>
<data name="ISL_DEPRECATION_URL" xml:space="preserve"> <data name="ISL_DEPRECATION_URL" xml:space="preserve">
<value>http://support.citrix.com/article/CTX141433</value> <value>http://support.citrix.com/article/CTX141433</value>

View File

@ -133,7 +133,7 @@
<value>https://www.citrix.com/products/citrix-hypervisor</value> <value>https://www.citrix.com/products/citrix-hypervisor</value>
</data> </data>
<data name="HOMEPAGE_FILENAME" xml:space="preserve"> <data name="HOMEPAGE_FILENAME" xml:space="preserve">
<value>HomePage.mht</value> <value>HomePage.html</value>
</data> </data>
<data name="ISL_DEPRECATION_URL" xml:space="preserve"> <data name="ISL_DEPRECATION_URL" xml:space="preserve">
<value>http://support.citrix.com/article/CTX141433</value> <value>http://support.citrix.com/article/CTX141433</value>

View File

@ -133,7 +133,7 @@
<value>https://www.citrix.com.cn/products/citrix-hypervisor/</value> <value>https://www.citrix.com.cn/products/citrix-hypervisor/</value>
</data> </data>
<data name="HOMEPAGE_FILENAME" xml:space="preserve"> <data name="HOMEPAGE_FILENAME" xml:space="preserve">
<value>HomePage.zh-CN.mht</value> <value>HomePage.zh-CN.html</value>
</data> </data>
<data name="ISL_DEPRECATION_URL" xml:space="preserve"> <data name="ISL_DEPRECATION_URL" xml:space="preserve">
<value>http://support.citrix.com/article/CTX141433</value> <value>http://support.citrix.com/article/CTX141433</value>