diff --git a/mRemoteV1/App/Logger.cs b/mRemoteV1/App/Logger.cs
index cc16d7949..f97f3c925 100644
--- a/mRemoteV1/App/Logger.cs
+++ b/mRemoteV1/App/Logger.cs
@@ -2,7 +2,11 @@
using log4net.Appender;
using log4net.Config;
using log4net.Repository;
+#if !PORTABLE
+using System;
+#endif
using System.IO;
+using System.Windows.Forms;
namespace mRemoteNG.App
{
@@ -47,12 +51,12 @@ namespace mRemoteNG.App
private static string BuildLogFilePath()
{
string logFilePath = "";
- #if !PORTABLE
- logFilePath = Path.Combine(System.Environment.GetFolderPath(System.Environment.SpecialFolder.LocalApplicationData), System.Windows.Forms.Application.ProductName);
- #else
- logFilePath = System.Windows.Forms.Application.StartupPath;
- #endif
- string logFileName = Path.ChangeExtension(System.Windows.Forms.Application.ProductName, ".log");
+#if !PORTABLE
+ logFilePath = Path.Combine(Environment.GetFolderPath(Environment.SpecialFolder.ApplicationData), Application.ProductName);
+#else
+ logFilePath = Application.StartupPath;
+#endif
+ string logFileName = Path.ChangeExtension(Application.ProductName, ".log");
string logFile = Path.Combine(logFilePath, logFileName);
return logFile;
}
diff --git a/mRemoteV1/Connection/Protocol/RDP/Connection.Protocol.RDP.cs b/mRemoteV1/Connection/Protocol/RDP/Connection.Protocol.RDP.cs
index d5974f0ab..251cd9d67 100644
--- a/mRemoteV1/Connection/Protocol/RDP/Connection.Protocol.RDP.cs
+++ b/mRemoteV1/Connection/Protocol/RDP/Connection.Protocol.RDP.cs
@@ -9,7 +9,6 @@ using System.Threading;
using System.ComponentModel;
using mRemoteNG.Messages;
using mRemoteNG.App;
-using mRemoteNG.My;
using MSTSCLib;
using mRemoteNG.Tools;
using mRemoteNG.UI.Forms;
@@ -133,7 +132,7 @@ namespace mRemoteNG.Connection.Protocol.RDP
//not user changeable
_rdpClient.AdvancedSettings2.GrabFocusOnConnect = true;
_rdpClient.AdvancedSettings3.EnableAutoReconnect = true;
- _rdpClient.AdvancedSettings3.MaxReconnectAttempts = Convert.ToInt32(mRemoteNG.Settings.Default.RdpReconnectionCount);
+ _rdpClient.AdvancedSettings3.MaxReconnectAttempts = Convert.ToInt32(Settings.Default.RdpReconnectionCount);
_rdpClient.AdvancedSettings2.keepAliveInterval = 60000; //in milliseconds (10.000 = 10 seconds)
_rdpClient.AdvancedSettings5.AuthenticationLevel = 0;
_rdpClient.AdvancedSettings2.EncryptionEnabled = 1;
@@ -199,7 +198,7 @@ namespace mRemoteNG.Connection.Protocol.RDP
catch (Exception ex)
{
Runtime.MessageCollector.AddMessage(MessageClass.ErrorMsg, Language.strRdpDisconnectFailed + Environment.NewLine + ex.Message, true);
- base.Close();
+ Close();
}
}
@@ -309,16 +308,8 @@ namespace mRemoteNG.Connection.Protocol.RDP
{
return ;
}
-
- Size size = new Size();
- if (!Fullscreen)
- {
- size = Control.Size;
- }
- else
- {
- size = Screen.FromControl(Control).Bounds.Size;
- }
+
+ var size = !Fullscreen ? Control.Size : Screen.FromControl(Control).Bounds.Size;
IMsRdpClient8 msRdpClient8 = _rdpClient;
msRdpClient8.Reconnect((uint)size.Width, (uint)size.Height);
@@ -397,14 +388,16 @@ namespace mRemoteNG.Connection.Protocol.RDP
if (_rdpVersion >= Versions.RDC61)
{
Runtime.MessageCollector.AddMessage(MessageClass.InformationMsg, string.Format(Language.strRdpSetConsoleSwitch, _rdpVersion), true);
- //_rdpClient.AdvancedSettings7.ConnectToAdministerServer = value;
+ _rdpClient.AdvancedSettings7.ConnectToAdministerServer = value;
}
else
{
- Runtime.MessageCollector.AddMessage(MessageClass.InformationMsg, string.Format(Language.strRdpSetConsoleSwitch, _rdpVersion), true);
- _rdpClient.AdvancedSettings2.ConnectToServerConsole = value;
- }
- }
+ Runtime.MessageCollector.AddMessage(MessageClass.InformationMsg, string.Format(Language.strRdpSetConsoleSwitch, _rdpVersion) + Environment.NewLine + "No longer supported in this RDP version. Reference: https://msdn.microsoft.com/en-us/library/aa380863(v=vs.85).aspx", true);
+ // ConnectToServerConsole is deprecated
+ //https://msdn.microsoft.com/en-us/library/aa380863(v=vs.85).aspx
+ //_rdpClient.AdvancedSettings2.ConnectToServerConsole = value;
+ }
+ }
catch (Exception ex)
{
Runtime.MessageCollector.AddExceptionMessage(Language.strRdpSetConsoleSessionFailed, ex, MessageClass.ErrorMsg, true);
@@ -426,13 +419,13 @@ namespace mRemoteNG.Connection.Protocol.RDP
if (string.IsNullOrEmpty(userName))
{
- if (mRemoteNG.Settings.Default.EmptyCredentials == "windows")
+ if (Settings.Default.EmptyCredentials == "windows")
{
_rdpClient.UserName = Environment.UserName;
}
- else if (mRemoteNG.Settings.Default.EmptyCredentials == "custom")
+ else if (Settings.Default.EmptyCredentials == "custom")
{
- _rdpClient.UserName = Convert.ToString(mRemoteNG.Settings.Default.DefaultUsername);
+ _rdpClient.UserName = Convert.ToString(Settings.Default.DefaultUsername);
}
}
else
@@ -442,11 +435,11 @@ namespace mRemoteNG.Connection.Protocol.RDP
if (string.IsNullOrEmpty(password))
{
- if (mRemoteNG.Settings.Default.EmptyCredentials == "custom")
+ if (Settings.Default.EmptyCredentials == "custom")
{
- if (mRemoteNG.Settings.Default.DefaultPassword != "")
+ if (Settings.Default.DefaultPassword != "")
{
- _rdpClient.AdvancedSettings2.ClearTextPassword = Security.Crypt.Decrypt(Convert.ToString(mRemoteNG.Settings.Default.DefaultPassword), App.Info.GeneralAppInfo.EncryptionKey);
+ _rdpClient.AdvancedSettings2.ClearTextPassword = Security.Crypt.Decrypt(Convert.ToString(Settings.Default.DefaultPassword), App.Info.GeneralAppInfo.EncryptionKey);
}
}
}
@@ -457,13 +450,13 @@ namespace mRemoteNG.Connection.Protocol.RDP
if (string.IsNullOrEmpty(domain))
{
- if (mRemoteNG.Settings.Default.EmptyCredentials == "windows")
+ if (Settings.Default.EmptyCredentials == "windows")
{
_rdpClient.Domain = Environment.UserDomainName;
}
- else if (mRemoteNG.Settings.Default.EmptyCredentials == "custom")
+ else if (Settings.Default.EmptyCredentials == "custom")
{
- _rdpClient.Domain = Convert.ToString(mRemoteNG.Settings.Default.DefaultDomain);
+ _rdpClient.Domain = Convert.ToString(Settings.Default.DefaultDomain);
}
}
else
@@ -494,6 +487,13 @@ namespace mRemoteNG.Connection.Protocol.RDP
{
_rdpClient.DesktopWidth = InterfaceControl.Size.Width;
_rdpClient.DesktopHeight = InterfaceControl.Size.Height;
+
+ if (InterfaceControl.Info.Resolution == RDPResolutions.SmartSize)
+ {
+ _rdpClient.AdvancedSettings2.SmartSizing = true;
+ }
+
+
}
else if (InterfaceControl.Info.Resolution == RDPResolutions.Fullscreen)
{
@@ -639,7 +639,7 @@ namespace mRemoteNG.Connection.Protocol.RDP
Event_Disconnected(this, discReason + "\r\n" + reason);
}
- if (mRemoteNG.Settings.Default.ReconnectOnDisconnect)
+ if (Settings.Default.ReconnectOnDisconnect)
{
ReconnectGroup = new ReconnectGroup();
ReconnectGroup.CloseClicked += Event_ReconnectGroupCloseClicked;
@@ -761,7 +761,8 @@ namespace mRemoteNG.Connection.Protocol.RDP
[Description("1600x1280")]Res1600x1280,
[Description("1680x1050")]Res1680x1050,
[Description("1900x1200")]Res1900x1200,
- [Description("1920x1200")]Res1920x1200,
+ [Description("1920x1080")]Res1920x1080,
+ [Description("1920x1200")]Res1920x1200,
[Description("2048x1536")]Res2048x1536,
[Description("2560x2048")]Res2560x2048,
[Description("3200x2400")]Res3200x2400,
@@ -833,27 +834,28 @@ namespace mRemoteNG.Connection.Protocol.RDP
protected static Hashtable _description;
protected static void InitDescription()
{
- _description = new Hashtable();
- _description.Add("0", "Language.strRdpErrorUnknown");
- _description.Add("1", "Language.strRdpErrorCode1");
- _description.Add("2", "Language.strRdpErrorOutOfMemory");
- _description.Add("3", "Language.strRdpErrorWindowCreation");
- _description.Add("4", "Language.strRdpErrorCode2");
- _description.Add("5", "Language.strRdpErrorCode3");
- _description.Add("6", "Language.strRdpErrorCode4");
- _description.Add("7", "Language.strRdpErrorConnection");
- _description.Add("100", "Language.strRdpErrorWinsock");
+ _description = new Hashtable
+ {
+ {"0", "Language.strRdpErrorUnknown"},
+ {"1", "Language.strRdpErrorCode1"},
+ {"2", "Language.strRdpErrorOutOfMemory"},
+ {"3", "Language.strRdpErrorWindowCreation"},
+ {"4", "Language.strRdpErrorCode2"},
+ {"5", "Language.strRdpErrorCode3"},
+ {"6", "Language.strRdpErrorCode4"},
+ {"7", "Language.strRdpErrorConnection"},
+ {"100", "Language.strRdpErrorWinsock"}
+ };
}
public static string GetError(string id)
{
- if (_description == null)
- {
- InitDescription();
- }
try
{
- return ((string)_description[id]);
+ if (_description == null)
+ InitDescription();
+
+ return ((string)_description?[id]);
}
catch (Exception ex)
{
diff --git a/mRemoteV1/Properties/Settings.Designer.cs b/mRemoteV1/Properties/Settings.Designer.cs
index 288a17e27..536fe76e3 100644
--- a/mRemoteV1/Properties/Settings.Designer.cs
+++ b/mRemoteV1/Properties/Settings.Designer.cs
@@ -313,7 +313,7 @@ namespace mRemoteNG {
[global::System.Configuration.UserScopedSettingAttribute()]
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
- [global::System.Configuration.DefaultSettingValueAttribute("False")]
+ [global::System.Configuration.DefaultSettingValueAttribute("True")]
public bool WriteLogFile {
get {
return ((bool)(this["WriteLogFile"]));
@@ -553,7 +553,7 @@ namespace mRemoteNG {
[global::System.Configuration.UserScopedSettingAttribute()]
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
- [global::System.Configuration.DefaultSettingValueAttribute("True")]
+ [global::System.Configuration.DefaultSettingValueAttribute("False")]
public bool ConDefaultCacheBitmaps {
get {
return ((bool)(this["ConDefaultCacheBitmaps"]));
@@ -1717,7 +1717,7 @@ namespace mRemoteNG {
[global::System.Configuration.UserScopedSettingAttribute()]
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
- [global::System.Configuration.DefaultSettingValueAttribute("7")]
+ [global::System.Configuration.DefaultSettingValueAttribute("14")]
public int CheckForUpdatesFrequencyDays {
get {
return ((int)(this["CheckForUpdatesFrequencyDays"]));
diff --git a/mRemoteV1/Properties/Settings.settings b/mRemoteV1/Properties/Settings.settings
index a8a479ab2..b28b38608 100644
--- a/mRemoteV1/Properties/Settings.settings
+++ b/mRemoteV1/Properties/Settings.settings
@@ -75,7 +75,7 @@
- False
+ True
False
@@ -135,7 +135,7 @@
Colors16Bit
- True
+ False
False
@@ -426,7 +426,7 @@
False
- 7
+ 14
1980-01-01
diff --git a/mRemoteV1/Tools/ExternalTool.cs b/mRemoteV1/Tools/ExternalTool.cs
index 7db8b3b0d..aab38af9d 100644
--- a/mRemoteV1/Tools/ExternalTool.cs
+++ b/mRemoteV1/Tools/ExternalTool.cs
@@ -40,7 +40,7 @@ namespace mRemoteNG.Tools
if (Icon != null)
return Icon.ToBitmap();
else
- return null;
+ return Resources.mRemote_Icon.ToBitmap();
}
}
#endregion
@@ -56,8 +56,11 @@ namespace mRemoteNG.Tools
{
try
{
- if (string.IsNullOrEmpty(FileName))
- throw (new InvalidOperationException("FileName cannot be blank."));
+ if (string.IsNullOrEmpty(FileName))
+ {
+ Runtime.MessageCollector.AddMessage(Messages.MessageClass.ErrorMsg, "ExternalApp.Start() failed: FileName cannot be blank.", false);
+ return;
+ }
ConnectionInfo = startConnectionInfo;
diff --git a/mRemoteV1/Tools/MiscTools.cs b/mRemoteV1/Tools/MiscTools.cs
index 428e0c3dd..c48088e77 100644
--- a/mRemoteV1/Tools/MiscTools.cs
+++ b/mRemoteV1/Tools/MiscTools.cs
@@ -3,24 +3,18 @@ using mRemoteNG.App;
using mRemoteNG.Forms;
using mRemoteNG.UI.Window;
using System;
-using System.Collections.Specialized;
using System.ComponentModel;
-using System.Data;
-using System.Data.SqlClient;
using System.Drawing;
using System.Globalization;
using System.IO;
using System.Reflection;
using System.Runtime.InteropServices;
-using System.Text.RegularExpressions;
using System.Windows.Forms;
-using mRemoteNG.My;
-using mRemoteNG.UI.Forms;
namespace mRemoteNG.Tools
{
- public class MiscTools
+ public class MiscTools
{
private struct SHFILEINFO
{
@@ -42,34 +36,41 @@ namespace mRemoteNG.Tools
public static Icon GetIconFromFile(string FileName)
{
- try
- {
- if (File.Exists(FileName) == false)
- {
- return null;
- }
-
- IntPtr hImgSmall; //The handle to the system image list.
- //Dim hImgLarge As IntPtr 'The handle to the system image list.
- SHFILEINFO shinfo = new SHFILEINFO();
- shinfo = new SHFILEINFO();
-
- shinfo.szDisplayName = new string('\0', 260);
- shinfo.szTypeName = new string('\0', 80);
-
- //Use this to get the small icon.
- hImgSmall = SHGetFileInfo(FileName, 0, ref shinfo, Marshal.SizeOf(shinfo), SHGFI_ICON | SHGFI_SMALLICON);
-
- //Use this to get the large icon.
- //hImgLarge = SHGetFileInfo(fName, 0, ref shinfo, (uint)Marshal.SizeOf(shinfo), SHGFI_ICON | SHGFI_LARGEICON);
-
- //The icon is returned in the hIcon member of the
- //shinfo struct.
- System.Drawing.Icon myIcon = default(System.Drawing.Icon);
- myIcon = System.Drawing.Icon.FromHandle(shinfo.hIcon);
-
- return myIcon;
- }
+ try
+ {
+ if (File.Exists(FileName) == false)
+ {
+ return null;
+ }
+
+ IntPtr hImgSmall; //The handle to the system image list.
+ //Dim hImgLarge As IntPtr 'The handle to the system image list.
+ SHFILEINFO shinfo = new SHFILEINFO();
+ shinfo = new SHFILEINFO();
+
+ shinfo.szDisplayName = new string('\0', 260);
+ shinfo.szTypeName = new string('\0', 80);
+
+ //Use this to get the small icon.
+ hImgSmall = SHGetFileInfo(FileName, 0, ref shinfo, Marshal.SizeOf(shinfo), SHGFI_ICON | SHGFI_SMALLICON);
+
+ //Use this to get the large icon.
+ //hImgLarge = SHGetFileInfo(fName, 0, ref shinfo, (uint)Marshal.SizeOf(shinfo), SHGFI_ICON | SHGFI_LARGEICON);
+
+ //The icon is returned in the hIcon member of the
+ //shinfo struct.
+ Icon myIcon = default(Icon);
+ myIcon = Icon.FromHandle(shinfo.hIcon);
+
+ return myIcon;
+ }
+ catch (ArgumentException AEx)
+ {
+ Runtime.MessageCollector.AddMessage(Messages.MessageClass.WarningMsg,
+ "GetIconFromFile failed (Tools.Misc) - using default icon" + Environment.NewLine + AEx.Message, true);
+ return Resources.mRemote_Icon;
+
+ }
catch (Exception ex)
{
Runtime.MessageCollector.AddMessage(Messages.MessageClass.WarningMsg, "GetIconFromFile failed (Tools.Misc)" + Environment.NewLine + ex.Message, true);
@@ -117,11 +118,11 @@ namespace mRemoteNG.Tools
public static string DBDate(DateTime Dt)
{
- string strDate = "";
- strDate = Dt.Year + LeadingZero(Convert.ToString(Dt.Month)) + LeadingZero(Convert.ToString(Dt.Day)) + " " + LeadingZero(Convert.ToString(Dt.Hour)) + ":" + LeadingZero(Convert.ToString(Dt.Minute)) + ":" + LeadingZero(Convert.ToString(Dt.Second));
- return strDate;
+ var strDate = Dt.Year + LeadingZero(Convert.ToString(Dt.Month)) + LeadingZero(Convert.ToString(Dt.Day)) + " " + LeadingZero(Convert.ToString(Dt.Hour)) + ":" + LeadingZero(Convert.ToString(Dt.Minute)) + ":" + LeadingZero(Convert.ToString(Dt.Second));
+ return strDate;
}
- public static string PrepareForDB(string Text)
+
+ public static string PrepareForDB(string Text)
{
return ReplaceBooleanStringsWithNumbers(Text);
}
@@ -179,7 +180,7 @@ namespace mRemoteNG.Tools
Size currentFormSize = new Size(LeftWidth, TopHeight);
Bitmap ScreenToBitmap = new Bitmap(LeftWidth, TopHeight);
- System.Drawing.Graphics gGraphics = System.Drawing.Graphics.FromImage(ScreenToBitmap);
+ Graphics gGraphics = Graphics.FromImage(ScreenToBitmap);
gGraphics.CopyFromScreen(new Point(LeftStart, TopStart), new Point(0, 0), currentFormSize);
@@ -301,11 +302,11 @@ namespace mRemoteNG.Tools
return true;
}
- public override TypeConverter.StandardValuesCollection GetStandardValues(ITypeDescriptorContext context)
+ public override StandardValuesCollection GetStandardValues(ITypeDescriptorContext context)
{
bool[] bools = new bool[] {true, false};
- TypeConverter.StandardValuesCollection svc = new TypeConverter.StandardValuesCollection(bools);
+ StandardValuesCollection svc = new StandardValuesCollection(bools);
return svc;
}
diff --git a/mRemoteV1/UI/Window/ConnectionTreeWindow.cs b/mRemoteV1/UI/Window/ConnectionTreeWindow.cs
index e0e59ea6c..ace1ca3a6 100644
--- a/mRemoteV1/UI/Window/ConnectionTreeWindow.cs
+++ b/mRemoteV1/UI/Window/ConnectionTreeWindow.cs
@@ -798,8 +798,15 @@ namespace mRemoteNG.UI.Window
{
try
{
- //clean up
- cMenTreeToolsExternalApps.DropDownItems.Clear();
+ //clean up
+ //since new items are added below, we have to dispose of any previous items first
+ if (cMenTreeToolsExternalApps.DropDownItems.Count > 0)
+ {
+ foreach (ToolStripMenuItem mitem in cMenTreeToolsExternalApps.DropDownItems)
+ mitem.Dispose();
+
+ cMenTreeToolsExternalApps.DropDownItems.Clear();
+ }
//add ext apps
foreach (Tools.ExternalTool extA in Runtime.ExternalTools)
diff --git a/mRemoteV1/UI/Window/ConnectionWindow.cs b/mRemoteV1/UI/Window/ConnectionWindow.cs
index 8bc2ef280..2f7f32089 100644
--- a/mRemoteV1/UI/Window/ConnectionWindow.cs
+++ b/mRemoteV1/UI/Window/ConnectionWindow.cs
@@ -9,13 +9,12 @@ using mRemoteNG.Config;
using mRemoteNG.Connection.Protocol.VNC;
using mRemoteNG.Connection.Protocol.RDP;
using mRemoteNG.Connection.Protocol;
-using mRemoteNG.My;
using mRemoteNG.UI.Forms;
using mRemoteNG.UI.TaskDialog;
namespace mRemoteNG.UI.Window
{
- public class ConnectionWindow : BaseWindow
+ public class ConnectionWindow : BaseWindow
{
#region Form Init
internal ContextMenuStrip cmenTab;
@@ -98,9 +97,9 @@ namespace mRemoteNG.UI.Window
//
//TabController
//
- TabController.Anchor = (AnchorStyles) (((AnchorStyles.Top | AnchorStyles.Bottom)
- | AnchorStyles.Left)
- | AnchorStyles.Right);
+ TabController.Anchor = ((AnchorStyles.Top | AnchorStyles.Bottom)
+ | AnchorStyles.Left)
+ | AnchorStyles.Right;
TabController.Appearance = Crownwood.Magic.Controls.TabControl.VisualAppearance.MultiDocument;
TabController.Cursor = Cursors.Hand;
TabController.DragFromControl = false;
@@ -241,7 +240,7 @@ namespace mRemoteNG.UI.Window
//
ClientSize = new Size(632, 453);
Controls.Add(TabController);
- Font = new Font("Microsoft Sans Serif", (float) (8.25F), FontStyle.Regular, GraphicsUnit.Point, Convert.ToByte(0));
+ Font = new Font("Microsoft Sans Serif", 8.25F, FontStyle.Regular, GraphicsUnit.Point, Convert.ToByte(0));
Icon = Resources.mRemote_Icon;
Name = "Connection";
TabText = "UI.Window.Connection";
@@ -272,7 +271,7 @@ namespace mRemoteNG.UI.Window
try
{
Crownwood.Magic.Controls.TabPage nTab = new Crownwood.Magic.Controls.TabPage();
- nTab.Anchor = (AnchorStyles) (AnchorStyles.Bottom | AnchorStyles.Left | AnchorStyles.Right | AnchorStyles.Top);
+ nTab.Anchor = AnchorStyles.Bottom | AnchorStyles.Left | AnchorStyles.Right | AnchorStyles.Top;
if (Settings.Default.ShowProtocolOnTabs)
{
@@ -590,27 +589,27 @@ namespace mRemoteNG.UI.Window
{
ProtocolRDP rdp = (ProtocolRDP)IC.Protocol;
- cmenTabFullscreen.Enabled = true;
+ cmenTabFullscreen.Visible = true;
cmenTabFullscreen.Checked = rdp.Fullscreen;
- cmenTabSmartSize.Enabled = true;
+ cmenTabSmartSize.Visible = true;
cmenTabSmartSize.Checked = rdp.SmartSize;
}
else
{
- cmenTabFullscreen.Enabled = false;
- cmenTabSmartSize.Enabled = false;
+ cmenTabFullscreen.Visible = false;
+ cmenTabSmartSize.Visible = false;
}
if (IC.Info.Protocol == ProtocolType.VNC)
{
- cmenTabSendSpecialKeys.Enabled = true;
- cmenTabViewOnly.Enabled = true;
+ cmenTabSendSpecialKeys.Visible = true;
+ cmenTabViewOnly.Visible = true;
- cmenTabSmartSize.Enabled = true;
- cmenTabStartChat.Enabled = true;
- cmenTabRefreshScreen.Enabled = true;
- cmenTabTransferFile.Enabled = false;
+ cmenTabSmartSize.Visible = true;
+ cmenTabStartChat.Visible = true;
+ cmenTabRefreshScreen.Visible = true;
+ cmenTabTransferFile.Visible = false;
ProtocolVNC vnc = (ProtocolVNC)IC.Protocol;
cmenTabSmartSize.Checked = vnc.SmartSize;
@@ -618,25 +617,25 @@ namespace mRemoteNG.UI.Window
}
else
{
- cmenTabSendSpecialKeys.Enabled = false;
- cmenTabViewOnly.Enabled = false;
- cmenTabStartChat.Enabled = false;
- cmenTabRefreshScreen.Enabled = false;
- cmenTabTransferFile.Enabled = false;
+ cmenTabSendSpecialKeys.Visible = false;
+ cmenTabViewOnly.Visible = false;
+ cmenTabStartChat.Visible = false;
+ cmenTabRefreshScreen.Visible = false;
+ cmenTabTransferFile.Visible = false;
}
if (IC.Info.Protocol == ProtocolType.SSH1 | IC.Info.Protocol == ProtocolType.SSH2)
{
- cmenTabTransferFile.Enabled = true;
+ cmenTabTransferFile.Visible = true;
}
if (IC.Protocol is PuttyBase)
{
- cmenTabPuttySettings.Enabled = true;
+ cmenTabPuttySettings.Visible = true;
}
else
{
- cmenTabPuttySettings.Enabled = false;
+ cmenTabPuttySettings.Visible = false;
}
AddExternalApps();
@@ -969,8 +968,16 @@ namespace mRemoteNG.UI.Window
{
try
{
- //clean up
- cmenTabExternalApps.DropDownItems.Clear();
+ //clean up
+ //since new items are added below, we have to dispose of any previous items first
+ if (cmenTabExternalApps.DropDownItems.Count > 0)
+ {
+ foreach (ToolStripMenuItem mitem in cmenTabExternalApps.DropDownItems)
+ mitem.Dispose();
+
+ cmenTabExternalApps.DropDownItems.Clear();
+ }
+
//add ext apps
foreach (Tools.ExternalTool extA in Runtime.ExternalTools)
@@ -1217,7 +1224,7 @@ namespace mRemoteNG.UI.Window
if (IC.Info.Protocol == ProtocolType.VNC)
{
- (IC.Protocol as ProtocolVNC).RefreshScreen();
+ ((ProtocolVNC)IC.Protocol).RefreshScreen();
}
}
}
diff --git a/mRemoteV1/app.config b/mRemoteV1/app.config
index edcfa5ac6..a3a8387ca 100644
--- a/mRemoteV1/app.config
+++ b/mRemoteV1/app.config
@@ -20,7 +20,7 @@
-
+
@@ -109,7 +109,7 @@
- False
+ True
False
@@ -169,7 +169,7 @@
Colors16Bit
- True
+ False
False
@@ -460,7 +460,7 @@
False
- 7
+ 14
1980-01-01
diff --git a/mRemoteV1/mRemoteV1.csproj b/mRemoteV1/mRemoteV1.csproj
index 1ab87048b..2e8fd86de 100644
--- a/mRemoteV1/mRemoteV1.csproj
+++ b/mRemoteV1/mRemoteV1.csproj
@@ -54,12 +54,13 @@
1591,660,661
x86
MinimumRecommendedRules.ruleset
+ DEBUG
pdbonly
false
true
- true
+ false
bin\Release\
@@ -71,7 +72,7 @@
true
bin\Release Portable\
- true
+ false
1591,660,661
pdbonly
x86
@@ -89,7 +90,7 @@
x86
DEBUG;PORTABLE
MinimumRecommendedRules.ruleset
- true
+ false
@@ -1204,8 +1205,8 @@
-
-
+ call "$(DevEnvDir)..\tools\vsvars32.bat"
+editbin /largeaddressaware $(TargetPath)