Merge pull request #702 from MihaelaStoica/CA-179515

CA-179515: Move to online help
This commit is contained in:
Stephen Turner 2015-10-20 16:52:52 +01:00
commit 79c59fa5fa
14 changed files with 1266 additions and 1036 deletions

View File

@ -28,8 +28,8 @@
# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
# SUCH DAMAGE.
--- XenCenter.wxs 2013-07-02 12:29:32.138358700 +0100
+++ XenCenter.l10n.wxs 2013-07-02 12:31:36.023746000 +0100
--- XenCenter.wxs Fri Oct 9 13:15:27 2015
+++ XenCenter.l10n.wxs Fri Oct 9 13:15:56 2015
@@ -38,7 +38,7 @@
<?define UpgradeCode="{EA0EF50F-5CC6-452B-B09F-3F5EC564899D}"?>
<?define ProductCode="{65AE1345-A520-456D-8A19-2F52D43D3A09}"?>
@ -39,7 +39,7 @@
<Media Id="1" Cabinet="XenCenter.cab" EmbedCab="yes" />
<Directory Id="TARGETDIR" Name="SourceDir">
<Directory Id="ProgramFilesFolder">
@@ -88,64 +88,64 @@
@@ -93,64 +93,64 @@
<File Id="XslicIcon" Source="..\XenAdmin\Images\file_license.ico" />
<File Id="XkbIcon" Source="..\XenAdmin\Images\file_backup.ico" />
<File Id="XsupdateIcon" Source="..\XenAdmin\Images\file_updates.ico" />
@ -127,16 +127,10 @@
</Extension>
</ProgId>
</Component>
@@ -164,6 +164,30 @@
<Component Id="HelpFiles" Guid="EA8D4F56-A94A-467c-9E6B-F3DC26F95B1E">
<File Id="XenCenterCHM" Source="..\XenAdmin\bin\Release\Help\XenCenter.chm" />
<File Id="WLBCHM" Source="..\XenAdmin\bin\Release\Help\WLB.chm" />
+ <File Id="XenCenterJaCHM" Source="..\XenAdmin\bin\Release\Help\XenCenter.ja.chm" />
+ <File Id="WLBJaCHM" Source="..\XenAdmin\bin\Release\Help\WLB.ja.chm" />
+ <File Id="XenCenterScCHM" Source="..\XenAdmin\bin\Release\Help\XenCenter.zh-CN.chm" />
+ <File Id="WLBScCHM" Source="..\XenAdmin\bin\Release\Help\WLB.zh-CN.chm" />
+ </Component>
+ </Directory>
@@ -165,6 +165,26 @@
<File Id="interes3.xml" Source="..\XenAdmin\bin\Release\TestResources\interesting-xenapp.xml" />
</Component>
</Directory>
+ <Directory Id="ja" Name="ja">
+ <Component Id="JaResources" Guid="D3ADD803-AF0B-4787-AC29-C6387FFF403B">
+ <File Id="JaResourcesDLL" Source="..\XenAdmin\bin\Release\ja\XenCenterMain.resources.dll" />
@ -155,19 +149,21 @@
+ <File Id="ScMicRepVwrPrcObjResDLL" Source="..\XenAdmin\ReportViewer\Microsoft.ReportViewer.WinForms.resources.dll" />
+ <File Id="ScXOResourcesDLL" Source="..\XenOvfApi\bin\Release\zh-CN\XenOvf.resources.dll" />
+ <File Id="ScXOTResourcesDLL" Source="..\XenOvfTransport\bin\Release\zh-CN\XenOvfTransport.resources.dll" />
</Component>
</Directory>
+ </Component>
+ </Directory>
<Directory Id="EXTERNALTOOLS" ShortName="External" Name="External Tools">
@@ -247,6 +271,8 @@
<Feature Id="MainProgram" Title="Citrix XenCenter" Description="The complete package" Display="expand" Level="1" ConfigurableDirectory="INSTALLDIR" AllowAdvertise="no" InstallDefault="local" Absent="disallow">
<Component Id="ExternalToolsComponent" Guid="D5FC0252-C97B-46e7-9633-A6B68EDB6654">
<File Id="XENSERVERLINUXFIXUP" Source="..\XenOvfApi\External Tools\xenserver-linuxfixup-disk.iso" />
@@ -245,6 +265,8 @@
<Feature Id="MainProgram" Title="Citrix XenCenter" Description="Citrix XenCenter" Display="expand" Level="1" ConfigurableDirectory="INSTALLDIR" AllowAdvertise="no" InstallDefault="local" Absent="disallow" >
<ComponentRef Id="MainExecutable" />
<ComponentRef Id="HelpFiles" />
+ <ComponentRef Id="JaResources" />
+ <ComponentRef Id="ScResources" />
<ComponentRef Id="ReportViewer" />
<ComponentRef Id="TestResources" />
<ComponentRef Id="SchemasFilesComponent" />
@@ -262,7 +288,7 @@
@@ -264,7 +286,7 @@
<Property Id="ARPPRODUCTICON" Value="XenCenterICO" />
<MajorUpgrade AllowDowngrades="no" AllowSameVersionUpgrades="yes" DowngradeErrorMessage="!(loc.ErrorNewerProduct)" Schedule="afterInstallInitialize"/>
<PropertyRef Id="NETFRAMEWORK45" />

