Merge branch 'develop' into push_settings_recursively

This commit is contained in:
David Sparer
2019-05-15 09:29:02 -05:00
9 changed files with 1515 additions and 847 deletions

View File

@@ -19,6 +19,7 @@
- [ ] Bug fix (non-breaking change which fixes an issue)
- [ ] New feature (non-breaking change which adds functionality)
- [ ] Breaking change (fix or feature that would cause existing functionality to change)
- [ ] Updated translation
## Checklist:
<!--- Go over all the following points, and put an `x` in all the boxes that apply. -->

View File

@@ -6,7 +6,11 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
## [Unreleased]
### Added
### Changed
- #1443: Chinese (simplified) translation improvements
- #1437: Norwegian translation improvements
### Fixed
- #1447: Exception occurs when resetting layout
- #1439: Searching in hosts tree loses first keystroke
- #1428: Fixed a rare error when checking for FIPS
- #1426: Tabbing is reversed in config window
- #1425: Connections didn't always respect the Panel property

View File

@@ -5,6 +5,7 @@ using mRemoteNG.App;
using mRemoteNG.Connection.Protocol;
using mRemoteNG.Container;
using mRemoteNG.Messages;
using mRemoteNG.Tools;
using mRemoteNG.UI.Forms;
using mRemoteNG.UI.Panels;
using mRemoteNG.UI.Tabs;
@@ -21,35 +22,6 @@ namespace mRemoteNG.Connection
public IEnumerable<string> ActiveConnections => _activeConnections;
public void OpenConnection(ContainerInfo containerInfo, ConnectionInfo.Force force = ConnectionInfo.Force.None)
{
OpenConnection(containerInfo, force, null);
}
public void OpenConnection(ConnectionInfo connectionInfo)
{
try
{
OpenConnection(connectionInfo, ConnectionInfo.Force.None);
}
catch (Exception ex)
{
Runtime.MessageCollector.AddExceptionStackTrace(Language.strConnectionOpenFailed, ex);
}
}
public void OpenConnection(ConnectionInfo connectionInfo, ConnectionInfo.Force force)
{
try
{
OpenConnection(connectionInfo, force, null);
}
catch (Exception ex)
{
Runtime.MessageCollector.AddExceptionStackTrace(Language.strConnectionOpenFailed, ex);
}
}
public bool SwitchToOpenConnection(ConnectionInfo connectionInfo)
{
var interfaceControl = FindConnectionContainer(connectionInfo);
@@ -61,13 +33,15 @@ namespace mRemoteNG.Connection
return true;
}
#region Private
private void OpenConnection(ContainerInfo containerInfo, ConnectionInfo.Force force, ConnectionWindow conForm)
public void OpenConnection(
ContainerInfo containerInfo,
ConnectionInfo.Force force = ConnectionInfo.Force.None,
ConnectionWindow conForm = null)
{
var children = containerInfo.Children;
if (children.Count == 0) return;
foreach (var child in children)
if (containerInfo == null || containerInfo.Children.Count == 0)
return;
foreach (var child in containerInfo.Children)
{
if (child is ContainerInfo childAsContainer)
OpenConnection(childAsContainer, force, conForm);
@@ -76,8 +50,14 @@ namespace mRemoteNG.Connection
}
}
private void OpenConnection(ConnectionInfo connectionInfo, ConnectionInfo.Force force, ConnectionWindow conForm)
public void OpenConnection(
ConnectionInfo connectionInfo,
ConnectionInfo.Force force = ConnectionInfo.Force.None,
ConnectionWindow conForm = null)
{
if (connectionInfo == null)
return;
try
{
if (connectionInfo.Hostname == "" && connectionInfo.Protocol != ProtocolType.IntApp)
@@ -130,6 +110,7 @@ namespace mRemoteNG.Connection
}
}
#region Private
private static void StartPreConnectionExternalApp(ConnectionInfo connectionInfo)
{
if (connectionInfo.PreExtApp == "") return;

View File

@@ -1,5 +1,6 @@
using System.Collections.Generic;
using System.Collections.Generic;
using mRemoteNG.Container;
using mRemoteNG.UI.Window;
namespace mRemoteNG.Connection
{
@@ -7,11 +8,15 @@ namespace mRemoteNG.Connection
{
IEnumerable<string> ActiveConnections { get; }
void OpenConnection(ConnectionInfo connectionInfo);
void OpenConnection(
ContainerInfo containerInfo,
ConnectionInfo.Force force = ConnectionInfo.Force.None,
ConnectionWindow conForm = null);
void OpenConnection(ContainerInfo containerInfo, ConnectionInfo.Force force = ConnectionInfo.Force.None);
void OpenConnection(ConnectionInfo connectionInfo, ConnectionInfo.Force force);
void OpenConnection(
ConnectionInfo connectionInfo,
ConnectionInfo.Force force = ConnectionInfo.Force.None,
ConnectionWindow conForm = null);
bool SwitchToOpenConnection(ConnectionInfo connectionInfo);
}

File diff suppressed because it is too large Load Diff

View File

@@ -244,7 +244,8 @@
<value>测试代理</value>
</data>
<data name="strCannotImportNormalSessionFile" xml:space="preserve">
<value>您不能导入正常连接文件。请使用文件/加载连接文件以导入正常连接文件!</value>
<value>您不能导入正常连接文件。
请使用文件/加载连接文件以导入正常连接文件!</value>
</data>
<data name="strCannotStartPortScan" xml:space="preserve">
<value>无法启动端口扫描IP 格式不正确!</value>
@@ -308,7 +309,7 @@ mRemoteNG提供此组件但是如果没有使用 mRemoteNG 安装程序,不
</data>
<data name="strCcICAFailed" xml:space="preserve">
<value>启用 ICA 需要提前安装 XenDesktop Online 插件,并正确注册 wfica.ocx 库文件。您可以在此下载此插件http://www.citrix.com/download/
如果您已安装 XenDesktop Online 插件,但人就检测失败,请手动注册 wfica.ocx
如果您已安装 XenDesktop Online 插件,但仍旧检测失败,请手动注册 wfica.ocx。
请打开运行对话框(开始菜单/运行并输入如下内容“regsvr32 "c:\Program Files\Citrix\ICA Client\wfica.ocx" ”c:\Program Files\Citrix\ICA Client\ 是您安装 XenDesktop Online 插件的路径)。
如果仍然无法通过此检查或在 mRemoteNG 中使用 ICA请咨询 {0}。</value>
</data>
@@ -335,7 +336,8 @@ Citrix ICA 客户端空间版本:{0}</value>
远程桌面版本 {0}</value>
</data>
<data name="strCcVNCFailed" xml:space="preserve">
<value>使用 VNC 前,请确认 VncSharp.dll 在您安装 mRemoteNG 的目录中(一般为 C:\Program Files\mRemoteNG\
<value>VNC 要求 VncSharp.dll 位于 mRemoteNG 应用程序文件夹中
请确认 VncSharp.dll 在您安装 mRemoteNG 的目录中(一般为 C:\Program Files\mRemoteNG\)。
如果仍然无法通过此检查或在 mRemoteNG 中使用 VNC请咨询 {0}。</value>
</data>
<data name="strCcVNCOK" xml:space="preserve">
@@ -460,7 +462,8 @@ VncSharp 版本 {0}</value>
<value>无法加载配置界面。</value>
</data>
<data name="strConfirmCloseConnectionMainInstruction" xml:space="preserve">
<value>确定要关闭连接“{0}”?</value>
<value>确定要关闭连接
“{0}”?</value>
</data>
<data name="strConfirmCloseConnectionPanelMainInstruction" xml:space="preserve">
<value>确实要关闭面板“{0}”?此面板所包含的所有连接将会断开。</value>
@@ -499,7 +502,7 @@ VncSharp 版本 {0}</value>
<value>协议事件:已连接</value>
</data>
<data name="strConnectionEventConnectedDetail" xml:space="preserve">
<value>通过{1}到主机{0}的连接,已被用户{2}打开(说明:“{3}”,自定义信息:“{4}”)</value>
<value>通过{1}到主机{0}的连接,已被用户{2}打开(说明:“{3}”,自定义信息:“{4}”)</value>
</data>
<data name="strConnectionEventConnectionFailed" xml:space="preserve">
<value>连接失败!</value>
@@ -522,7 +525,7 @@ VncSharp 版本 {0}</value>
<value>连接</value>
</data>
<data name="strConnectionSetDefaultPortFailed" xml:space="preserve">
<value>无法设置默认端口 </value>
<value>无法设置默认端口!</value>
</data>
<data name="strConnectionsFileBackupFailed" xml:space="preserve">
<value>无法创建连接配置文件备份!</value>
@@ -653,7 +656,9 @@ VncSharp 版本 {0}</value>
</data>
<data name="strErrorFipsPolicyIncompatible" xml:space="preserve">
<value>Windows 安全设置中已启用"系统加密:使用 FIPS 兼容算法进行加密、散列和签名操作"。
请参阅 Microsoft 支持文章中的详细信息http://support.microsoft.com/kb/811833
{0} 不完全符合FIPS标准。单击“确定”继续自己的决定或单击“取消”退出。</value>
</data>
<data name="strErrors" xml:space="preserve">
@@ -707,6 +712,9 @@ VncSharp 版本 {0}</value>
<data name="strFAMFAMFAMAttribution" xml:space="preserve">
<value>内置图标由[FAMFAMFAM]制作</value>
</data>
<data name="strFAMFAMFAMAttributionURL" xml:space="preserve">
<value>http://www.famfamfam.com/</value>
</data>
<data name="strFileFormatLabel" xml:space="preserve">
<value>文件格式(&amp;F):</value>
</data>
@@ -773,6 +781,9 @@ VncSharp 版本 {0}</value>
<data name="strHost" xml:space="preserve">
<value>主机</value>
</data>
<data name="strHttp" xml:space="preserve">
<value>HTTP</value>
</data>
<data name="strHttpConnectFailed" xml:space="preserve">
<value>HTTP 连接失败!</value>
</data>
@@ -782,9 +793,21 @@ VncSharp 版本 {0}</value>
<data name="strHttpDocumentTileChangeFailed" xml:space="preserve">
<value>更改HTTP文档标题失败</value>
</data>
<data name="strHttpGecko" xml:space="preserve">
<value>Gecko (Firefox)</value>
</data>
<data name="strHttpInternetExplorer" xml:space="preserve">
<value>Internet Explorer</value>
</data>
<data name="strHttps" xml:space="preserve">
<value>HTTPS</value>
</data>
<data name="strHttpSetPropsFailed" xml:space="preserve">
<value>设置 HTTP 属性失败!</value>
</data>
<data name="strICA" xml:space="preserve">
<value>ICA</value>
</data>
<data name="strIcaConnectionFailed" xml:space="preserve">
<value>无法创建新 ICA 连接!</value>
</data>
@@ -878,6 +901,12 @@ VncSharp 版本 {0}</value>
<data name="strIntAppTitle" xml:space="preserve">
<value>内部程序标题:{0}</value>
</data>
<data name="strKeysCtrlAltDel" xml:space="preserve">
<value>CTRL-ALT-DEL</value>
</data>
<data name="strKeysCtrlEsc" xml:space="preserve">
<value>CTRL-ESC</value>
</data>
<data name="strLabelAddress" xml:space="preserve">
<value>地址:</value>
</data>
@@ -986,6 +1015,9 @@ VncSharp 版本 {0}</value>
<data name="strMagicLibraryAttribution" xml:space="preserve">
<value>使用[Crownwood Software]开发的 Magic 库</value>
</data>
<data name="strMagicLibraryAttributionURL" xml:space="preserve">
<value>http://www.dotnetmagic.com/</value>
</data>
<data name="strMenuAbout" xml:space="preserve">
<value>关于</value>
</data>
@@ -1188,7 +1220,7 @@ VncSharp 版本 {0}</value>
<value>查看(&amp;V)</value>
</data>
<data name="strMenuViewOnly" xml:space="preserve">
<value>查看模式(VNC)</value>
<value>查看</value>
</data>
<data name="strMenuWebsite" xml:space="preserve">
<value>网站</value>
@@ -1202,6 +1234,12 @@ VncSharp 版本 {0}</value>
<data name="strMoveUp" xml:space="preserve">
<value>上移</value>
</data>
<data name="strMremoteNgCsv" xml:space="preserve">
<value>mRemoteNG CSV</value>
</data>
<data name="strMremoteNgXml" xml:space="preserve">
<value>mRemoteNG XML</value>
</data>
<data name="strMyCurrentWindowsCreds" xml:space="preserve">
<value>当前凭据(Windows登录信息)</value>
</data>
@@ -1248,7 +1286,8 @@ VncSharp 版本 {0}</value>
<value>无可用更新</value>
</data>
<data name="strOldConffile" xml:space="preserve">
<value>您正在试图加载旧版mRemote连接配置文件可能会导致出现运行时错误。如果您遇到此类错误,请创建新的连接配置文件!</value>
<value>您正在试图加载旧版mRemote连接配置文件可能会导致出现运行时错误。
如果您遇到此类错误,请创建新的连接配置文件!</value>
</data>
<data name="strOpenNewTabRight" xml:space="preserve">
<value>新建标签于当前标签右侧</value>
@@ -1442,6 +1481,9 @@ VncSharp 版本 {0}</value>
<data name="strPropertyDescriptionRedirectSounds" xml:space="preserve">
<value>请选择远程主机声音的处理方式。</value>
</data>
<data name="strPropertyDescriptionRedirectAudioCapture" xml:space="preserve">
<value>选择是否应将远程计算机上的默认音频输入设备重定向到此计算机。</value>
</data>
<data name="strPropertyDescriptionRenderingEngine" xml:space="preserve">
<value>请选择一个有效的渲染显示HTML的引擎。</value>
</data>
@@ -1604,6 +1646,9 @@ VncSharp 版本 {0}</value>
<data name="strPropertyNameRedirectSounds" xml:space="preserve">
<value>声音</value>
</data>
<data name="strPropertyNameRedirectAudioCapture" xml:space="preserve">
<value>音频捕获</value>
</data>
<data name="strPropertyNameRenderingEngine" xml:space="preserve">
<value>渲染引擎</value>
</data>
@@ -1728,6 +1773,12 @@ VncSharp 版本 {0}</value>
<data name="strRadioCloseWarnNever" xml:space="preserve">
<value>关闭连接时不需确认</value>
</data>
<data name="strRAW" xml:space="preserve">
<value>RAW</value>
</data>
<data name="strRDP" xml:space="preserve">
<value>RDP</value>
</data>
<data name="strRDP16777216Colors" xml:space="preserve">
<value>24位色</value>
</data>
@@ -1816,7 +1867,7 @@ VncSharp 版本 {0}</value>
<value>Winsock 初始化错误。</value>
</data>
<data name="strRdpFileCouldNotBeImported" xml:space="preserve">
<value>无法导入 rdp 文件 </value>
<value>无法导入 rdp 文件!</value>
</data>
<data name="strRDPFitToPanel" xml:space="preserve">
<value>适合面板</value>
@@ -1905,6 +1956,9 @@ VncSharp 版本 {0}</value>
<data name="strRename" xml:space="preserve">
<value>重命名</value>
</data>
<data name="strRlogin" xml:space="preserve">
<value>Rlogin</value>
</data>
<data name="strSave" xml:space="preserve">
<value>保存</value>
</data>
@@ -1918,7 +1972,7 @@ VncSharp 版本 {0}</value>
<value>退出时保存连接配置文件</value>
</data>
<data name="strSaveImageFilter" xml:space="preserve">
<value>GIF(.gif)|*.gif|JPEG(.jpeg)|*.jpeg|JPEG(.jpg)|*.jpg|PNG(.png)|*.png</value>
<value>图形交换格式文件 (.gif)|*.gif|联合图像专家组文件 (.jpeg)|*.jpeg|联合图像专家组文件 (.jpg)|*.jpg|便携式网络图形文件 (.png)|*.png</value>
</data>
<data name="strScreen" xml:space="preserve">
<value>屏幕</value>
@@ -1977,6 +2031,9 @@ VncSharp 版本 {0}</value>
<data name="strSmartSizeModeNone" xml:space="preserve">
<value>禁用窗口自适应</value>
</data>
<data name="strSocks5" xml:space="preserve">
<value>Socks 5</value>
</data>
<data name="strSort" xml:space="preserve">
<value>排序</value>
</data>
@@ -2043,6 +2100,9 @@ VncSharp 版本 {0}</value>
<data name="strTabUpdates" xml:space="preserve">
<value>升级</value>
</data>
<data name="strTelnet" xml:space="preserve">
<value>Telnet</value>
</data>
<data name="strTheFollowing" xml:space="preserve">
<value>以下:</value>
</data>
@@ -2190,6 +2250,9 @@ VncSharp 版本 {0}</value>
<data name="strType" xml:space="preserve">
<value>类型</value>
</data>
<data name="strUltraVncRepeater" xml:space="preserve">
<value>Ultra VNC Repeater</value>
</data>
<data name="strUltraVNCSCListeningPort" xml:space="preserve">
<value>UltraVNC SingleClick 端口:</value>
</data>
@@ -2260,6 +2323,9 @@ mRemoteNG 将退出并安装更新。</value>
<data name="strVersion" xml:space="preserve">
<value>版本</value>
</data>
<data name="strVnc" xml:space="preserve">
<value>VNC</value>
</data>
<data name="strVncConnectionDisconnectFailed" xml:space="preserve">
<value>VNC 连接断开失败!</value>
</data>
@@ -2293,6 +2359,9 @@ mRemoteNG 将退出并安装更新。</value>
<data name="strWeifenLuoAttribution" xml:space="preserve">
<value>使用DockPanel Suite[Weifen Luo]</value>
</data>
<data name="strWeifenLuoAttributionURL" xml:space="preserve">
<value>http://sourceforge.net/projects/dockpanelsuite/</value>
</data>
<data name="strXULrunnerPath" xml:space="preserve">
<value>XULrunner 路径:</value>
</data>
@@ -2368,6 +2437,9 @@ mRemoteNG 将退出并安装更新。</value>
<data name="strCredentialManager" xml:space="preserve">
<value>凭证管理器</value>
</data>
<data name="strID" xml:space="preserve">
<value>ID</value>
</data>
<data name="strRemove" xml:space="preserve">
<value>移除</value>
</data>
@@ -2628,6 +2700,9 @@ mRemoteNG 将退出并安装更新。</value>
<data name="strReconnectAllConnections" xml:space="preserve">
<value>重新连接所有连接</value>
</data>
<data name="strUltraVNCSingleClick" xml:space="preserve">
<value>UltraVNC SingleClick</value>
</data>
<data name="strMenuDisconnectOthersRight" xml:space="preserve">
<value>断开右侧标签的连接</value>
</data>
@@ -2705,4 +2780,16 @@ mRemoteNG 将退出并安装更新。</value>
<data name="Favorites" xml:space="preserve">
<value>收藏夹</value>
</data>
</root>
<data name="ClearSearchString" xml:space="preserve">
<value>清除搜索字符串</value>
</data>
<data name="ConnectInViewOnlyMode" xml:space="preserve">
<value>以仅查看模式连接</value>
</data>
<data name="DoNotTrimUsername" xml:space="preserve">
<value>不要修剪用户名中的空格</value>
</data>
<data name="Environment" xml:space="preserve">
<value>环境</value>
</data>
</root>

View File

@@ -1,17 +1,18 @@
using System;
using System.Drawing;
using System.Windows.Forms;
namespace mRemoteNG.UI.Controls.Base
{
public class NGSearchBox : NGTextBox
{
private PictureBox pbClear = new PictureBox();
private ToolTip btClearToolTip = new ToolTip();
private bool _showDefaultText = true;
private bool _settingDefaultText = true;
private readonly PictureBox _pbClear = new PictureBox();
private readonly ToolTip _btClearToolTip = new ToolTip();
public NGSearchBox()
{
InitializeComponent();
TextChanged += NGSearchBox_TextChanged;
LostFocus += FocusLost;
GotFocus += FocusGot;
AddClearButton();
@@ -20,46 +21,47 @@ namespace mRemoteNG.UI.Controls.Base
private void ApplyLanguage()
{
btClearToolTip.SetToolTip(pbClear, Language.ClearSearchString);
_btClearToolTip.SetToolTip(_pbClear, Language.ClearSearchString);
}
private void AddClearButton()
{
pbClear.Image = Resources.Delete;
pbClear.Width = 20;
pbClear.Dock = DockStyle.Right;
pbClear.Cursor = Cursors.Default;
pbClear.Click += PbClear_Click;
pbClear.LostFocus += FocusLost;
Controls.Add(pbClear);
_pbClear.Image = Resources.Delete;
_pbClear.Width = 20;
_pbClear.Dock = DockStyle.Right;
_pbClear.Cursor = Cursors.Default;
_pbClear.Click += PbClear_Click;
_pbClear.LostFocus += FocusLost;
Controls.Add(_pbClear);
}
private void FocusLost(object sender, EventArgs e)
{
if (string.IsNullOrEmpty(Text))
{
Text = Language.strSearchPrompt;
pbClear.Visible = false;
}
if (!_showDefaultText)
return;
_settingDefaultText = true;
Text = Language.strSearchPrompt;
_pbClear.Visible = false;
}
private void FocusGot(object sender, EventArgs e) => Text = "";
private void InitializeComponent()
private void FocusGot(object sender, EventArgs e)
{
this.SuspendLayout();
//
// NGSearchBox
//
this.TextChanged += new System.EventHandler(this.NGSearchBox_TextChanged);
this.ResumeLayout(false);
if (_showDefaultText)
Text = "";
}
private void PbClear_Click(object sender, EventArgs e) => Text = string.Empty;
private void NGSearchBox_TextChanged(object sender, EventArgs e)
{
pbClear.Visible = Text == Language.strSearchPrompt ? false : TextLength > 0;
if (!_settingDefaultText)
{
_showDefaultText = string.IsNullOrEmpty(Text);
}
_pbClear.Visible = !_showDefaultText && TextLength > 0;
_settingDefaultText = false;
}
}
}

View File

@@ -693,15 +693,9 @@ namespace mRemoteNG.UI.Forms
pnlDock.DockTopPortion = pnlDock.Height * 0.25;
pnlDock.DockBottomPortion = pnlDock.Height * 0.25;
Windows.TreeForm.DockAreas = DockAreas.DockBottom | DockAreas.DockLeft | DockAreas.DockRight |
DockAreas.DockTop | DockAreas.Float;
Windows.TreeForm.Show(pnlDock, DockState.DockLeft);
Windows.ConfigForm.DockAreas = DockAreas.DockBottom | DockAreas.DockLeft | DockAreas.DockRight |
DockAreas.DockTop | DockAreas.Float;
Windows.ConfigForm.Show(pnlDock);
Windows.ConfigForm.DockTo(Windows.TreeForm.Pane, DockStyle.Bottom, -1);
Windows.ErrorsForm.DockAreas = DockAreas.DockBottom | DockAreas.DockLeft | DockAreas.DockRight |
DockAreas.DockTop | DockAreas.Float;
Windows.ErrorsForm.Show(pnlDock, DockState.DockBottomAutoHide);
Windows.ScreenshotForm.Hide();

View File

@@ -338,8 +338,8 @@ namespace mRemoteNG.UI.Window
try
{
if (!char.IsLetterOrDigit(e.KeyChar)) return;
txtSearch.Text = e.KeyChar.ToString();
txtSearch.Focus();
txtSearch.Text = e.KeyChar.ToString();
txtSearch.SelectionStart = txtSearch.TextLength;
}
catch (Exception ex)
@@ -355,6 +355,8 @@ namespace mRemoteNG.UI.Window
if (e.KeyCode == Keys.Enter)
{
e.Handled = true;
if (SelectedNode == null)
return;
_connectionInitiator.OpenConnection(SelectedNode);
}
else if (e.Control && e.KeyCode == Keys.F)