|
|
@ -60,17 +60,26 @@ public class TutorialAction extends UpdateAction { |
|
|
|
*/ |
|
|
|
*/ |
|
|
|
public void actionPerformed(ActionEvent evt) { |
|
|
|
public void actionPerformed(ActionEvent evt) { |
|
|
|
Locale locale = FRContext.getLocale(); |
|
|
|
Locale locale = FRContext.getLocale(); |
|
|
|
if (ComparatorUtils.equals(locale, Locale.CHINA) || ComparatorUtils.equals(locale, Locale.TAIWAN)){ |
|
|
|
String helpKey = ""; |
|
|
|
HttpClient client = new HttpClient(SiteCenter.getInstance().acquireUrlByKind("help")); |
|
|
|
|
|
|
|
|
|
|
|
if (ComparatorUtils.equals(locale, Locale.CHINA) || ComparatorUtils.equals(locale, Locale.TAIWAN)) { |
|
|
|
|
|
|
|
helpKey = "help"; |
|
|
|
|
|
|
|
} else if (ComparatorUtils.equals(locale, Locale.US)) { |
|
|
|
|
|
|
|
helpKey = "help.en"; |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if (!helpKey.isEmpty()) { |
|
|
|
|
|
|
|
HttpClient client = new HttpClient(SiteCenter.getInstance().acquireUrlByKind(helpKey)); |
|
|
|
if(client.getResponseCode() != -1) { |
|
|
|
if(client.getResponseCode() != -1) { |
|
|
|
try { |
|
|
|
try { |
|
|
|
Desktop.getDesktop().browse(new URI(SiteCenter.getInstance().acquireUrlByKind("help"))); |
|
|
|
Desktop.getDesktop().browse(new URI(SiteCenter.getInstance().acquireUrlByKind(helpKey))); |
|
|
|
return; |
|
|
|
return; |
|
|
|
} catch (Exception e) { |
|
|
|
} catch (Exception e) { |
|
|
|
//出了异常的话, 依然打开本地教程
|
|
|
|
//出了异常的话, 依然打开本地教程
|
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
if (OperatingSystem.isMacOS()) { |
|
|
|
if (OperatingSystem.isMacOS()) { |
|
|
|
nativeExcuteMacInstallHomePrograms("helptutorial.app"); |
|
|
|
nativeExcuteMacInstallHomePrograms("helptutorial.app"); |
|
|
|
} |
|
|
|
} |
|
|
|