Compare commits

...

19 Commits

Author SHA1 Message Date
Faryan Rezagholi
141b326a20 added SharedLibraryNG project 2021-07-26 01:48:23 +02:00
Faryan Rezagholi
624192d301 Added featured project 2021-07-26 00:51:21 +02:00
Faryan Rezagholi
d6a2488fde removed obsolete citrix reference from minimum requirements section 2021-07-22 22:33:58 +02:00
Faryan Rezagholi
d4d60439b6 Merge branch 'develop' of https://github.com/mRemoteNG/mRemoteNG into develop 2021-07-22 22:12:02 +02:00
Faryan Rezagholi
75edd0d8ef round corners on splash screen 2021-07-22 22:11:05 +02:00
Dimitrij
b4e6e21094 Merge pull request #2001 from radiosti/patch-1
added optional but helpful winscp arguments
2021-07-20 09:54:42 +01:00
radiosti
8c48bc926e Update external_tools_cheat_sheet.rst 2021-07-19 20:56:26 +02:00
Dimitrij
031b6fb30d set AutoGenerateBindingRedirects 2021-07-05 20:17:39 +01:00
Dimitrij
647542e462 update supported os list 2021-07-04 14:51:00 +01:00
Dimitrij
dbf28d83f3 update PuTTY to v.0.75 2021-07-04 14:42:03 +01:00
Dimitrij
142acdd42f cleanup unused files 2021-06-29 12:18:02 +01:00
Dimitrij
ce103d30d3 update lib 2021-06-29 10:11:16 +01:00
Kvarkas
556d65e8b4 upd README.MD 2021-06-24 23:47:14 +01:00
Kvarkas
e0cf070bd0 fx mistypo 2021-06-24 23:45:52 +01:00
Kvarkas
70c5a336c2 upd 2021-06-24 23:43:52 +01:00
Kvarkas
f82d5fbd2d nb 2021-06-24 23:26:34 +01:00
Kvarkas
31418ba6f7 added nb 2021-06-24 23:09:08 +01:00
Kvarkas
3c10bb2669 activate Start in full screen mode 2021-06-24 23:03:32 +01:00
Kvarkas
0e009a2762 add option to run in full screen mode 2021-06-24 22:09:50 +01:00
25 changed files with 1072 additions and 1040 deletions

63
Jenkinsfile vendored
View File

@@ -1,63 +0,0 @@
#!groovy
node('windows') {
def jobDir = pwd()
def solutionFilePath = "\"${jobDir}\\mRemoteV1.sln\""
def msBuild = "C:\\Program Files (x86)\\Microsoft Visual Studio\\2017\\Community\\MSBuild\\15.0\\Bin\\msbuild.exe"
def nunitConsolePath = "${jobDir}\\packages\\NUnit.ConsoleRunner.3.7.0\\tools\\nunit3-console.exe"
def openCoverPath = "${jobDir}\\packages\\OpenCover.4.6.519\\tools\\OpenCover.Console.exe"
def reportGeneratorPath = "${jobDir}\\packages\\ReportGenerator.3.0.2\\tools\\ReportGenerator.exe"
def testResultFilePrefix = "TestResult"
def testResultFileNormal = "${testResultFilePrefix}_UnitTests_normal.xml"
def testResultFilePortable = "${testResultFilePrefix}_UnitTests_portable.xml"
def testResultFileAcceptance = "${testResultFilePrefix}_AcceptanceTests.xml"
def coverageReport = "code_coverage_report.xml"
def codeCoverageHtml = "CodeCoverageReport.html"
stage ('Checkout Branch') {
checkout scm
bat "del /Q \"${jobDir}\\${testResultFilePrefix}*.xml\""
}
stage ('Restore NuGet Packages') {
def nugetPath = "C:\\nuget.exe"
bat "${nugetPath} restore ${solutionFilePath}"
}
stage ('Build mRemoteNG (Normal)') {
bat "\"${msBuild}\" /nologo /p:Platform=x86 \"${jobDir}\\mRemoteV1.sln\""
}
stage ('Build mRemoteNG (Portable)') {
bat "\"${msBuild}\" /nologo /p:Configuration=\"Debug Portable\";Platform=x86 \"${jobDir}\\mRemoteV1.sln\""
}
stage ('Run Unit Tests (Normal, w/coverage)') {
try {
bat "\"${openCoverPath}\" -register:user -target:\"${nunitConsolePath}\" -targetargs:\"\"${jobDir}\\mRemoteNGTests\\bin\\debug\\mRemoteNGTests.dll\" --result=${testResultFileNormal} --x86\" -output:\"${coverageReport}\""
}
catch (ex) {
nunit testResultsPattern: "${testResultFilePrefix}*.xml"
throw ex
}
}
stage ('Run Unit Tests (Portable)') {
try {
bat "\"${nunitConsolePath}\" \"${jobDir}\\mRemoteNGTests\\bin\\debug portable\\mRemoteNGTests.dll\" --result=${testResultFilePortable} --x86"
}
catch (ex) {
nunit testResultsPattern: "${testResultFilePrefix}*.xml"
throw ex
}
}
stage ('Run Acceptance Tests') {
try {
bat "\"${nunitConsolePath}\" \"${jobDir}\\mRemoteNG.Specs\\bin\\debug\\mRemoteNG.Specs.dll\" --result=${testResultFileAcceptance} --x86"
}
catch (ex) {
nunit testResultsPattern: "${testResultFilePrefix}*.xml"
throw ex
}
}
}

View File

@@ -1,71 +0,0 @@
node('windows') {
def jobDir = pwd()
def solutionFilePath = "\"${jobDir}\\mRemoteV1.sln\""
def msBuild = "C:\\Program Files (x86)\\Microsoft Visual Studio\\2017\\Community\\MSBuild\\15.0\\Bin\\msbuild.exe"
def nunitConsolePath = "${jobDir}\\packages\\NUnit.ConsoleRunner.3.10.0\\tools\\nunit3-console.exe"
def openCoverPath = "${jobDir}\\packages\\OpenCover.4.6.519\\tools\\OpenCover.Console.exe"
def testResultFilePrefix = "TestResult"
def testResultFileNormal = "${testResultFilePrefix}_UnitTests_normal.xml"
def testResultFilePortable = "${testResultFilePrefix}_UnitTests_portable.xml"
def coverageReport = "code_coverage_report.xml"
stage ('Clean output dir') {
bat script: "rmdir /S /Q \"${jobDir}\\Release\" 2>nul", returnStatus: true
}
stage ('Checkout Branch') {
checkout([
$class: 'GitSCM',
branches: [[name: '*/${TargetBranch}']],
doGenerateSubmoduleConfigurations: false,
extensions: [],
submoduleCfg: [],
userRemoteConfigs: [[
credentialsId: '9c3fbff4-5b90-402f-a298-00e607fcec87',
url: 'https://github.com/mRemoteNG/mRemoteNG.git'
]]
])
}
stage ('Restore NuGet Packages') {
def nugetPath = "C:\\nuget.exe"
bat "${nugetPath} restore ${solutionFilePath}"
}
withCredentials([file(credentialsId: '9b674d57-6792-48e3-984a-4d1bab2abb64', variable: 'CODE_SIGNING_CERT')]) {
withCredentials([usernamePassword(credentialsId: '05b7449b-05c0-490f-8661-236242526e62', passwordVariable: 'MRNG_CERT_PASSWORD', usernameVariable: 'NO_USERNAME')]) {
stage ('Build mRemoteNG (Normal - MSI)') {
bat "\"${msBuild}\" /nologo /t:Clean,Build /p:Configuration=\"Release Installer\" /p:Platform=x86 /p:CertPath=\"${env.CODE_SIGNING_CERT}\" /p:CertPassword=${env.MRNG_CERT_PASSWORD} \"${jobDir}\\mRemoteV1.sln\""
archiveArtifacts artifacts: "Release\\*.msi", caseSensitive: false, onlyIfSuccessful: true, fingerprint: true
}
stage ('Build mRemoteNG (Portable)') {
bat "\"${msBuild}\" /nologo /t:Clean,Build /p:Configuration=\"Release Portable\" /p:Platform=x86 /p:CertPath=\"${env.CODE_SIGNING_CERT}\" /p:CertPassword=${env.MRNG_CERT_PASSWORD} \"${jobDir}\\mRemoteV1.sln\""
archiveArtifacts artifacts: "Release\\*.zip", caseSensitive: false, onlyIfSuccessful: true, fingerprint: true
}
}
}
stage ('Run Unit Tests (Normal - MSI)') {
bat "\"${nunitConsolePath}\" \"${jobDir}\\mRemoteNGTests\\bin\\release\\mRemoteNGTests.dll\" --result=${testResultFileNormal} --x86"
}
stage ('Run Unit Tests (Portable)') {
bat "\"${nunitConsolePath}\" \"${jobDir}\\mRemoteNGTests\\bin\\release portable\\mRemoteNGTests.dll\" --result=${testResultFilePortable} --x86"
}
stage ('Generate UpdateCheck Files') {
bat "powershell -ExecutionPolicy Bypass -File \"${jobDir}\\Tools\\create_upg_chk_files.ps1\" -TagName \"${env.TagName}\" -UpdateChannel \"${env.UpdateChannel}\""
archiveArtifacts artifacts: "Release\\*.txt", caseSensitive: false, onlyIfSuccessful: true
}
stage ('Publish to GitHub') {
withCredentials([string(credentialsId: '5443a369-dbe8-42d3-b4e8-04d0b4e9039a', variable: 'GH_AUTH_TOKEN')]) {
def releaseFolder = "${jobDir}\\Release"
// because batch files suck at handling newline characters, we have to convert to base64 in groovy and back to text in powershell
def base64Description = env.ReleaseDescription.bytes.encodeBase64().toString()
bat "powershell -ExecutionPolicy Bypass -File \"${jobDir}\\Tools\\publish_to_github.ps1\" -Owner \"mRemoteNG\" -Repository \"mRemoteNG\" -ReleaseTitle \"${env.ReleaseTitle}\" -TagName \"${env.TagName}\" -TargetCommitish \"${env.TargetBranch}\" -Description \"${base64Description}\" -IsDraft ${env.IsDraft} -IsPrerelease ${env.IsPreRelease} -ReleaseFolderPath \"${releaseFolder}\" -AuthToken \"${env.GH_AUTH_TOKEN}\" -DescriptionIsBase64Encoded"
}
}
}