View File

@ -165,12 +165,6 @@
<File Id="interes3.xml" Source="..\XenAdmin\bin\Release\TestResources\interesting-xenapp.xml" />
</Component>
</Directory>
<Directory Id="Help" Name="Help">
<Component Id="HelpFiles" Guid="EA8D4F56-A94A-467c-9E6B-F3DC26F95B1E">
<File Id="XenCenterCHM" Source="..\XenAdmin\bin\Release\Help\XenCenter.chm" />
<File Id="WLBCHM" Source="..\XenAdmin\bin\Release\Help\WLB.chm" />
</Component>
</Directory>
<Directory Id="EXTERNALTOOLS" ShortName="External" Name="External Tools">
<Component Id="ExternalToolsComponent" Guid="D5FC0252-C97B-46e7-9633-A6B68EDB6654">
<File Id="XENSERVERLINUXFIXUP" Source="..\XenOvfApi\External Tools\xenserver-linuxfixup-disk.iso" />
@ -251,7 +245,6 @@
<Feature Id="MainProgram" Title="Citrix XenCenter" Description="Citrix XenCenter" Display="expand" Level="1" ConfigurableDirectory="INSTALLDIR" AllowAdvertise="no" InstallDefault="local" Absent="disallow" >
<ComponentRef Id="MainExecutable" />
<ComponentRef Id="HelpFiles" />
<ComponentRef Id="ReportViewer" />
<ComponentRef Id="TestResources" />
<ComponentRef Id="SchemasFilesComponent" />

View File

@ -53,9 +53,7 @@ namespace XenAdmin.Help
internal static string GetID(string pageref)
{
int id;
string s = resources.GetString(pageref);
return s != null && int.TryParse(s, out id) ? s : null;
return resources.GetString(pageref);
}
public static void Launch(string pageref)

File diff suppressed because it is too large Load Diff

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

View File

@ -2409,26 +2409,10 @@ namespace XenAdmin
public void ShowHelpTopic(string topicID)
{
// Abandon all hope, ye who enter here: if you're ever tempted to directly invoke hh.exe, see first:
// JAXC-43: Online help doesn't work if install XenCenter into the path that contains special characters.
// hh.exe can't seem to cope with certain multi-byte characters in the path to the chm.
// System.Windows.Forms.Help.ShowHelp() can cope with the special characters in the path, but has the
// irritating behaviour that the launched help is always on top of the app window (CA-8863).
// So we show the help 'on top' of an invisible dummy Form.
using (var helpForm = new Form())
{
string chm = Path.Combine(Program.AssemblyDir, InvisibleMessages.MAINWINDOW_HELP_PATH);
if (topicID == null)
{
// Show TOC
System.Windows.Forms.Help.ShowHelp(helpForm, chm, HelpNavigator.TableOfContents);
}
else
{
System.Windows.Forms.Help.ShowHelp(helpForm, chm, HelpNavigator.TopicId, topicID);
}
}
string helpTopicURL = string.Format(InvisibleMessages.HELP_URL, topicID ?? Help.HelpManager.GetID("TableOfContents"));
if (!string.IsNullOrEmpty(helpTopicURL))
Program.OpenURL(helpTopicURL);
}
public void MainWindow_HelpRequested(object sender, HelpEventArgs hlpevent)

