Permalink
Browse files

Code cleanup of external tools.

  • Loading branch information...
1 parent 7e94c6f commit 9c089bed37876feebf2536d06a786fcede7a72d0 @rmcardle rmcardle committed Nov 18, 2013
@@ -234,7 +234,7 @@ Namespace App
Public Shared adimportPanel As New DockContent
Public Shared helpForm As UI.Window.Help
Public Shared helpPanel As New DockContent
- Public Shared externalappsForm As UI.Window.ExternalApps
+ Public Shared externalappsForm As UI.Window.ExternalTools
Public Shared externalappsPanel As New DockContent
Public Shared portscanForm As UI.Window.PortScan
Public Shared portscanPanel As New DockContent
@@ -294,7 +294,7 @@ Namespace App
helpForm.Show(frmMain.pnlDock)
Case UI.Window.Type.ExternalApps
If externalappsForm Is Nothing OrElse externalappsForm.IsDisposed Then
- externalappsForm = New UI.Window.ExternalApps(externalappsPanel)
+ externalappsForm = New UI.Window.ExternalTools(externalappsPanel)
externalappsPanel = externalappsForm
End If
@@ -1904,21 +1904,6 @@ Namespace App
#End Region
#Region "External Apps"
- Public Shared Sub GetExtApps()
- Array.Clear(Tools.ExternalToolsTypeConverter.ExternalTools, 0, Tools.ExternalToolsTypeConverter.ExternalTools.Length)
- Array.Resize(Tools.ExternalToolsTypeConverter.ExternalTools, ExternalTools.Count + 1)
-
- Dim i As Integer = 0
-
- For Each extA As Tools.ExternalTool In ExternalTools
- Tools.ExternalToolsTypeConverter.ExternalTools(i) = extA.DisplayName
-
- i += 1
- Next
-
- Tools.ExternalToolsTypeConverter.ExternalTools(i) = ""
- End Sub
-
Public Shared Function GetExtAppByName(ByVal Name As String) As Tools.ExternalTool
For Each extA As Tools.ExternalTool In ExternalTools
If extA.DisplayName = Name Then
@@ -484,7 +484,7 @@ Partial Class frmMain
'
'mMenViewExtAppsToolbar
'
- Me.mMenViewExtAppsToolbar.Image = Global.mRemoteNG.My.Resources.Resources.application_link
+ Me.mMenViewExtAppsToolbar.Image = Global.mRemoteNG.My.Resources.Resources.ExtApp
Me.mMenViewExtAppsToolbar.Name = "mMenViewExtAppsToolbar"
Me.mMenViewExtAppsToolbar.Size = New System.Drawing.Size(228, 22)
Me.mMenViewExtAppsToolbar.Text = "External Applications Toolbar"
@@ -526,7 +526,7 @@ Partial Class frmMain
'
'mMenToolsExternalApps
'
- Me.mMenToolsExternalApps.Image = Global.mRemoteNG.My.Resources.Resources.application_link
+ Me.mMenToolsExternalApps.Image = Global.mRemoteNG.My.Resources.Resources.ExtApp
Me.mMenToolsExternalApps.Name = "mMenToolsExternalApps"
Me.mMenToolsExternalApps.Size = New System.Drawing.Size(184, 22)
Me.mMenToolsExternalApps.Text = "External Applications"
@@ -64,7 +64,6 @@ Public Class frmMain
Tools.IeBrowserEmulation.Register()
Startup.GetConnectionIcons()
- GetExtApps()
Windows.treePanel.Focus()
Tree.Node.TreeView = Windows.treeForm.tvConnections
@@ -362,6 +362,15 @@ Namespace My
End Property
'''<summary>
+ ''' Looks up a localized string similar to &amp;Launch.
+ '''</summary>
+ Friend Shared ReadOnly Property strButtonLaunch() As String
+ Get
+ Return ResourceManager.GetString("strButtonLaunch", resourceCulture)
+ End Get
+ End Property
+
+ '''<summary>
''' Looks up a localized string similar to Launch PuTTY.
'''</summary>
Friend Shared ReadOnly Property strButtonLaunchPutty() As String
@@ -1690,6 +1699,15 @@ Namespace My
End Property
'''<summary>
+ ''' Looks up a localized string similar to New External Tool.
+ '''</summary>
+ Friend Shared ReadOnly Property strExternalToolDefaultName() As String
+ Get
+ Return ResourceManager.GetString("strExternalToolDefaultName", resourceCulture)
+ End Get
+ End Property
+
+ '''<summary>
''' Looks up a localized string similar to Includes icons by [FAMFAMFAM].
'''</summary>
Friend Shared ReadOnly Property strFAMFAMFAMAttribution() As String
@@ -216,6 +216,9 @@
<data name="strButtonInheritance" xml:space="preserve">
<value>Inheritance</value>
</data>
+ <data name="strButtonLaunch" xml:space="preserve">
+ <value>&amp;Launch</value>
+ </data>
<data name="strButtonLaunchPutty" xml:space="preserve">
<value>Launch PuTTY</value>
</data>
@@ -675,6 +678,9 @@ See the Microsoft Support article at http://support.microsoft.com/kb/811833 for
<data name="strExtApp" xml:space="preserve">
<value>Ext. App</value>
</data>
+ <data name="strExternalToolDefaultName" xml:space="preserve">
+ <value>New External Tool</value>
+ </data>
<data name="strFAMFAMFAMAttribution" xml:space="preserve">
<value>Includes icons by [FAMFAMFAM]</value>
</data>
@@ -88,13 +88,6 @@ Namespace My.Resources
End Get
End Property
- Friend ReadOnly Property application_link() As System.Drawing.Bitmap
- Get
- Dim obj As Object = ResourceManager.GetObject("application_link", resourceCulture)
- Return CType(obj,System.Drawing.Bitmap)
- End Get
- End Property
-
Friend ReadOnly Property application_side_tree() As System.Drawing.Bitmap
Get
Dim obj As Object = ResourceManager.GetObject("application_side_tree", resourceCulture)
@@ -451,9 +451,6 @@
<data name="key_delete" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>..\Resources\Images_FamFamFam\key_delete.png;System.Drawing.Bitmap, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
</data>
- <data name="application_link" type="System.Resources.ResXFileRef, System.Windows.Forms">
- <value>..\Resources\Images_FamFamFam\application_link.png;System.Drawing.Bitmap, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
- </data>
<data name="application_side_tree" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>..\Resources\Images_FamFamFam\application_side_tree.png;System.Drawing.Bitmap, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
</data>
@@ -478,7 +475,6 @@
<data name="page_copy" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>..\resources\images_famfamfam\page_copy.png;System.Drawing.Bitmap, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
</data>
- <assembly alias="System.Windows.Forms" name="System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" />
<data name="RDCMan_Icon" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>..\resources\icons\rdcman_icon.ico;System.Drawing.Icon, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
</data>
Deleted file not rendered
@@ -280,7 +280,20 @@ Namespace Tools
Public Class ExternalToolsTypeConverter
Inherits StringConverter
- Public Shared ExternalTools As String() = New String() {}
+ Public Shared ReadOnly Property ExternalTools As String()
+ Get
+ Dim externalToolList As New List(Of String)
+
+ ' Add a blank entry to signify that no external tool is selected
+ externalToolList.Add(String.Empty)
+
+ For Each externalTool As ExternalTool In App.Runtime.ExternalTools
+ externalToolList.Add(externalTool.DisplayName)
+ Next
+
+ Return externalToolList.ToArray()
+ End Get
+ End Property
Public Overloads Overrides Function GetStandardValues(ByVal context As System.ComponentModel.ITypeDescriptorContext) As System.ComponentModel.TypeConverter.StandardValuesCollection
Return New StandardValuesCollection(ExternalTools)
@@ -735,7 +735,7 @@ Namespace UI
cmenTabExternalApps.DropDownItems.Clear()
'add ext apps
- For Each extA As Tools.ExternalTool In ExternalTools
+ For Each extA As Tools.ExternalTool In Runtime.ExternalTools
Dim nItem As New ToolStripMenuItem
nItem.Text = extA.DisplayName
nItem.Tag = extA
Oops, something went wrong.

0 comments on commit 9c089be

Please sign in to comment.