mirror of
https://github.com/Ylianst/MeshCentralRouter
synced 2026-01-07 18:53:14 +00:00
Added support for clipboard removal.
This commit is contained in:
@@ -21,7 +21,7 @@ namespace MeshCentralRouter
|
||||
{
|
||||
public partial class KVMSettingsForm : Form
|
||||
{
|
||||
public KVMSettingsForm()
|
||||
public KVMSettingsForm(int features2)
|
||||
{
|
||||
InitializeComponent();
|
||||
Translate.TranslateControl(this);
|
||||
@@ -51,6 +51,10 @@ namespace MeshCentralRouter
|
||||
qualityComboBox.SelectedIndex = 4;
|
||||
scalingComboBox.SelectedIndex = 0;
|
||||
frameRateComboBox.SelectedIndex = 1;
|
||||
if ((features2 & 0x1000) != 0) {
|
||||
this.Height -= (autoSendClipboardCheckBox.Top - remoteKeyboardMapCheckBox.Top);
|
||||
autoSendClipboardCheckBox.Visible = false;
|
||||
}
|
||||
}
|
||||
|
||||
private class DropListItem
|
||||
|
||||
14
KVMViewer.cs
14
KVMViewer.cs
@@ -358,8 +358,16 @@ namespace MeshCentralRouter
|
||||
}
|
||||
|
||||
cadButton.Enabled = (state == 3);
|
||||
clipInboundButton.Visible = !kvmControl.AutoSendClipboard;
|
||||
clipOutboundButton.Visible = !kvmControl.AutoSendClipboard;
|
||||
if ((kvmControl.AutoSendClipboard) && ((server.features2 & 0x1000) == 0)) // 0x1000 Clipboard Set
|
||||
{
|
||||
clipInboundButton.Visible = false;
|
||||
clipOutboundButton.Visible = false;
|
||||
}
|
||||
else
|
||||
{
|
||||
clipInboundButton.Visible = ((server.features2 & 0x0800) == 0); // 0x0800 Clipboard Get
|
||||
clipOutboundButton.Visible = ((server.features2 & 0x1000) == 0); // 0x1000 Clipboard Set
|
||||
}
|
||||
clipInboundButton.Enabled = (state == 3);
|
||||
clipOutboundButton.Enabled = (state == 3);
|
||||
}
|
||||
@@ -402,7 +410,7 @@ namespace MeshCentralRouter
|
||||
private void settingsToolStripMenuItem_Click(object sender, EventArgs e)
|
||||
{
|
||||
if (kvmControl == null) return;
|
||||
using (KVMSettingsForm form = new KVMSettingsForm())
|
||||
using (KVMSettingsForm form = new KVMSettingsForm(server.features2))
|
||||
{
|
||||
form.Compression = kvmControl.CompressionLevel;
|
||||
form.Scaling = kvmControl.ScalingLevel;
|
||||
|
||||
@@ -67,6 +67,8 @@ namespace MeshCentralRouter
|
||||
public Dictionary<string, ulong> userRights = null;
|
||||
public Dictionary<string, string> userGroups = null;
|
||||
private JavaScriptSerializer JSON = new JavaScriptSerializer();
|
||||
public int features = 0; // Bit flags of server features
|
||||
public int features2 = 0; // Bit flags of server features
|
||||
|
||||
// Mesh Rights
|
||||
/*
|
||||
@@ -237,6 +239,12 @@ namespace MeshCentralRouter
|
||||
}
|
||||
case "serverinfo":
|
||||
{
|
||||
// Get the bit flags of server features
|
||||
Dictionary<string, object> serverinfo = (Dictionary<string, object>)jsonAction["serverinfo"];
|
||||
if (serverinfo.ContainsKey("features") && (serverinfo["features"].GetType() == typeof(int))) { features = (int)serverinfo["features"]; }
|
||||
if (serverinfo.ContainsKey("features2") && (serverinfo["features2"].GetType() == typeof(int))) { features2 = (int)serverinfo["features2"]; }
|
||||
|
||||
// Ask for a lot of things from the server
|
||||
wc.WriteStringWebSocket("{\"action\":\"usergroups\"}");
|
||||
wc.WriteStringWebSocket("{\"action\":\"meshes\"}");
|
||||
wc.WriteStringWebSocket("{\"action\":\"nodes\"}");
|
||||
|
||||
Reference in New Issue
Block a user