diff options
-rw-r--r-- | mRemoteV1/Forms/frmMain.vb | 59 | ||||
-rw-r--r-- | mRemoteV1/Language/Language.EN.vb | 1 | ||||
-rw-r--r-- | mRemoteV1/My Project/Resources.Designer.vb | 18 | ||||
-rw-r--r-- | mRemoteV1/My Project/Resources.resx | 6 | ||||
-rw-r--r-- | mRemoteV1/My Project/Settings.Designer.vb | 2 | ||||
-rw-r--r-- | mRemoteV1/My Project/Settings.settings | 2 | ||||
-rw-r--r-- | mRemoteV1/References/PSTaskDialog.dll | bin | 0 -> 57344 bytes | |||
-rw-r--r-- | mRemoteV1/app.config | 2 | ||||
-rw-r--r-- | mRemoteV1/mRemoteV1.vbproj | 4 |
9 files changed, 63 insertions, 31 deletions
diff --git a/mRemoteV1/Forms/frmMain.vb b/mRemoteV1/Forms/frmMain.vb index fe7e0d0d..a845120a 100644 --- a/mRemoteV1/Forms/frmMain.vb +++ b/mRemoteV1/Forms/frmMain.vb @@ -2,6 +2,7 @@ Imports mRemote.App.Runtime Imports System.Reflection Imports Crownwood Imports mRemote.App.Native +Imports PSTaskDialog Public Class frmMain Public prevWindowsState As FormWindowState @@ -106,7 +107,11 @@ Public Class frmMain Private Sub frmMain_FormClosing(ByVal sender As Object, ByVal e As System.Windows.Forms.FormClosingEventArgs) Handles Me.FormClosing If My.Settings.ConfirmExit And wL.Count > 0 Then - If MsgBox(Language.Base.UnclosedConnectionPanels, MsgBoxStyle.YesNo Or MsgBoxStyle.Question) = MsgBoxResult.No Then + Dim Result As DialogResult = cTaskDialog.MessageBox(Me, My.Application.Info.AssemblyName, My.Resources.strConfirmExitMainInstruction, "", "", "", My.Resources.strDoNotShowThisMessageAgain, eTaskDialogButtons.YesNo, eSysIcons.Question, Nothing) + If cTaskDialog.VerificationChecked Then + My.Settings.ConfirmExit = False + End If + If Result = DialogResult.No Then e.Cancel = True Exit Sub End If @@ -122,6 +127,7 @@ Public Class frmMain End Sub #End Region +#Region "Timer" Private tmrRuns As Integer = 0 Private Sub tmrShowUpdate_Tick(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles tmrShowUpdate.Tick If tmrRuns = 5 Then @@ -145,7 +151,7 @@ Public Class frmMain mC.AddMessage(Messages.MessageClass.InformationMsg, "Doing AutoSave", True) App.Runtime.SaveConnections() End Sub - +#End Region #Region "Ext Apps Toolbar" Private Sub cMenToolbarShowText_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles cMenToolbarShowText.Click @@ -558,6 +564,7 @@ Public Class frmMain End Sub #End Region +#Region "Window Overrides and DockPanel Stuff" Private Sub frmMain_Resize(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Resize If Me.WindowState = FormWindowState.Minimized Then If My.Settings.MinimizeToTray Then @@ -571,7 +578,6 @@ Public Class frmMain End If End Sub -#Region "Window Overrides and DockPanel Stuff" Private bWmGetTextFlag As Boolean = False Private bWmWindowPosChangedFlag As Boolean = False @@ -579,32 +585,31 @@ Public Class frmMain Try 'Debug.Print(m.Msg) - If m.Msg = WM_GETTEXT Then - bWmGetTextFlag = True - ElseIf m.Msg = WM_WINDOWPOSCHANGED Then - If bWmGetTextFlag Then - ActivateConnection() - End If - - bWmGetTextFlag = False - bWmWindowPosChangedFlag = True - ElseIf m.Msg = WM_ACTIVATEAPP Then - If bWmWindowPosChangedFlag Then - ActivateConnection() - End If - Else - bWmGetTextFlag = False - bWmWindowPosChangedFlag = False - End If + Select m.Msg + Case WM_GETTEXT + bWmGetTextFlag = True + Case WM_WINDOWPOSCHANGED + If bWmGetTextFlag Then + ActivateConnection() + End If - If m.Msg = Tools.SystemMenu.Flags.WM_SYSCOMMAND Then - For i As Integer = 0 To SysMenSubItems.Length - 1 - If SysMenSubItems(i) = m.WParam Then - Screens.SendFormToScreen(Screen.AllScreens(i)) - Exit For + bWmGetTextFlag = False + bWmWindowPosChangedFlag = True + Case WM_ACTIVATEAPP + If bWmWindowPosChangedFlag Then + ActivateConnection() End If - Next - End If + Case WM_SYSCOMMAND + For i As Integer = 0 To SysMenSubItems.Length - 1 + If SysMenSubItems(i) = m.WParam Then + Screens.SendFormToScreen(Screen.AllScreens(i)) + Exit For + End If + Next + Case Else + bWmGetTextFlag = False + bWmWindowPosChangedFlag = False + End Select Catch ex As Exception End Try diff --git a/mRemoteV1/Language/Language.EN.vb b/mRemoteV1/Language/Language.EN.vb index 21e1bc5d..8c914c9b 100644 --- a/mRemoteV1/Language/Language.EN.vb +++ b/mRemoteV1/Language/Language.EN.vb @@ -340,7 +340,6 @@ Public Const SendTo As String = "Send to..." Public Const Screen As String = "Screen" - Public Const UnclosedConnectionPanels As String = "There are unclosed connection panels, are you sure you want to quit?" Public Const SaveConnectionsFileBeforeOpeningAnother As String = "Do you want to save the current connections file before loading another?" Public Const NewPanel As String = "New Panel" Public Const PanelName As String = "Panel name" diff --git a/mRemoteV1/My Project/Resources.Designer.vb b/mRemoteV1/My Project/Resources.Designer.vb index 9b8b8f74..adcbae33 100644 --- a/mRemoteV1/My Project/Resources.Designer.vb +++ b/mRemoteV1/My Project/Resources.Designer.vb @@ -772,6 +772,15 @@ Namespace My.Resources End Property '''<summary> + ''' Looks up a localized string similar to Do you want to close all open connections?. + '''</summary> + Friend ReadOnly Property strConfirmExitMainInstruction() As String + Get + Return ResourceManager.GetString("strConfirmExitMainInstruction", resourceCulture) + End Get + End Property + + '''<summary> ''' Looks up a localized string similar to Are you sure you want to reset the panels to their default layout?. '''</summary> Friend ReadOnly Property strConfirmResetLayout() As String @@ -781,6 +790,15 @@ Namespace My.Resources End Property '''<summary> + ''' Looks up a localized string similar to Do not show this message again.. + '''</summary> + Friend ReadOnly Property strDoNotShowThisMessageAgain() As String + Get + Return ResourceManager.GetString("strDoNotShowThisMessageAgain", resourceCulture) + End Get + End Property + + '''<summary> ''' Looks up a localized string similar to Includes icons by [FAMFAMFAM]. '''</summary> Friend ReadOnly Property strFAMFAMFAMAttribution() As String diff --git a/mRemoteV1/My Project/Resources.resx b/mRemoteV1/My Project/Resources.resx index 81bc92c1..111bfc7c 100644 --- a/mRemoteV1/My Project/Resources.resx +++ b/mRemoteV1/My Project/Resources.resx @@ -481,4 +481,10 @@ <data name="strConfirmResetLayout" xml:space="preserve"> <value>Are you sure you want to reset the panels to their default layout?</value> </data> + <data name="strConfirmExitMainInstruction" xml:space="preserve"> + <value>Do you want to close all open connections?</value> + </data> + <data name="strDoNotShowThisMessageAgain" xml:space="preserve"> + <value>Do not show this message again.</value> + </data> </root>
\ No newline at end of file diff --git a/mRemoteV1/My Project/Settings.Designer.vb b/mRemoteV1/My Project/Settings.Designer.vb index debc231c..c5270566 100644 --- a/mRemoteV1/My Project/Settings.Designer.vb +++ b/mRemoteV1/My Project/Settings.Designer.vb @@ -239,7 +239,7 @@ Namespace My <Global.System.Configuration.UserScopedSettingAttribute(), _ Global.System.Configuration.SettingsProviderAttribute(GetType(mRemote.Config.Settings.Providers.ChooseProvider)), _ Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _ - Global.System.Configuration.DefaultSettingValueAttribute("False")> _ + Global.System.Configuration.DefaultSettingValueAttribute("True")> _ Public Property ConfirmExit() As Boolean Get Return CType(Me("ConfirmExit"),Boolean) diff --git a/mRemoteV1/My Project/Settings.settings b/mRemoteV1/My Project/Settings.settings index 5edeb663..1a14f8d9 100644 --- a/mRemoteV1/My Project/Settings.settings +++ b/mRemoteV1/My Project/Settings.settings @@ -45,7 +45,7 @@ <Value Profile="(Default)">True</Value> </Setting> <Setting Name="ConfirmExit" Provider="mRemote.Config.Settings.Providers.ChooseProvider" Type="System.Boolean" Scope="User"> - <Value Profile="(Default)">False</Value> + <Value Profile="(Default)">True</Value> </Setting> <Setting Name="CheckForUpdatesOnStartup" Provider="mRemote.Config.Settings.Providers.ChooseProvider" Type="System.Boolean" Scope="User"> <Value Profile="(Default)">True</Value> diff --git a/mRemoteV1/References/PSTaskDialog.dll b/mRemoteV1/References/PSTaskDialog.dll Binary files differnew file mode 100644 index 00000000..7d74bce3 --- /dev/null +++ b/mRemoteV1/References/PSTaskDialog.dll diff --git a/mRemoteV1/app.config b/mRemoteV1/app.config index 15a126cb..9ac62441 100644 --- a/mRemoteV1/app.config +++ b/mRemoteV1/app.config @@ -103,7 +103,7 @@ <value>True</value> </setting> <setting name="ConfirmExit" serializeAs="String"> - <value>False</value> + <value>True</value> </setting> <setting name="CheckForUpdatesOnStartup" serializeAs="String"> <value>True</value> diff --git a/mRemoteV1/mRemoteV1.vbproj b/mRemoteV1/mRemoteV1.vbproj index 39efbb5c..72c09bcb 100644 --- a/mRemoteV1/mRemoteV1.vbproj +++ b/mRemoteV1/mRemoteV1.vbproj @@ -125,6 +125,10 @@ <SpecificVersion>False</SpecificVersion> <HintPath>References\Org.Mentalis.Security.dll</HintPath> </Reference> + <Reference Include="PSTaskDialog, Version=1.0.0.0, Culture=neutral, processorArchitecture=MSIL"> + <SpecificVersion>False</SpecificVersion> + <HintPath>References\PSTaskDialog.dll</HintPath> + </Reference> <Reference Include="Skybound.Gecko, Version=1.8.1.4, Culture=neutral, PublicKeyToken=3209ac31600d1857, processorArchitecture=x86"> <SpecificVersion>False</SpecificVersion> <HintPath>References\Skybound.Gecko.dll</HintPath> |