View File

@@ -1,4 +1,4 @@
**NOTICE: This project is currently stalled and we are transitioning to a new maintainer. Please see [this stickied issue](https://github.com/mRemoteNG/mRemoteNG/issues/1949) for more details. Development help would be greatly appreciated.**
**NOTICE: This project currently transited to a new maintainer. Development help would be greatly appreciated.**
<br/><br/>
<p align="center">
@@ -49,6 +49,7 @@
| ---------------|--------------|-----------|
| Stable | [![Build status](https://ci.appveyor.com/api/projects/status/k0sdbxmq90fgdmj6/branch/master?svg=true)](https://ci.appveyor.com/project/mremoteng/mremoteng/branch/master) | [![Github Releases (by Release)](https://img.shields.io/github/downloads/mRemoteNG/mRemoteNG/v1.76.20/total.svg)](https://github.com/mRemoteNG/mRemoteNG/releases/tag/v1.76.20) |
| Prerelease | [![Build status](https://ci.appveyor.com/api/projects/status/k0sdbxmq90fgdmj6/branch/develop?svg=true)](https://ci.appveyor.com/project/mremoteng/mremoteng/branch/develop) | [![Github Releases (by Release)](https://img.shields.io/github/downloads/mRemoteNG/mRemoteNG/v1.77.1/total.svg)](https://github.com/mRemoteNG/mRemoteNG/releases/tag/v1.77.1) |
| Nightly build | [![Build status](https://ci.appveyor.com/api/projects/status/k0sdbxmq90fgdmj6/branch/develop?svg=true)](https://ci.appveyor.com/project/mremoteng/mremoteng/branch/develop) | [![Github Releases (by Release)](https://img.shields.io/github/downloads/mRemoteNG/mRemoteNG/v1.77.2-nb/total.svg)](https://github.com/mRemoteNG/mRemoteNG/releases/tag/v1.77.2-nb) |
## Features
@@ -69,6 +70,7 @@ For a detailed feature list and general usage support, refer to the [Documentati
### Supported Operating Systems
- [Windows 11](https://en.wikipedia.org/wiki/Windows_11)
- [Windows 10](https://en.wikipedia.org/wiki/Windows_10)
- [Windows 8.1](https://en.wikipedia.org/wiki/Windows_8.1)
- [Windows Server 2019](https://en.wikipedia.org/wiki/Windows_Server_2019)
@@ -100,8 +102,6 @@ You will need to compile it yourself using Visual Studio.
* [Microsoft .NET Framework 4.0](https://www.microsoft.com/en-us/download/details.aspx?id=17851)
* Microsoft Terminal Service Client 6.0 or later
* Needed if you use RDP. mstscax.dll and/or msrdp.ocx be registered.
* [Citrix ICA Client](https://www.citrix.com/downloads/citrix-receiver.html)
* Needed if you use ICA. wfica.ocx must be registered
### Download
@@ -163,6 +163,7 @@ _If you are using the Portable version, simply deleting the folder that contains
## Featured Projects
* [PSmRemoteNG](https://github.com/realslacker/PSmRemoteNG) A module to create mRemoteNG connection files from PowerShell.
* [mRemoteNGOpenVPN](https://github.com/T3los/mRemoteNGOpenVPN) A script that can be embedded as an external tool to control OpenVPN.
## Contribute

View File

@@ -0,0 +1,331 @@
using System.Collections;
using System.Collections.Generic;
using System.Windows.Forms;
//
// Hotkey selection control, written by serenity@exscape.org, 2006-08-03
// Please mail me if you find a bug.
//
namespace SharedLibraryNG
{
/// <summary>
/// A simple control that allows the user to select pretty much any valid hotkey combination
/// </summary>
public class HotkeyControl : TextBox
{
private const string KeySeparator = " + ";
// These variables store the current hotkey and modifier(s)
private Keys _keyCode = Keys.None;
private Keys _modifiers = Keys.None;
// ArrayLists used to enforce the use of proper modifiers.
// Shift+A isn't a valid hotkey, for instance, as it would screw up when the user is typing.
private readonly ArrayList _needNonShiftModifier;
private readonly ArrayList _needNonAltGrModifier;
private readonly ContextMenu _emptyContextMenu = new ContextMenu();
/// <summary>
/// Used to make sure that there is no right-click menu available
/// </summary>
public override ContextMenu ContextMenu
{
get
{
return _emptyContextMenu;
}
// ReSharper disable once ValueParameterNotUsed
set
{
base.ContextMenu = _emptyContextMenu;
}
}
/// <summary>
/// Forces the control to be non-multiline
/// </summary>
public override bool Multiline
{
get
{
return base.Multiline;
}
// ReSharper disable once ValueParameterNotUsed
set
{
// Ignore what the user wants; force Multiline to false
base.Multiline = false;
}
}
/// <summary>
/// Creates a new HotkeyControl
/// </summary>
public HotkeyControl()
{
// Handle events that occurs when keys are pressed
KeyUp += HotkeyControl_KeyUp;
// Fill the ArrayLists that contain all invalid hotkey combinations
_needNonShiftModifier = new ArrayList();
_needNonAltGrModifier = new ArrayList();
PopulateModifierLists();
}
protected override void OnCreateControl()
{
base.OnCreateControl();
ContextMenu = _emptyContextMenu; // Disable right-clicking
Multiline = false;
Text = "None";
}
/// <summary>
/// Populates the ArrayLists specifying disallowed hotkeys
/// such as Shift+A, Ctrl+Alt+4 (would produce a dollar sign) etc
/// </summary>
private void PopulateModifierLists()
{
// Shift + 0 - 9, A - Z
for (var k = Keys.D0; k <= Keys.Z; k++)
_needNonShiftModifier.Add((int)k);
// Shift + Numpad keys
for (var k = Keys.NumPad0; k <= Keys.NumPad9; k++)
_needNonShiftModifier.Add((int)k);
// Shift + Misc (,;<./ etc)
for (var k = Keys.Oem1; k <= Keys.OemBackslash; k++)
_needNonShiftModifier.Add((int)k);
// Misc keys that we can't loop through
_needNonShiftModifier.Add((int)Keys.Insert);
_needNonShiftModifier.Add((int)Keys.Help);
_needNonShiftModifier.Add((int)Keys.Multiply);
_needNonShiftModifier.Add((int)Keys.Add);
_needNonShiftModifier.Add((int)Keys.Subtract);
_needNonShiftModifier.Add((int)Keys.Divide);
_needNonShiftModifier.Add((int)Keys.Decimal);
_needNonShiftModifier.Add((int)Keys.Return);
_needNonShiftModifier.Add((int)Keys.Escape);
_needNonShiftModifier.Add((int)Keys.NumLock);
_needNonShiftModifier.Add((int)Keys.Scroll);
_needNonShiftModifier.Add((int)Keys.Pause);
// Ctrl+Alt + 0 - 9
for (var k = Keys.D0; k <= Keys.D9; k++)
_needNonAltGrModifier.Add((int)k);
}
/// <summary>
/// Fires when all keys are released. If the current hotkey isn't valid, reset it.
/// Otherwise, do nothing and keep the text and hotkey as it was.
/// </summary>
void HotkeyControl_KeyUp(object sender, KeyEventArgs e)
{
if (_keyCode == Keys.None && ModifierKeys == Keys.None) ResetHotkey();
}
/// <summary>
/// Handles some misc keys, such as Ctrl+Delete and Shift+Insert
/// </summary>
protected override bool ProcessCmdKey(ref Message msg, Keys keyData)
{
var keyCode = keyData & Keys.KeyCode;
var modifiers = keyData & Keys.Modifiers;
if (keyData == Keys.Back || keyData == Keys.Delete)
{
ResetHotkey();
return true;
}
_keyCode = keyCode;
_modifiers = modifiers;
Redraw();
return true;
}
/// <summary>
/// Clears the current hotkey and resets the TextBox
/// </summary>
public void ResetHotkey()
{
_keyCode = Keys.None;
_modifiers = Keys.None;
Text = "None";
}
/// <summary>
/// Used to get/set the hotkey (e.g. Keys.A)
/// </summary>
public Keys KeyCode
{
get
{
return _keyCode;
}
set
{
_keyCode = value;
Redraw(false);
}
}
/// <summary>
/// Used to get/set the modifier keys (e.g. Keys.Alt | Keys.Control)
/// </summary>
public Keys HotkeyModifiers
{
get
{
return _modifiers;
}
set
{
_modifiers = value;
Redraw(false);
}
}
/// <summary>
/// Redraws the TextBox when necessary.
/// </summary>
/// <param name="validate">Specifies whether this function was called by the Hotkey/HotkeyModifiers properties or by the user.</param>
private void Redraw(bool validate = true)
{
// Only validate input if it comes from the user
if (validate)
{
// No modifier or shift only, AND a hotkey that needs another modifier
if ((_modifiers == Keys.Shift || _modifiers == Keys.None) &&
_needNonShiftModifier.Contains((int) _keyCode))
{
if (_modifiers == Keys.None)
{
// Set Ctrl+Alt as the modifier unless Ctrl+Alt+<key> won't work...
if (_needNonAltGrModifier.Contains((int) _keyCode) == false)
_modifiers = Keys.Alt | Keys.Control;
else // ... in that case, use Shift+Alt instead.
_modifiers = Keys.Alt | Keys.Shift;
}
else
{
// User pressed Shift and an invalid key (e.g. a letter or a number),
// that needs another set of modifier keys
_keyCode = Keys.None;
Text = _modifiers + " + Invalid Key";
return;
}
}
// Check all Ctrl+Alt keys
if ((_modifiers == (Keys.Alt | Keys.Control)) &&
_needNonAltGrModifier.Contains((int) _keyCode))
{
// Ctrl+Alt+4 etc won't work; reset hotkey and tell the user
_keyCode = Keys.None;
Text = _modifiers + " + Invalid Key";
return;
}
}
// Don't allow modifiers keys for _keyCode
if (_keyCode == Keys.ShiftKey ||
_keyCode == Keys.LShiftKey ||
_keyCode == Keys.RShiftKey ||
_keyCode == Keys.ControlKey ||
_keyCode == Keys.LControlKey ||
_keyCode == Keys.RControlKey ||
_keyCode == Keys.Menu ||
_keyCode == Keys.LMenu ||
_keyCode == Keys.RMenu ||
_keyCode == Keys.LWin ||
_keyCode == Keys.RWin)
_keyCode = Keys.None;
if (_modifiers == Keys.None)
{
if (_keyCode == Keys.None)
{
ResetHotkey();
return;
}
// We get here if we've got a hotkey that is valid without a modifier,
// like F1-F12, Media-keys etc.
Text = _keyCode.ToString();
return;
}
Text = string.Join(KeySeparator, new[] { KeysToString(_modifiers), KeysToString(_keyCode) });
}
public static string KeysToString(Keys keys)
{
if (keys == Keys.None) return "None";
var modifiers = (keys & Keys.Modifiers);
var keyCode = (keys & Keys.KeyCode);
var strings = new List<string>();
if (modifiers != 0)
{
var modifierStrings = new List<string>(modifiers.ToString().Replace(", ", ",").Split(','));
modifierStrings.Sort(new KeyModifierComparer());
strings.AddRange(modifierStrings);
}
if (keyCode != 0)
{
var keyString = keyCode.ToString();
var keyHashtable = new Dictionary<string, string>
{
{"Next", "PageDown"},
{"Oemcomma", ","},
{"OemMinus", "-"},
{"OemOpenBrackets", "["},
{"OemPeriod", "."},
{"Oemplus", "="},
{"OemQuestion", "/"},
{"Oemtilde", "`"},
{"D0", "0"},
{"D1", "1"},
{"D2", "2"},
{"D3", "3"},
{"D4", "4"},
{"D5", "5"},
{"D6", "6"},
{"D7", "7"},
{"D8", "8"},
{"D9", "9"},
};
if (keyHashtable.ContainsKey(keyString)) keyString = keyHashtable[keyString];
strings.Add(keyString);
}
return string.Join(KeySeparator, strings.ToArray());
}
private class KeyModifierComparer : IComparer<string>
{
private static readonly List<string> ModifierOrder = new List<string>
{
"control",
"alt",
"shift",
};
public int Compare(string x, string y)
{
var xIndex = ModifierOrder.IndexOf(x.ToLowerInvariant());
var yIndex = ModifierOrder.IndexOf(y.ToLowerInvariant());
return xIndex - yIndex;
}
}
}
}

View File

@@ -0,0 +1,258 @@
//
// Based on code from Stephen Toub's MSDN blog at
// http://blogs.msdn.com/b/toub/archive/2006/05/03/589423.aspx
//
using System;
using System.ComponentModel;
using System.Diagnostics;
using System.Runtime.InteropServices;
using System.Collections.Generic;
namespace SharedLibraryNG
{
public class KeyboardHook
{
// ReSharper disable InconsistentNaming
[DllImport("user32.dll", CharSet = CharSet.Auto, SetLastError = true)]
[return: MarshalAs(UnmanagedType.Bool)]
public static extern bool PostMessage(IntPtr hWnd, Int32 Msg, IntPtr wParam, HookKeyMsgData lParam);
// ReSharper restore InconsistentNaming
[Flags]
public enum ModifierKeys
{
None = 0x0000,
Shift = 0x0001,
LeftShift = 0x002,
RightShift = 0x004,
Control = 0x0008,
LeftControl = 0x010,
RightControl = 0x20,
Alt = 0x0040,
LeftAlt = 0x0080,
RightAlt = 0x0100,
Win = 0x0200,
LeftWin = 0x0400,
RightWin = 0x0800,
}
protected class KeyNotificationEntry
: IEquatable<KeyNotificationEntry>
{
public IntPtr WindowHandle;
public Int32 KeyCode;
public ModifierKeys ModifierKeys;
public Boolean Block;
public bool Equals(KeyNotificationEntry obj)
{
return (WindowHandle == obj.WindowHandle &&
KeyCode == obj.KeyCode &&
ModifierKeys == obj.ModifierKeys &&
Block == obj.Block);
}
}
public const string HookKeyMsgName = "HOOKKEYMSG-{56BE0940-34DA-11E1-B308-C6714824019B}";
private static Int32 _hookKeyMsg;
public static Int32 HookKeyMsg
{
get
{
if (_hookKeyMsg == 0)
{
_hookKeyMsg = Win32.RegisterWindowMessage(HookKeyMsgName).ToInt32();
if (_hookKeyMsg == 0)
throw new Win32Exception(Marshal.GetLastWin32Error());
}
return _hookKeyMsg;
}
}
// this is a custom structure that will be passed to
// the requested hWnd via a WM_APP_HOOKKEYMSG message
[StructLayout(LayoutKind.Sequential)]
public class HookKeyMsgData
{
public Int32 KeyCode;
public ModifierKeys ModifierKeys;
public Boolean WasBlocked;
}
private static int _referenceCount;
private static IntPtr _hook;
private static readonly Win32.LowLevelKeyboardProcDelegate LowLevelKeyboardProcStaticDelegate = LowLevelKeyboardProc;
private static readonly List<KeyNotificationEntry> NotificationEntries = new List<KeyNotificationEntry>();
public KeyboardHook()
{
_referenceCount++;
SetHook();
}
~KeyboardHook()
{
_referenceCount--;
if (_referenceCount < 1) UnsetHook();
}
private static void SetHook()
{
if (_hook != IntPtr.Zero) return;
var curProcess = Process.GetCurrentProcess();
var curModule = curProcess.MainModule;
var hook = Win32.SetWindowsHookEx(Win32.WH_KEYBOARD_LL, LowLevelKeyboardProcStaticDelegate, Win32.GetModuleHandle(curModule.ModuleName), 0);
if (hook == IntPtr.Zero)
throw new Win32Exception(Marshal.GetLastWin32Error());
_hook = hook;
}
private static void UnsetHook()
{
if (_hook == IntPtr.Zero) return;
Win32.UnhookWindowsHookEx(_hook);
_hook = IntPtr.Zero;
}
private static IntPtr LowLevelKeyboardProc(Int32 nCode, IntPtr wParam, Win32.KBDLLHOOKSTRUCT lParam)
{
var wParamInt = wParam.ToInt32();
var result = 0;
if (nCode == Win32.HC_ACTION)
{
switch (wParamInt)
{
case Win32.WM_KEYDOWN:
case Win32.WM_SYSKEYDOWN:
case Win32.WM_KEYUP:
case Win32.WM_SYSKEYUP:
result = OnKey(wParamInt, lParam);
break;
}
}
if (result != 0) return new IntPtr(result);
return Win32.CallNextHookEx(_hook, nCode, wParam, lParam);
}
private static int OnKey(Int32 msg, Win32.KBDLLHOOKSTRUCT key)
{
var result = 0;
foreach (var notificationEntry in NotificationEntries)
if (GetFocusWindow() == notificationEntry.WindowHandle && notificationEntry.KeyCode == key.vkCode)
{
var modifierKeys = GetModifierKeyState();
if (!ModifierKeysMatch(notificationEntry.ModifierKeys, modifierKeys)) continue;
var wParam = new IntPtr(msg);
var lParam = new HookKeyMsgData
{
KeyCode = key.vkCode,
ModifierKeys = modifierKeys,
WasBlocked = notificationEntry.Block,
};
if (!PostMessage(notificationEntry.WindowHandle, HookKeyMsg, wParam, lParam))
throw new Win32Exception(Marshal.GetLastWin32Error());
if (notificationEntry.Block) result = 1;
}
return result;
}
private static IntPtr GetFocusWindow()
{
var guiThreadInfo = new Win32.GUITHREADINFO();
if (!Win32.GetGUIThreadInfo(0, guiThreadInfo))
throw new Win32Exception(Marshal.GetLastWin32Error());
return Win32.GetAncestor(guiThreadInfo.hwndFocus, Win32.GA_ROOT);
}
protected static Dictionary<Int32, ModifierKeys> ModifierKeyTable = new Dictionary<Int32, ModifierKeys>
{
{ Win32.VK_SHIFT, ModifierKeys.Shift },
{ Win32.VK_LSHIFT, ModifierKeys.LeftShift },
{ Win32.VK_RSHIFT, ModifierKeys.RightShift },
{ Win32.VK_CONTROL, ModifierKeys.Control },
{ Win32.VK_LCONTROL, ModifierKeys.LeftControl },
{ Win32.VK_RCONTROL, ModifierKeys.RightControl },
{ Win32.VK_MENU, ModifierKeys.Alt },
{ Win32.VK_LMENU, ModifierKeys.LeftAlt },
{ Win32.VK_RMENU, ModifierKeys.RightAlt },
{ Win32.VK_LWIN, ModifierKeys.LeftWin },
{ Win32.VK_RWIN, ModifierKeys.RightWin },
};
public static ModifierKeys GetModifierKeyState()
{
var modifierKeyState = ModifierKeys.None;
foreach (KeyValuePair<Int32, ModifierKeys> pair in ModifierKeyTable)
{
if ((Win32.GetAsyncKeyState(pair.Key) & Win32.KEYSTATE_PRESSED) != 0) modifierKeyState |= pair.Value;
}
if ((modifierKeyState & ModifierKeys.LeftWin) != 0) modifierKeyState |= ModifierKeys.Win;
if ((modifierKeyState & ModifierKeys.RightWin) != 0) modifierKeyState |= ModifierKeys.Win;
return modifierKeyState;
}
public static Boolean ModifierKeysMatch(ModifierKeys requestedKeys, ModifierKeys pressedKeys)
{
if ((requestedKeys & ModifierKeys.Shift) != 0) pressedKeys &= ~(ModifierKeys.LeftShift | ModifierKeys.RightShift);
if ((requestedKeys & ModifierKeys.Control) != 0) pressedKeys &= ~(ModifierKeys.LeftControl | ModifierKeys.RightControl);
if ((requestedKeys & ModifierKeys.Alt) != 0) pressedKeys &= ~(ModifierKeys.LeftAlt | ModifierKeys.RightAlt);
if ((requestedKeys & ModifierKeys.Win) != 0) pressedKeys &= ~(ModifierKeys.LeftWin | ModifierKeys.RightWin);
return requestedKeys == pressedKeys;
}
public static void RequestKeyNotification(IntPtr windowHandle, Int32 keyCode, Boolean block)
{
RequestKeyNotification(windowHandle, keyCode, ModifierKeys.None, block);
}
public static void RequestKeyNotification(IntPtr windowHandle, Int32 keyCode, ModifierKeys modifierKeys = ModifierKeys.None, Boolean block = false)
{
var newNotificationEntry = new KeyNotificationEntry
{
WindowHandle = windowHandle,
KeyCode = keyCode,
ModifierKeys = modifierKeys,
Block = block,
};
foreach (var notificationEntry in NotificationEntries)
if (notificationEntry == newNotificationEntry) return;
NotificationEntries.Add(newNotificationEntry);
}
public static void CancelKeyNotification(IntPtr windowHandle, Int32 keyCode, Boolean block)
{
CancelKeyNotification(windowHandle, keyCode, ModifierKeys.None, block);
}
public static void CancelKeyNotification(IntPtr windowHandle, Int32 keyCode, ModifierKeys modifierKeys = ModifierKeys.None, Boolean block = false)
{
var notificationEntry = new KeyNotificationEntry
{
WindowHandle = windowHandle,
KeyCode = keyCode,
ModifierKeys = modifierKeys,
Block = block,
};
NotificationEntries.Remove(notificationEntry);
}
}
}

View File

@@ -0,0 +1,36 @@
using System.Reflection;
using System.Runtime.CompilerServices;
using System.Runtime.InteropServices;
// General Information about an assembly is controlled through the following
// set of attributes. Change these attribute values to modify the information
// associated with an assembly.
[assembly: AssemblyTitle("SharedLibraryNG")]
[assembly: AssemblyDescription("")]
[assembly: AssemblyConfiguration("")]
[assembly: AssemblyCompany("")]
[assembly: AssemblyProduct("SharedLibraryNG")]
[assembly: AssemblyCopyright("Copyright © 2013")]
[assembly: AssemblyTrademark("")]
[assembly: AssemblyCulture("")]
// Setting ComVisible to false makes the types in this assembly not visible
// to COM components. If you need to access a type in this assembly from
// COM, set the ComVisible attribute to true on that type.
[assembly: ComVisible(false)]
// The following GUID is for the ID of the typelib if this project is exposed to COM
[assembly: Guid("f4470853-f933-4203-9d2a-b3c731e225c7")]
// Version information for an assembly consists of the following four values:
//
// Major Version
// Minor Version
// Build Number
// Revision
//
// You can specify all the values or you can default the Build and Revision Numbers
// by using the '*' as shown below:
// [assembly: AssemblyVersion("1.0.*")]
[assembly: AssemblyVersion("1.0.0.0")]
[assembly: AssemblyFileVersion("1.0.0.0")]

View File

@@ -0,0 +1,55 @@
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="4.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<PropertyGroup>
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
<ProductVersion>8.0.30703</ProductVersion>
<SchemaVersion>2.0</SchemaVersion>
<ProjectGuid>{0F615504-5F30-4CF2-8341-1DE7FEC95A23}</ProjectGuid>
<OutputType>Library</OutputType>
<AppDesignerFolder>Properties</AppDesignerFolder>
<RootNamespace>SharedLibraryNG</RootNamespace>
<AssemblyName>SharedLibraryNG</AssemblyName>
<TargetFrameworkVersion>v2.0</TargetFrameworkVersion>
<FileAlignment>512</FileAlignment>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
<DebugSymbols>true</DebugSymbols>
<DebugType>full</DebugType>
<Optimize>false</Optimize>
<OutputPath>bin\Debug\</OutputPath>
<DefineConstants>DEBUG;TRACE</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
<DebugType>pdbonly</DebugType>
<Optimize>true</Optimize>
<OutputPath>bin\Release\</OutputPath>
<DefineConstants>TRACE</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
</PropertyGroup>
<ItemGroup>
<Reference Include="System" />
<Reference Include="System.Data" />
<Reference Include="System.Windows.Forms" />
<Reference Include="System.Xml" />
</ItemGroup>
<ItemGroup>
<Compile Include="HotkeyControl.cs">
<SubType>Component</SubType>
</Compile>
<Compile Include="KeyboardHook.cs" />
<Compile Include="Properties\AssemblyInfo.cs" />
<Compile Include="Win32.cs" />
</ItemGroup>
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
<!-- To modify your build process, add your task inside one of the targets below and uncomment it.
Other similar extension points exist, see Microsoft.Common.targets.
<Target Name="BeforeBuild">
</Target>
<Target Name="AfterBuild">
</Target>
-->
</Project>

171
SharedLibraryNG/Win32.cs Normal file
View File

@@ -0,0 +1,171 @@
using System;
using System.Runtime.InteropServices;
namespace SharedLibraryNG
{
// ReSharper disable InconsistentNaming
public static class Win32
{
#region Functions
[DllImport("user32.dll", CharSet = CharSet.Auto, SetLastError = true)]
public static extern IntPtr SetWindowsHookEx(int idHook, LowLevelKeyboardProcDelegate lpfn, IntPtr hMod, Int32 dwThreadId);
[DllImport("user32.dll", CharSet = CharSet.Auto, SetLastError = true)]
[return: MarshalAs(UnmanagedType.Bool)]
public static extern bool UnhookWindowsHookEx(IntPtr hhk);
[DllImport("user32.dll", CharSet = CharSet.Auto, SetLastError = true)]
public static extern IntPtr CallNextHookEx(IntPtr hhk, int nCode, IntPtr wParam, KBDLLHOOKSTRUCT lParam);
[DllImport("kernel32.dll", CharSet = CharSet.Auto, SetLastError = true)]
public static extern IntPtr GetModuleHandle(string lpModuleName);
[DllImport("user32.dll", CharSet = CharSet.Auto, SetLastError = true)]
public static extern IntPtr RegisterWindowMessage(string lpString);
[DllImport("user32.dll", CharSet = CharSet.Auto, SetLastError = true)]
[return: MarshalAs(UnmanagedType.Bool)]
public static extern bool GetGUIThreadInfo(Int32 idThread, GUITHREADINFO lpgui);
[DllImport("user32.dll", CharSet = CharSet.Auto, SetLastError = true)]
public static extern IntPtr GetAncestor(IntPtr hwnd, UInt32 gaFlags);
[DllImport("user32.dll", CharSet = CharSet.Auto, SetLastError = true)]
public static extern Int16 GetAsyncKeyState(Int32 vKey);
#endregion
#region Delegates
public delegate IntPtr LowLevelKeyboardProcDelegate(Int32 nCode, IntPtr wParam, KBDLLHOOKSTRUCT lParam);
#endregion
#region Structures
[StructLayout(LayoutKind.Sequential)]
public class KBDLLHOOKSTRUCT
{
public Int32 vkCode;
public Int32 scanCode;
public Int32 flags;
public Int32 time;
public IntPtr dwExtraInfo;
};
[StructLayout(LayoutKind.Sequential)]
public struct RECT
{
public int left;
public int top;
public int right;
public int bottom;
}
[StructLayout(LayoutKind.Sequential)]
public class GUITHREADINFO
{
public GUITHREADINFO()
{
cbSize = Convert.ToInt32(Marshal.SizeOf(this));
}
public Int32 cbSize;
public Int32 flags;
public IntPtr hwndActive;
public IntPtr hwndFocus;
public IntPtr hwndCapture;
public IntPtr hwndMenuOwner;
public IntPtr hwndMoveSize;
public IntPtr hwndCaret;
public RECT rcCaret;
}
#endregion
#region Constants
// GetAncestor
public const int GA_ROOT = 2;
// SetWindowsHookEx
public const int WH_KEYBOARD_LL = 13;
// LowLevelKeyboardProcDelegate
public const int HC_ACTION = 0;
// SendMessage
public const int WM_KEYDOWN = 0x0100;
public const int WM_KEYUP = 0x0101;
public const int WM_SYSKEYDOWN = 0x0104;
public const int WM_SYSKEYUP = 0x0105;
// GetAsyncKeyState
public const int KEYSTATE_PRESSED = 0x8000;
#region Virtual Keys
public const int VK_CANCEL = 0x0003;
public const int VK_BACK = 0x0008;
public const int VK_TAB = 0x0009;
public const int VK_CLEAR = 0x000C;
public const int VK_RETURN = 0x000D;
public const int VK_PAUSE = 0x0013;
public const int VK_ESCAPE = 0x001B;
public const int VK_SNAPSHOT = 0x002C;
public const int VK_INSERT = 0x002D;
public const int VK_DELETE = 0x002E;
public const int VK_HOME = 0x0024;
public const int VK_END = 0x0023;
public const int VK_PRIOR = 0x0021;
public const int VK_NEXT = 0x0022;
public const int VK_LEFT = 0x0025;
public const int VK_UP = 0x0026;
public const int VK_RIGHT = 0x0027;
public const int VK_DOWN = 0x0028;
public const int VK_SELECT = 0x0029;
public const int VK_PRINT = 0x002A;
public const int VK_EXECUTE = 0x002B;
public const int VK_HELP = 0x002F;
public const int VK_LWIN = 0x005B;
public const int VK_RWIN = 0x005C;
public const int VK_APPS = 0x005D;
public const int VK_F1 = 0x0070;
public const int VK_F2 = 0x0071;
public const int VK_F3 = 0x0072;
public const int VK_F4 = 0x0073;
public const int VK_F5 = 0x0074;
public const int VK_F6 = 0x0075;
public const int VK_F7 = 0x0076;
public const int VK_F8 = 0x0077;
public const int VK_F9 = 0x0078;
public const int VK_F10 = 0x0079;
public const int VK_F11 = 0x007A;
public const int VK_F12 = 0x007B;
public const int VK_SHIFT = 0x0010;
public const int VK_LSHIFT = 0x00A0;
public const int VK_RSHIFT = 0x00A1;
public const int VK_CONTROL = 0x0011;
public const int VK_LCONTROL = 0x00A2;
public const int VK_RCONTROL = 0x00A3;
public const int VK_MENU = 0x0012;
public const int VK_LMENU = 0x00A4;
public const int VK_RMENU = 0x00A5;
public const int VK_OEM_1 = 0x00BA;
public const int VK_OEM_2 = 0x00BF;
public const int VK_OEM_3 = 0x00C0;
public const int VK_OEM_4 = 0x00DB;
public const int VK_OEM_5 = 0x00DC;
public const int VK_OEM_6 = 0x00DD;
public const int VK_OEM_7 = 0x00DE;
public const int VK_OEM_8 = 0x00DF;
public const int VK_OEM_102 = 0x00E2;
#endregion
#endregion
// ReSharper restore InconsistentNaming
}
}

View File

@@ -18,6 +18,8 @@ Project("{930C7802-8A8C-48F9-8165-68863BCCD9DD}") = "Installer", "mRemoteNGInsta
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "mRemoteNGSpecs", "mRemoteNGSpecs\mRemoteNGSpecs.csproj", "{16AA21E2-D6B7-427D-AB7D-AA8C611B724E}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "SharedLibraryNG", "SharedLibraryNG\SharedLibraryNG.csproj", "{0F615504-5F30-4CF2-8341-1DE7FEC95A23}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug Portable|Any CPU = Debug Portable|Any CPU
@@ -118,6 +120,26 @@ Global
{16AA21E2-D6B7-427D-AB7D-AA8C611B724E}.Release|Any CPU.ActiveCfg = Release|x86
{16AA21E2-D6B7-427D-AB7D-AA8C611B724E}.Release|x86.ActiveCfg = Release|x86
{16AA21E2-D6B7-427D-AB7D-AA8C611B724E}.Release|x86.Build.0 = Release|x86
{0F615504-5F30-4CF2-8341-1DE7FEC95A23}.Debug Portable|Any CPU.ActiveCfg = Debug|Any CPU
{0F615504-5F30-4CF2-8341-1DE7FEC95A23}.Debug Portable|Any CPU.Build.0 = Debug|Any CPU
{0F615504-5F30-4CF2-8341-1DE7FEC95A23}.Debug Portable|x86.ActiveCfg = Debug|Any CPU
{0F615504-5F30-4CF2-8341-1DE7FEC95A23}.Debug Portable|x86.Build.0 = Debug|Any CPU
{0F615504-5F30-4CF2-8341-1DE7FEC95A23}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{0F615504-5F30-4CF2-8341-1DE7FEC95A23}.Debug|Any CPU.Build.0 = Debug|Any CPU
{0F615504-5F30-4CF2-8341-1DE7FEC95A23}.Debug|x86.ActiveCfg = Debug|Any CPU
{0F615504-5F30-4CF2-8341-1DE7FEC95A23}.Debug|x86.Build.0 = Debug|Any CPU
{0F615504-5F30-4CF2-8341-1DE7FEC95A23}.Release Installer|Any CPU.ActiveCfg = Release|Any CPU
{0F615504-5F30-4CF2-8341-1DE7FEC95A23}.Release Installer|Any CPU.Build.0 = Release|Any CPU
{0F615504-5F30-4CF2-8341-1DE7FEC95A23}.Release Installer|x86.ActiveCfg = Release|Any CPU
{0F615504-5F30-4CF2-8341-1DE7FEC95A23}.Release Installer|x86.Build.0 = Release|Any CPU
{0F615504-5F30-4CF2-8341-1DE7FEC95A23}.Release Portable|Any CPU.ActiveCfg = Release|Any CPU
{0F615504-5F30-4CF2-8341-1DE7FEC95A23}.Release Portable|Any CPU.Build.0 = Release|Any CPU
{0F615504-5F30-4CF2-8341-1DE7FEC95A23}.Release Portable|x86.ActiveCfg = Release|Any CPU
{0F615504-5F30-4CF2-8341-1DE7FEC95A23}.Release Portable|x86.Build.0 = Release|Any CPU
{0F615504-5F30-4CF2-8341-1DE7FEC95A23}.Release|Any CPU.ActiveCfg = Release|Any CPU
{0F615504-5F30-4CF2-8341-1DE7FEC95A23}.Release|Any CPU.Build.0 = Release|Any CPU
{0F615504-5F30-4CF2-8341-1DE7FEC95A23}.Release|x86.ActiveCfg = Release|Any CPU
{0F615504-5F30-4CF2-8341-1DE7FEC95A23}.Release|x86.Build.0 = Release|Any CPU
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE

View File

@@ -27,7 +27,8 @@ WinSCP is a free GUI Secure Copy program.
- Filename: C:\\Program Files\\WinSCP\\WinSCP.exe (example path)
- Arguments: scp://%Username%:%Password%@%Hostname%/
- Can integrate: Unknown
- Optional Arguments - turn on compression and ignore any host key errors: -rawsetting Compression=1 -hostkey=*
- Can integrate: No
`FileZilla S/FTP <https://filezilla-project.org/>`_
===================================================

View File

@@ -12,7 +12,7 @@ namespace mRemoteNG.Properties {
[global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.VisualStudio.Editors.SettingsDesigner.SettingsSingleFileGenerator", "16.6.0.0")]
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.VisualStudio.Editors.SettingsDesigner.SettingsSingleFileGenerator", "16.10.0.0")]
internal sealed partial class Settings : global::System.Configuration.ApplicationSettingsBase {
private static Settings defaultInstance = ((Settings)(global::System.Configuration.ApplicationSettingsBase.Synchronized(new Settings())));
@@ -3094,7 +3094,7 @@ namespace mRemoteNG.Properties {
this["ConDefaultDisableCursorBlinking"] = value;
}
}
[global::System.Configuration.UserScopedSettingAttribute()]
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
[global::System.Configuration.DefaultSettingValueAttribute("")]
@@ -3106,5 +3106,41 @@ namespace mRemoteNG.Properties {
this["ConDefaultStartProgram"] = value;
}
}
[global::System.Configuration.UserScopedSettingAttribute()]
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
[global::System.Configuration.DefaultSettingValueAttribute("EncrBasic")]
public string ConDefaultICAEncryptionStrength {
get {
return ((string)(this["ConDefaultICAEncryptionStrength"]));
}
set {
this["ConDefaultICAEncryptionStrength"] = value;
}
}
[global::System.Configuration.UserScopedSettingAttribute()]
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
[global::System.Configuration.DefaultSettingValueAttribute("False")]
public string InhDefaultICAEncryptionStrength {
get {
return ((string)(this["InhDefaultICAEncryptionStrength"]));
}
set {
this["InhDefaultICAEncryptionStrength"] = value;
}
}
[global::System.Configuration.UserScopedSettingAttribute()]
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
[global::System.Configuration.DefaultSettingValueAttribute("False")]
public bool StartFullScreen {
get {
return ((bool)(this["StartFullScreen"]));
}
set {
this["StartFullScreen"] = value;
}
}
}
}

View File

@@ -773,5 +773,14 @@
<Setting Name="ConDefaultStartProgram" Type="System.String" Scope="User">
<Value Profile="(Default)" />
</Setting>
<Setting Name="ConDefaultICAEncryptionStrength" Type="System.String" Scope="User">
<Value Profile="(Default)">EncrBasic</Value>
</Setting>
<Setting Name="InhDefaultICAEncryptionStrength" Type="System.String" Scope="User">
<Value Profile="(Default)">False</Value>
</Setting>
<Setting Name="StartFullScreen" Type="System.Boolean" Scope="User">
<Value Profile="(Default)">False</Value>
</Setting>
</Settings>
</SettingsFile>

View File

@@ -5849,7 +5849,18 @@ namespace mRemoteNG.Resources.Language {
return ResourceManager.GetString("StartMinimized", resourceCulture);
}
}
/// <summary>
/// Looks up a localized string similar to Start minimized.
/// </summary>
internal static string StartFullScreen
{
get
{
return ResourceManager.GetString("StartFullScreen", resourceCulture);
}
}
/// <summary>
/// Looks up a localized string similar to Startup/Exit.
/// </summary>

Binary file not shown.

View File

@@ -1,4 +1,6 @@
using System.Windows.Forms;
using System;
using System.Runtime.InteropServices;
using System.Windows.Forms;
namespace mRemoteNG.UI.Forms
{
@@ -6,7 +8,23 @@ namespace mRemoteNG.UI.Forms
{
static FrmSplashScreen instance = null;
private FrmSplashScreen() => InitializeComponent();
private FrmSplashScreen()
{
InitializeComponent();
Region = System.Drawing.Region.FromHrgn(CreateRoundRectRgn(0, 0, Width, Height, 20, 20));
}
[DllImport("Gdi32.dll", EntryPoint = "CreateRoundRectRgn")]
private static extern IntPtr CreateRoundRectRgn
(
int nLeftRect, // x-coordinate of upper-left corner
int nTopRect, // y-coordinate of upper-left corner
int nRightRect, // x-coordinate of lower-right corner
int nBottomRect, // y-coordinate of lower-right corner
int nWidthEllipse, // width of ellipse
int nHeightEllipse // height of ellipse
);
public static FrmSplashScreen getInstance()
{

View File

@@ -1,4 +1,4 @@

using mRemoteNG.UI.Controls;
@@ -33,16 +33,17 @@ namespace mRemoteNG.UI.Forms.OptionsPages
[System.Diagnostics.DebuggerStepThrough()]
private void InitializeComponent()
{
this.chkReconnectOnStart = new MrngCheckBox();
this.chkSaveConsOnExit = new MrngCheckBox();
this.chkSingleInstance = new MrngCheckBox();
this.chkProperInstallationOfComponentsAtStartup = new MrngCheckBox();
this.chkStartMinimized = new MrngCheckBox();
this.chkReconnectOnStart = new mRemoteNG.UI.Controls.MrngCheckBox();
this.chkSaveConsOnExit = new mRemoteNG.UI.Controls.MrngCheckBox();
this.chkSingleInstance = new mRemoteNG.UI.Controls.MrngCheckBox();
this.chkProperInstallationOfComponentsAtStartup = new mRemoteNG.UI.Controls.MrngCheckBox();
this.chkStartMinimized = new mRemoteNG.UI.Controls.MrngCheckBox();
this.chkStartFullScreen = new mRemoteNG.UI.Controls.MrngCheckBox();
this.SuspendLayout();
//
// chkReconnectOnStart
//
this.chkReconnectOnStart._mice = MrngCheckBox.MouseState.OUT;
this.chkReconnectOnStart._mice = mRemoteNG.UI.Controls.MrngCheckBox.MouseState.OUT;
this.chkReconnectOnStart.AutoSize = true;
this.chkReconnectOnStart.Font = new System.Drawing.Font("Segoe UI", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
this.chkReconnectOnStart.Location = new System.Drawing.Point(3, 26);
@@ -54,7 +55,7 @@ namespace mRemoteNG.UI.Forms.OptionsPages
//
// chkSaveConsOnExit
//
this.chkSaveConsOnExit._mice = MrngCheckBox.MouseState.OUT;
this.chkSaveConsOnExit._mice = mRemoteNG.UI.Controls.MrngCheckBox.MouseState.OUT;
this.chkSaveConsOnExit.AutoSize = true;
this.chkSaveConsOnExit.Font = new System.Drawing.Font("Segoe UI", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
this.chkSaveConsOnExit.Location = new System.Drawing.Point(3, 2);
@@ -66,7 +67,7 @@ namespace mRemoteNG.UI.Forms.OptionsPages
//
// chkSingleInstance
//
this.chkSingleInstance._mice = MrngCheckBox.MouseState.OUT;
this.chkSingleInstance._mice = mRemoteNG.UI.Controls.MrngCheckBox.MouseState.OUT;
this.chkSingleInstance.AutoSize = true;
this.chkSingleInstance.Font = new System.Drawing.Font("Segoe UI", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
this.chkSingleInstance.Location = new System.Drawing.Point(3, 50);
@@ -78,7 +79,7 @@ namespace mRemoteNG.UI.Forms.OptionsPages
//
// chkProperInstallationOfComponentsAtStartup
//
this.chkProperInstallationOfComponentsAtStartup._mice = MrngCheckBox.MouseState.OUT;
this.chkProperInstallationOfComponentsAtStartup._mice = mRemoteNG.UI.Controls.MrngCheckBox.MouseState.OUT;
this.chkProperInstallationOfComponentsAtStartup.AutoSize = true;
this.chkProperInstallationOfComponentsAtStartup.Font = new System.Drawing.Font("Segoe UI", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
this.chkProperInstallationOfComponentsAtStartup.Location = new System.Drawing.Point(3, 74);
@@ -90,7 +91,7 @@ namespace mRemoteNG.UI.Forms.OptionsPages
//
// chkStartMinimized
//
this.chkStartMinimized._mice = MrngCheckBox.MouseState.OUT;
this.chkStartMinimized._mice = mRemoteNG.UI.Controls.MrngCheckBox.MouseState.OUT;
this.chkStartMinimized.AutoSize = true;
this.chkStartMinimized.Font = new System.Drawing.Font("Segoe UI", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
this.chkStartMinimized.Location = new System.Drawing.Point(3, 97);
@@ -99,11 +100,26 @@ namespace mRemoteNG.UI.Forms.OptionsPages
this.chkStartMinimized.TabIndex = 3;
this.chkStartMinimized.Text = "Start minimized";
this.chkStartMinimized.UseVisualStyleBackColor = true;
this.chkStartMinimized.CheckedChanged += new System.EventHandler(this.chkStartMinimized_CheckedChanged);
//
// chkStartFullScreen
//
this.chkStartFullScreen._mice = mRemoteNG.UI.Controls.MrngCheckBox.MouseState.OUT;
this.chkStartFullScreen.AutoSize = true;
this.chkStartFullScreen.Font = new System.Drawing.Font("Segoe UI", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
this.chkStartFullScreen.Location = new System.Drawing.Point(3, 120);
this.chkStartFullScreen.Name = "chkStartFullScreen";
this.chkStartFullScreen.Size = new System.Drawing.Size(109, 17);
this.chkStartFullScreen.TabIndex = 4;
this.chkStartFullScreen.Text = "Start Full Screen";
this.chkStartFullScreen.UseVisualStyleBackColor = true;
this.chkStartFullScreen.CheckedChanged += new System.EventHandler(this.chkStartFullScreen_CheckedChanged);
//
// StartupExitPage
//
this.AutoScaleDimensions = new System.Drawing.SizeF(96F, 96F);
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Dpi;
this.Controls.Add(this.chkStartFullScreen);
this.Controls.Add(this.chkReconnectOnStart);
this.Controls.Add(this.chkSaveConsOnExit);
this.Controls.Add(this.chkSingleInstance);
@@ -121,5 +137,6 @@ namespace mRemoteNG.UI.Forms.OptionsPages
internal MrngCheckBox chkSingleInstance;
internal MrngCheckBox chkProperInstallationOfComponentsAtStartup;
internal MrngCheckBox chkStartMinimized;
internal MrngCheckBox chkStartFullScreen;
}
}

View File

@@ -38,6 +38,7 @@ namespace mRemoteNG.UI.Forms.OptionsPages
Settings.Default.OpenConsFromLastSession = chkReconnectOnStart.Checked;
Settings.Default.SingleInstance = chkSingleInstance.Checked;
Settings.Default.StartMinimized = chkStartMinimized.Checked;
Settings.Default.StartFullScreen = chkStartFullScreen.Checked;
}
private void StartupExitPage_Load(object sender, EventArgs e)
@@ -46,6 +47,24 @@ namespace mRemoteNG.UI.Forms.OptionsPages
chkReconnectOnStart.Checked = Settings.Default.OpenConsFromLastSession;
chkSingleInstance.Checked = Settings.Default.SingleInstance;
chkStartMinimized.Checked = Settings.Default.StartMinimized;
chkStartFullScreen.Checked = Settings.Default.StartFullScreen;
;
}
private void chkStartFullScreen_CheckedChanged(object sender, EventArgs e)
{
if (chkStartFullScreen.Checked && chkStartMinimized.Checked)
{
chkStartMinimized.Checked = false;
}
}
private void chkStartMinimized_CheckedChanged(object sender, EventArgs e)
{
if (chkStartMinimized.Checked && chkStartFullScreen.Checked)
{
chkStartFullScreen.Checked = false;
}
}
}
}

View File

@@ -60,7 +60,7 @@
this.pnlDock.DocumentStyle = WeifenLuo.WinFormsUI.Docking.DocumentStyle.DockingSdi;
this.pnlDock.Location = new System.Drawing.Point(0, 0);
this.pnlDock.Name = "pnlDock";
this.pnlDock.Size = new System.Drawing.Size(1129, 471);
this.pnlDock.Size = new System.Drawing.Size(1129, 496);
this.pnlDock.TabIndex = 13;
this.pnlDock.ActiveDocumentChanged += new System.EventHandler(this.pnlDock_ActiveDocumentChanged);
//
@@ -78,7 +78,7 @@
this.msMain.Location = new System.Drawing.Point(3, 50);
this.msMain.Name = "msMain";
this.msMain.Padding = new System.Windows.Forms.Padding(0, 0, 1, 0);
this.msMain.Size = new System.Drawing.Size(184, 25);
this.msMain.Size = new System.Drawing.Size(303, 25);
this.msMain.Stretch = false;
this.msMain.TabIndex = 0;
this.msMain.Text = "Main Toolbar";
@@ -112,7 +112,7 @@
this.toolsMenu.MainForm = null;
this.toolsMenu.Margin = new System.Windows.Forms.Padding(0, 3, 0, 3);
this.toolsMenu.Name = "mMenTools";
this.toolsMenu.Size = new System.Drawing.Size(47, 19);
this.toolsMenu.Size = new System.Drawing.Size(46, 19);
this.toolsMenu.Text = "&Tools";
//
// helpMenu
@@ -134,7 +134,7 @@
// tsContainer.ContentPanel
//
this.tsContainer.ContentPanel.Controls.Add(this.pnlDock);
this.tsContainer.ContentPanel.Size = new System.Drawing.Size(1129, 471);
this.tsContainer.ContentPanel.Size = new System.Drawing.Size(1129, 496);
this.tsContainer.Dock = System.Windows.Forms.DockStyle.Fill;
this.tsContainer.Location = new System.Drawing.Point(0, 0);
this.tsContainer.Name = "tsContainer";
@@ -144,9 +144,9 @@
//
// tsContainer.TopToolStripPanel
//
this.tsContainer.TopToolStripPanel.Controls.Add(this.msMain);
this.tsContainer.TopToolStripPanel.Controls.Add(this._quickConnectToolStrip);
this.tsContainer.TopToolStripPanel.Controls.Add(this._multiSshToolStrip);
this.tsContainer.TopToolStripPanel.Controls.Add(this.msMain);
this.tsContainer.TopToolStripPanel.Controls.Add(this._externalToolsToolStrip);
this.tsContainer.TopToolStripPanel.RenderMode = System.Windows.Forms.ToolStripRenderMode.Professional;
//
@@ -156,15 +156,15 @@
this._quickConnectToolStrip.ConnectionInitiator = connectionInitiator1;
this._quickConnectToolStrip.Dock = System.Windows.Forms.DockStyle.None;
this._quickConnectToolStrip.ForeColor = System.Drawing.SystemColors.ControlText;
this._quickConnectToolStrip.Location = new System.Drawing.Point(3, 0);
this._quickConnectToolStrip.Location = new System.Drawing.Point(114, 25);
this._quickConnectToolStrip.Name = "_quickConnectToolStrip";
this._quickConnectToolStrip.Size = new System.Drawing.Size(364, 25);
this._quickConnectToolStrip.Size = new System.Drawing.Size(395, 25);
this._quickConnectToolStrip.TabIndex = 18;
//
// _multiSshToolStrip
//
this._multiSshToolStrip.Dock = System.Windows.Forms.DockStyle.None;
this._multiSshToolStrip.Location = new System.Drawing.Point(3, 25);
this._multiSshToolStrip.Location = new System.Drawing.Point(3, 0);
this._multiSshToolStrip.MinimumSize = new System.Drawing.Size(300, 0);
this._multiSshToolStrip.Name = "_multiSshToolStrip";
this._multiSshToolStrip.Size = new System.Drawing.Size(376, 25);
@@ -175,7 +175,7 @@
this._externalToolsToolStrip.BackColor = System.Drawing.SystemColors.Control;
this._externalToolsToolStrip.Dock = System.Windows.Forms.DockStyle.None;
this._externalToolsToolStrip.ForeColor = System.Drawing.SystemColors.ControlText;
this._externalToolsToolStrip.Location = new System.Drawing.Point(3, 75);
this._externalToolsToolStrip.Location = new System.Drawing.Point(3, 25);
this._externalToolsToolStrip.Name = "_externalToolsToolStrip";
this._externalToolsToolStrip.Size = new System.Drawing.Size(111, 25);
this._externalToolsToolStrip.TabIndex = 17;
@@ -201,6 +201,7 @@
this.MinimumSize = new System.Drawing.Size(400, 400);
this.Name = "FrmMain";
this.Opacity = 0D;
this.StartPosition = System.Windows.Forms.FormStartPosition.CenterScreen;
this.Text = " ";
this.FormClosing += new System.Windows.Forms.FormClosingEventHandler(this.frmMain_FormClosing);
this.Load += new System.EventHandler(this.FrmMain_Load);

View File

@@ -241,6 +241,10 @@ namespace mRemoteNG.UI.Forms
if (Settings.Default.MinimizeToTray)
ShowInTaskbar = false;
}
if (Settings.Default.StartFullScreen)
{
Fullscreen.Value = true;
}
if (!Settings.Default.CreateEmptyPanelOnStartUp) return;
var panelName = !string.IsNullOrEmpty(Settings.Default.StartUpPanelName)

View File

@@ -792,12 +792,18 @@
<setting name="ConDefaultDisableCursorBlinking" serializeAs="String">
<value>False</value>
</setting>
<setting name="ConDefaultStartProgram" serializeAs="String">
<value />
</setting>
<setting name="ConDefaultICAEncryptionStrength" serializeAs="String">
<value>EncrBasic</value>
</setting>
<setting name="InhDefaultICAEncryptionStrength" serializeAs="String">
<value>False</value>
</setting>
<setting name="StartFullScreen" serializeAs="String">
<value>False</value>
</setting>
</mRemoteNG.Settings>
</userSettings>
<applicationSettings>

View File

@@ -42,7 +42,7 @@
<UpdateRequired>false</UpdateRequired>
<MapFileExtensions>true</MapFileExtensions>
<ApplicationRevision>1</ApplicationRevision>
<ApplicationVersion>1.64.0.1</ApplicationVersion>
<ApplicationVersion>1.64.0.%2a</ApplicationVersion>
<UseApplicationTrust>false</UseApplicationTrust>
<PublishWizardCompleted>true</PublishWizardCompleted>
<BootstrapperEnabled>true</BootstrapperEnabled>
@@ -1567,10 +1567,10 @@
<Version>1.8.9</Version>
</PackageReference>
<PackageReference Include="CefSharp.Common">
<Version>91.1.210</Version>
<Version>91.1.211</Version>
</PackageReference>
<PackageReference Include="CefSharp.WinForms">
<Version>91.1.210</Version>
<Version>91.1.211</Version>
</PackageReference>
<PackageReference Include="ConsoleControl">
<Version>1.3.0</Version>
@@ -1734,4 +1734,8 @@ powershell.exe -ExecutionPolicy Bypass -File "$(SolutionDir)Tools\postbuild_mrem
<PropertyGroup>
<PreBuildEvent>echo $(ConfigurationName) &gt; buildenv.tmp</PreBuildEvent>
</PropertyGroup>
<PropertyGroup>
<AutoGenerateBindingRedirects>true</AutoGenerateBindingRedirects>
<GenerateBindingRedirectsOutputType>true</GenerateBindingRedirectsOutputType>
</PropertyGroup>
</Project>

File diff suppressed because it is too large Load Diff

View File

@@ -1,8 +1,8 @@
// ------------------------------------------------------------------------------
// <auto-generated>
// This code was generated by SpecFlow (https://www.specflow.org/).
// SpecFlow Version:3.8.0.0
// SpecFlow Generator Version:3.8.0.0
// SpecFlow Version:3.9.0.0
// SpecFlow Generator Version:3.9.0.0
//
// Changes to this file may cause incorrect behavior and will be lost if
// the code is regenerated.
@@ -17,7 +17,7 @@ namespace mRemoteNGSpecs.Features
using System.Linq;
[System.CodeDom.Compiler.GeneratedCodeAttribute("TechTalk.SpecFlow", "3.8.0.0")]
[System.CodeDom.Compiler.GeneratedCodeAttribute("TechTalk.SpecFlow", "3.9.0.0")]
[System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
[NUnit.Framework.TestFixtureAttribute()]
[NUnit.Framework.DescriptionAttribute("CredentialRepository")]

View File

@@ -1,8 +1,8 @@
// ------------------------------------------------------------------------------
// <auto-generated>
// This code was generated by SpecFlow (https://www.specflow.org/).
// SpecFlow Version:3.8.0.0
// SpecFlow Generator Version:3.8.0.0
// SpecFlow Version:3.9.0.0
// SpecFlow Generator Version:3.9.0.0
//
// Changes to this file may cause incorrect behavior and will be lost if
// the code is regenerated.
@@ -17,7 +17,7 @@ namespace mRemoteNGSpecs.Features
using System.Linq;
[System.CodeDom.Compiler.GeneratedCodeAttribute("TechTalk.SpecFlow", "3.8.0.0")]
[System.CodeDom.Compiler.GeneratedCodeAttribute("TechTalk.SpecFlow", "3.9.0.0")]
[System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
[NUnit.Framework.TestFixtureAttribute()]
[NUnit.Framework.DescriptionAttribute("CredentialRepositoryList")]

View File

@@ -322,7 +322,7 @@
<Version>4.7.1221</Version>
</PackageReference>
<PackageReference Include="ReportGenerator">
<Version>4.8.10</Version>
<Version>4.8.11</Version>
</PackageReference>
<PackageReference Include="System.Runtime.CompilerServices.Unsafe">
<Version>5.0.0</Version>