diff --git a/Guide/GuideV.xaml.vb b/Guide/GuideV.xaml.vb index bd5a9bc..b1e840c 100644 --- a/Guide/GuideV.xaml.vb +++ b/Guide/GuideV.xaml.vb @@ -1,4 +1,6 @@ -Public Class GuideV +Imports EgtUILib + +Public Class GuideV Private m_GuideVM As GuideVM Public Shared m_Language As String @@ -16,8 +18,29 @@ ' Prova della lettura di un file chm (Help) 'System.Windows.Forms.Help.ShowHelp(Nothing, "c:\EgtData\EgtDOORCreator\Help\Prova\HelpNDoc tutorial.chm") Dim sHelpDir As String = String.Empty - If OptionModule.m_SmartHelp Then sHelpDir = IniFile.m_sHelpDir Else sHelpDir = IniFile.m_sHelpDir.Replace("C:", "file://127.0.0.1/c$") - DoorBrowser.Navigate(New Uri(sHelpDir & "\" & m_Language & "\" & GuideVM.m_AddressGuide & ".html")) + If OptionModule.m_SmartHelp = HelpPage.LocalHost Then + sHelpDir = IniFile.m_sHelpDir.Replace("C:", "file://127.0.0.1/c$") + DoorBrowser.Navigate(New Uri(sHelpDir & "\" & m_Language & "\" & GuideVM.m_AddressGuide & ".html")) + ElseIf OptionModule.m_SmartHelp = HelpPage.WebBrowserVB Then + sHelpDir = IniFile.m_sHelpDir + DoorBrowser.Navigate(New Uri(sHelpDir & "\" & m_Language & "\" & GuideVM.m_AddressGuide & ".html")) + Else + sHelpDir = IniFile.m_sHelpDir + Try + Process.Start(sHelpDir & "\" & m_Language & "\" & GuideVM.m_AddressGuide & ".html") + Catch ex As Exception + EgtOutLog("Errore nel caricamento pagina Help") + End Try + End If + + 'If OptionModule.m_SmartHelp Then sHelpDir = IniFile.m_sHelpDir Else sHelpDir = IniFile.m_sHelpDir.Replace("C:", "file://127.0.0.1/c$") + '' DoorBrowser.Navigate(New Uri(sHelpDir & "\" & m_Language & "\" & GuideVM.m_AddressGuide & ".html")) + 'Try + ' Process.Start(sHelpDir & "\" & m_Language & "\" & GuideVM.m_AddressGuide & ".html") + 'Catch ex As Exception + ' EgtOutLog("Errore nel caricamento pagina Help") + 'End Try + End Sub End Class diff --git a/My Project/AssemblyInfo.vb b/My Project/AssemblyInfo.vb index 432f9b8..2020ece 100644 --- a/My Project/AssemblyInfo.vb +++ b/My Project/AssemblyInfo.vb @@ -72,5 +72,5 @@ Imports System.Windows ' by using the '*' as shown below: ' - - + + diff --git a/OptionsWindow/OptionModule.vb b/OptionsWindow/OptionModule.vb index 432c2f4..dd52e13 100644 --- a/OptionsWindow/OptionModule.vb +++ b/OptionsWindow/OptionModule.vb @@ -42,7 +42,14 @@ Friend Module OptionModule Assembly = 1 End Enum - Friend m_SmartHelp As Boolean = False + Friend m_SmartHelp As HelpPage = HelpPage.WebBrowserVB + + Friend Enum HelpPage + LocalHost + WebBrowserVB + WebBrowserPC + End Enum + Friend m_DisableHM As Boolean = False Friend m_DisableDeleteCommandHM As Boolean = False @@ -211,7 +218,18 @@ Friend Module OptionModule EgtOutLog(String.Format(EgtMsg(50180), sMachinDir)) End If - m_SmartHelp = (GetMainPrivateProfileInt(S_GENERAL, K_SMARTHELP, 1) = 0) + Dim nHelpSelct As Integer = 0 + Select Case GetMainPrivateProfileInt(S_GENERAL, K_SMARTHELP, 1) + Case 0 + m_SmartHelp = HelpPage.WebBrowserVB + Case 1 + m_SmartHelp = HelpPage.LocalHost + Case 2 + m_SmartHelp = HelpPage.WebBrowserPC + Case Else + m_SmartHelp = HelpPage.WebBrowserVB + End Select + m_DisableHM = (GetMainPrivateProfileInt(S_GENERAL, K_DISABLEHM, 1) = 0) @@ -632,7 +650,7 @@ Friend Module OptionModule Else SwingDDF = Trim(SwingDDF) SwingDDF = SwingDDF.Substring(0, 2) - End If + End If Exit For End If Next diff --git a/ProjectManager/ProjectManagerVM.vb b/ProjectManager/ProjectManagerVM.vb index 9121c7e..a9fdf38 100644 --- a/ProjectManager/ProjectManagerVM.vb +++ b/ProjectManager/ProjectManagerVM.vb @@ -618,7 +618,7 @@ Public Class ProjectManagerVM Public Sub Guide() Dim GuideWindow As New GuideV(Application.Current.MainWindow, New GuideVM) - GuideWindow.Show() + If Not OptionModule.m_SmartHelp = HelpPage.WebBrowserPC Then GuideWindow.Show() End Sub #End Region ' Guide