View File

@ -2440,12 +2440,6 @@
<Compile Include="Commands\DestroyHostCommand.cs" />
<Compile Include="Commands\MigrateVirtualDiskCommand.cs" />
<Compile Include="Commands\UpdateVIFCommand.cs" />
<Content Include="Help\XenCenter.chm">
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
</Content>
<Content Include="Help\XenCenter.ja.chm">
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
</Content>
<Compile Include="Actions\OVFActions\ApplianceAction.cs" />
<Compile Include="Actions\OVFActions\ExportApplianceAction.cs" />
<Compile Include="Actions\GUIActions\GeneralEditPageAction.cs" />
@ -4009,18 +4003,6 @@
</Compile>
<Compile Include="XenSearch\CustomFieldWrapper.cs" />
<Compile Include="XenSearch\TreeSearch.cs" />
<Content Include="Help\XenCenter.zh-CN.chm">
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
</Content>
<None Include="Help\WLB.zh-CN.chm">
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
</None>
<None Include="Help\WLB.chm">
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
</None>
<None Include="Help\WLB.ja.chm">
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
</None>
<None Include="Images\attach_virtualstorage_32.png" />
<None Include="Images\backup_restore_32.png" />
<None Include="Images\copy_16.png" />

View File

@ -114,6 +114,15 @@ namespace XenAdmin {
}
}
/// <summary>
/// Looks up a localized string similar to http://docs.citrix.com/en-us/urls/{0}.html.
/// </summary>
public static string HELP_URL {
get {
return ResourceManager.GetString("HELP_URL", resourceCulture);
}
}
/// <summary>
/// Looks up a localized string similar to http://www.citrix.com/xenserver.
/// </summary>
@ -168,24 +177,6 @@ namespace XenAdmin {
}
}
/// <summary>
/// Looks up a localized string similar to -mapid {0} {1}.
/// </summary>
public static string MAINWINDOW_HELP_PARAMS {
get {
return ResourceManager.GetString("MAINWINDOW_HELP_PARAMS", resourceCulture);
}
}
/// <summary>
/// Looks up a localized string similar to Help\XenCenter.chm.
/// </summary>
public static string MAINWINDOW_HELP_PATH {
get {
return ResourceManager.GetString("MAINWINDOW_HELP_PATH", resourceCulture);
}
}
/// <summary>
/// Looks up a localized string similar to Home.htm.
/// </summary>

View File

@ -135,6 +135,9 @@
<data name="HEALTH_CHECK_PRIVACY_STATEMENT_URL" xml:space="preserve">
<value>https://cis.citrix.com/legal/</value>
</data>
<data name="HELP_URL" xml:space="preserve">
<value>http://docs.citrix.com/en-us/urls/{0}.html</value>
</data>
<data name="HOMEPAGE" xml:space="preserve">
<value>http://www.citrix.com/xenserver</value>
</data>
@ -153,12 +156,6 @@
<data name="LOCALE" xml:space="preserve">
<value>en-US</value>
</data>
<data name="MAINWINDOW_HELP_PARAMS" xml:space="preserve">
<value>-mapid {0} {1}</value>
</data>
<data name="MAINWINDOW_HELP_PATH" xml:space="preserve">
<value>Help\XenCenter.chm</value>
</data>
<data name="MAINWINDOW_HOME_PATH" xml:space="preserve">
<value>Home.htm</value>
</data>