mirror of
https://github.com/microsoft/PowerToys.git
synced 2026-04-04 18:26:39 +02:00
[New Utility]Mouse Without Borders
* Integrate Mouse Without Borders into PowerToys --------- Co-authored-by: Jaime Bernardo <jaime@janeasystems.com>
This commit is contained in:
committed by
Jaime Bernardo
parent
a0b9af039d
commit
29eebe16a4
60
src/modules/MouseWithoutBorders/App/Control/ColorBorderField.Designer.cs
generated
Normal file
60
src/modules/MouseWithoutBorders/App/Control/ColorBorderField.Designer.cs
generated
Normal file
@@ -0,0 +1,60 @@
|
||||
namespace MouseWithoutBorders
|
||||
{
|
||||
partial class ColorBorderField
|
||||
{
|
||||
/// <summary>
|
||||
/// Required designer variable.
|
||||
/// </summary>
|
||||
private System.ComponentModel.IContainer components = null;
|
||||
|
||||
/// <summary>
|
||||
/// Clean up any resources being used.
|
||||
/// </summary>
|
||||
/// <param name="disposing">true if managed resources should be disposed; otherwise, false.</param>
|
||||
protected override void Dispose(bool disposing)
|
||||
{
|
||||
if (disposing && (components != null))
|
||||
{
|
||||
components.Dispose();
|
||||
}
|
||||
base.Dispose(disposing);
|
||||
}
|
||||
|
||||
#region Component Designer generated code
|
||||
|
||||
/// <summary>
|
||||
/// Required method for Designer support - do not modify
|
||||
/// the contents of this method with the code editor.
|
||||
/// </summary>
|
||||
private void InitializeComponent()
|
||||
{
|
||||
this.InnerField = new System.Windows.Forms.TextBox();
|
||||
this.SuspendLayout();
|
||||
//
|
||||
// InnerField
|
||||
//
|
||||
this.InnerField.BorderStyle = System.Windows.Forms.BorderStyle.None;
|
||||
this.InnerField.Location = new System.Drawing.Point(3, 3);
|
||||
this.InnerField.Name = "InnerField";
|
||||
this.InnerField.Size = new System.Drawing.Size(100, 13);
|
||||
this.InnerField.TabIndex = 0;
|
||||
this.InnerField.WordWrap = false;
|
||||
//
|
||||
// ColorBorderField
|
||||
//
|
||||
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
|
||||
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
|
||||
this.Controls.Add(this.InnerField);
|
||||
this.Margin = new System.Windows.Forms.Padding(0);
|
||||
this.Name = "ColorBorderField";
|
||||
this.Size = new System.Drawing.Size(134, 36);
|
||||
this.ResumeLayout(false);
|
||||
this.PerformLayout();
|
||||
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
private System.Windows.Forms.TextBox InnerField;
|
||||
}
|
||||
}
|
||||
123
src/modules/MouseWithoutBorders/App/Control/ColorBorderField.cs
Normal file
123
src/modules/MouseWithoutBorders/App/Control/ColorBorderField.cs
Normal file
@@ -0,0 +1,123 @@
|
||||
// Copyright (c) Microsoft Corporation
|
||||
// The Microsoft Corporation licenses this file to you under the MIT license.
|
||||
// See the LICENSE file in the project root for more information.
|
||||
|
||||
using System;
|
||||
using System.ComponentModel;
|
||||
using System.Drawing;
|
||||
using System.Windows.Forms;
|
||||
|
||||
namespace MouseWithoutBorders
|
||||
{
|
||||
public partial class ColorBorderField : UserControl
|
||||
{
|
||||
[Category("Property Changed")]
|
||||
[Description("The text property of the field has changed")]
|
||||
public event EventHandler FieldTextChanged;
|
||||
|
||||
private int _borderSize;
|
||||
|
||||
[Category("Appearance")]
|
||||
[Description("The thickness of the border around the field")]
|
||||
public int BorderSize
|
||||
{
|
||||
get => _borderSize;
|
||||
set
|
||||
{
|
||||
_borderSize = value;
|
||||
UpdateFieldSize();
|
||||
}
|
||||
}
|
||||
|
||||
private Color _borderColor;
|
||||
|
||||
[Category("Appearance")]
|
||||
[Description("The color of the border around the field")]
|
||||
public Color BorderColor
|
||||
{
|
||||
get => _borderColor;
|
||||
set
|
||||
{
|
||||
_borderColor = value;
|
||||
UpdateBorderColor();
|
||||
}
|
||||
}
|
||||
|
||||
private Color _focusColor;
|
||||
|
||||
[Category("Appearance")]
|
||||
[Description("The color of the border around the field when it has focus")]
|
||||
public Color FocusColor
|
||||
{
|
||||
get => _focusColor;
|
||||
set
|
||||
{
|
||||
_focusColor = value;
|
||||
UpdateBorderColor();
|
||||
}
|
||||
}
|
||||
|
||||
[Category("Behavior")]
|
||||
[Description("The maximum number of characters that can be typed in the field")]
|
||||
public int MaximumLength
|
||||
{
|
||||
get => InnerField.MaxLength;
|
||||
set => InnerField.MaxLength = value;
|
||||
}
|
||||
|
||||
public override string Text
|
||||
{
|
||||
get => InnerField.Text;
|
||||
set => InnerField.Text = value;
|
||||
}
|
||||
|
||||
public ColorBorderField()
|
||||
{
|
||||
InitializeComponent();
|
||||
InnerField.GotFocus += InnerFieldGotFocus;
|
||||
InnerField.LostFocus += InnerFieldLostFocus;
|
||||
InnerField.TextChanged += InnerFieldTextChanged;
|
||||
UpdateBorderColor();
|
||||
}
|
||||
|
||||
protected override void OnResize(EventArgs e)
|
||||
{
|
||||
base.OnResize(e);
|
||||
UpdateFieldSize();
|
||||
}
|
||||
|
||||
protected override void OnGotFocus(EventArgs e)
|
||||
{
|
||||
base.OnGotFocus(e);
|
||||
_ = InnerField.Focus();
|
||||
}
|
||||
|
||||
private void InnerFieldGotFocus(object sender, EventArgs e)
|
||||
{
|
||||
BackColor = FocusColor;
|
||||
}
|
||||
|
||||
private void InnerFieldLostFocus(object sender, EventArgs e)
|
||||
{
|
||||
BackColor = BorderColor;
|
||||
}
|
||||
|
||||
private void InnerFieldTextChanged(object sender, EventArgs e)
|
||||
{
|
||||
FieldTextChanged?.Invoke(this, EventArgs.Empty);
|
||||
}
|
||||
|
||||
private void UpdateFieldSize()
|
||||
{
|
||||
InnerField.Left = BorderSize;
|
||||
InnerField.Top = BorderSize;
|
||||
InnerField.Width = Width - (BorderSize * 2);
|
||||
Height = InnerField.Height + (BorderSize * 2);
|
||||
}
|
||||
|
||||
private void UpdateBorderColor()
|
||||
{
|
||||
BackColor = Focused ? FocusColor : BorderColor;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,120 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<root>
|
||||
<!--
|
||||
Microsoft ResX Schema
|
||||
|
||||
Version 2.0
|
||||
|
||||
The primary goals of this format is to allow a simple XML format
|
||||
that is mostly human readable. The generation and parsing of the
|
||||
various data types are done through the TypeConverter classes
|
||||
associated with the data types.
|
||||
|
||||
Example:
|
||||
|
||||
... ado.net/XML headers & schema ...
|
||||
<resheader name="resmimetype">text/microsoft-resx</resheader>
|
||||
<resheader name="version">2.0</resheader>
|
||||
<resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
|
||||
<resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
|
||||
<data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
|
||||
<data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
|
||||
<data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
|
||||
<value>[base64 mime encoded serialized .NET Framework object]</value>
|
||||
</data>
|
||||
<data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
|
||||
<value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
|
||||
<comment>This is a comment</comment>
|
||||
</data>
|
||||
|
||||
There are any number of "resheader" rows that contain simple
|
||||
name/value pairs.
|
||||
|
||||
Each data row contains a name, and value. The row also contains a
|
||||
type or mimetype. Type corresponds to a .NET class that support
|
||||
text/value conversion through the TypeConverter architecture.
|
||||
Classes that don't support this are serialized and stored with the
|
||||
mimetype set.
|
||||
|
||||
The mimetype is used for serialized objects, and tells the
|
||||
ResXResourceReader how to depersist the object. This is currently not
|
||||
extensible. For a given mimetype the value must be set accordingly:
|
||||
|
||||
Note - application/x-microsoft.net.object.binary.base64 is the format
|
||||
that the ResXResourceWriter will generate, however the reader can
|
||||
read any of the formats listed below.
|
||||
|
||||
mimetype: application/x-microsoft.net.object.binary.base64
|
||||
value : The object must be serialized with
|
||||
: System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
|
||||
: and then encoded with base64 encoding.
|
||||
|
||||
mimetype: application/x-microsoft.net.object.soap.base64
|
||||
value : The object must be serialized with
|
||||
: System.Runtime.Serialization.Formatters.Soap.SoapFormatter
|
||||
: and then encoded with base64 encoding.
|
||||
|
||||
mimetype: application/x-microsoft.net.object.bytearray.base64
|
||||
value : The object must be serialized into a byte array
|
||||
: using a System.ComponentModel.TypeConverter
|
||||
: and then encoded with base64 encoding.
|
||||
-->
|
||||
<xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
|
||||
<xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
|
||||
<xsd:element name="root" msdata:IsDataSet="true">
|
||||
<xsd:complexType>
|
||||
<xsd:choice maxOccurs="unbounded">
|
||||
<xsd:element name="metadata">
|
||||
<xsd:complexType>
|
||||
<xsd:sequence>
|
||||
<xsd:element name="value" type="xsd:string" minOccurs="0" />
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="name" use="required" type="xsd:string" />
|
||||
<xsd:attribute name="type" type="xsd:string" />
|
||||
<xsd:attribute name="mimetype" type="xsd:string" />
|
||||
<xsd:attribute ref="xml:space" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
<xsd:element name="assembly">
|
||||
<xsd:complexType>
|
||||
<xsd:attribute name="alias" type="xsd:string" />
|
||||
<xsd:attribute name="name" type="xsd:string" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
<xsd:element name="data">
|
||||
<xsd:complexType>
|
||||
<xsd:sequence>
|
||||
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
|
||||
<xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" />
|
||||
<xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
|
||||
<xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
|
||||
<xsd:attribute ref="xml:space" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
<xsd:element name="resheader">
|
||||
<xsd:complexType>
|
||||
<xsd:sequence>
|
||||
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="name" type="xsd:string" use="required" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
</xsd:choice>
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
</xsd:schema>
|
||||
<resheader name="resmimetype">
|
||||
<value>text/microsoft-resx</value>
|
||||
</resheader>
|
||||
<resheader name="version">
|
||||
<value>2.0</value>
|
||||
</resheader>
|
||||
<resheader name="reader">
|
||||
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</resheader>
|
||||
<resheader name="writer">
|
||||
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</resheader>
|
||||
</root>
|
||||
44
src/modules/MouseWithoutBorders/App/Control/ImageButton.Designer.cs
generated
Normal file
44
src/modules/MouseWithoutBorders/App/Control/ImageButton.Designer.cs
generated
Normal file
@@ -0,0 +1,44 @@
|
||||
namespace MouseWithoutBorders
|
||||
{
|
||||
partial class ImageButton
|
||||
{
|
||||
/// <summary>
|
||||
/// Required designer variable.
|
||||
/// </summary>
|
||||
private System.ComponentModel.IContainer components = null;
|
||||
|
||||
/// <summary>
|
||||
/// Clean up any resources being used.
|
||||
/// </summary>
|
||||
/// <param name="disposing">true if managed resources should be disposed; otherwise, false.</param>
|
||||
protected override void Dispose(bool disposing)
|
||||
{
|
||||
if (disposing && (components != null))
|
||||
{
|
||||
components.Dispose();
|
||||
}
|
||||
base.Dispose(disposing);
|
||||
}
|
||||
|
||||
#region Component Designer generated code
|
||||
|
||||
/// <summary>
|
||||
/// Required method for Designer support - do not modify
|
||||
/// the contents of this method with the code editor.
|
||||
/// </summary>
|
||||
private void InitializeComponent()
|
||||
{
|
||||
this.SuspendLayout();
|
||||
//
|
||||
// ImageButton
|
||||
//
|
||||
this.Name = "ImageButton";
|
||||
this.Size = new System.Drawing.Size(80, 78);
|
||||
this.ResumeLayout(false);
|
||||
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
}
|
||||
}
|
||||
146
src/modules/MouseWithoutBorders/App/Control/ImageButton.cs
Normal file
146
src/modules/MouseWithoutBorders/App/Control/ImageButton.cs
Normal file
@@ -0,0 +1,146 @@
|
||||
// Copyright (c) Microsoft Corporation
|
||||
// The Microsoft Corporation licenses this file to you under the MIT license.
|
||||
// See the LICENSE file in the project root for more information.
|
||||
|
||||
using System;
|
||||
using System.ComponentModel;
|
||||
using System.Drawing;
|
||||
using System.Windows.Forms;
|
||||
|
||||
namespace MouseWithoutBorders
|
||||
{
|
||||
public partial class ImageButton : PictureBox
|
||||
{
|
||||
public ImageButton()
|
||||
{
|
||||
InitializeComponent();
|
||||
UpdateEnabledState();
|
||||
}
|
||||
|
||||
[Category("Appearance")]
|
||||
[Description("Image to show when Mouse is pressed on button")]
|
||||
public Image DownImage { get; set; }
|
||||
|
||||
private Image _normalImage;
|
||||
|
||||
[Category("Appearance")]
|
||||
[Description("Image to show when button is in normal state")]
|
||||
public Image NormalImage
|
||||
{
|
||||
get => _normalImage;
|
||||
set
|
||||
{
|
||||
_normalImage = value;
|
||||
UpdateEnabledState();
|
||||
}
|
||||
}
|
||||
|
||||
[Category("Appearance")]
|
||||
[Description("Image to show when Mouse hovers over button")]
|
||||
public Image HoverImage { get; set; }
|
||||
|
||||
[Category("Appearance")]
|
||||
[Description("Image to show when button is disabled")]
|
||||
public Image DisabledImage { get; set; }
|
||||
|
||||
private bool _hovering;
|
||||
private bool _buttonDown;
|
||||
|
||||
protected override void OnVisibleChanged(EventArgs e)
|
||||
{
|
||||
UpdateEnabledState();
|
||||
base.OnVisibleChanged(e);
|
||||
}
|
||||
|
||||
protected override void OnEnabledChanged(EventArgs e)
|
||||
{
|
||||
UpdateEnabledState();
|
||||
base.OnEnabledChanged(e);
|
||||
}
|
||||
|
||||
protected override void OnLoadCompleted(AsyncCompletedEventArgs e)
|
||||
{
|
||||
UpdateEnabledState();
|
||||
base.OnLoadCompleted(e);
|
||||
}
|
||||
|
||||
protected override void OnMouseMove(MouseEventArgs e)
|
||||
{
|
||||
_hovering = true;
|
||||
if (Enabled)
|
||||
{
|
||||
if (_buttonDown)
|
||||
{
|
||||
if (DownImage != null && Image != DownImage)
|
||||
{
|
||||
Image = DownImage;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
Image = HoverImage ?? NormalImage;
|
||||
}
|
||||
}
|
||||
|
||||
base.OnMouseMove(e);
|
||||
}
|
||||
|
||||
protected override void OnMouseDown(MouseEventArgs e)
|
||||
{
|
||||
_buttonDown = true;
|
||||
if (Enabled)
|
||||
{
|
||||
_ = Focus();
|
||||
if (DownImage != null)
|
||||
{
|
||||
Image = DownImage;
|
||||
}
|
||||
}
|
||||
|
||||
base.OnMouseDown(e);
|
||||
}
|
||||
|
||||
protected override void OnMouseUp(MouseEventArgs e)
|
||||
{
|
||||
_buttonDown = false;
|
||||
if (Enabled)
|
||||
{
|
||||
if (_hovering)
|
||||
{
|
||||
if (HoverImage != null)
|
||||
{
|
||||
Image = HoverImage;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
Image = NormalImage;
|
||||
}
|
||||
}
|
||||
|
||||
base.OnMouseUp(e);
|
||||
}
|
||||
|
||||
protected override void OnMouseLeave(EventArgs e)
|
||||
{
|
||||
_hovering = false;
|
||||
UpdateEnabledState();
|
||||
base.OnMouseLeave(e);
|
||||
}
|
||||
|
||||
private void UpdateEnabledState()
|
||||
{
|
||||
if (Enabled)
|
||||
{
|
||||
Image = _hovering && HoverImage != null ? HoverImage : NormalImage;
|
||||
}
|
||||
else
|
||||
{
|
||||
if (DisabledImage != null)
|
||||
{
|
||||
Image = DisabledImage;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
120
src/modules/MouseWithoutBorders/App/Control/ImageButton.resx
Normal file
120
src/modules/MouseWithoutBorders/App/Control/ImageButton.resx
Normal file
@@ -0,0 +1,120 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<root>
|
||||
<!--
|
||||
Microsoft ResX Schema
|
||||
|
||||
Version 2.0
|
||||
|
||||
The primary goals of this format is to allow a simple XML format
|
||||
that is mostly human readable. The generation and parsing of the
|
||||
various data types are done through the TypeConverter classes
|
||||
associated with the data types.
|
||||
|
||||
Example:
|
||||
|
||||
... ado.net/XML headers & schema ...
|
||||
<resheader name="resmimetype">text/microsoft-resx</resheader>
|
||||
<resheader name="version">2.0</resheader>
|
||||
<resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
|
||||
<resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
|
||||
<data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
|
||||
<data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
|
||||
<data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
|
||||
<value>[base64 mime encoded serialized .NET Framework object]</value>
|
||||
</data>
|
||||
<data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
|
||||
<value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
|
||||
<comment>This is a comment</comment>
|
||||
</data>
|
||||
|
||||
There are any number of "resheader" rows that contain simple
|
||||
name/value pairs.
|
||||
|
||||
Each data row contains a name, and value. The row also contains a
|
||||
type or mimetype. Type corresponds to a .NET class that support
|
||||
text/value conversion through the TypeConverter architecture.
|
||||
Classes that don't support this are serialized and stored with the
|
||||
mimetype set.
|
||||
|
||||
The mimetype is used for serialized objects, and tells the
|
||||
ResXResourceReader how to depersist the object. This is currently not
|
||||
extensible. For a given mimetype the value must be set accordingly:
|
||||
|
||||
Note - application/x-microsoft.net.object.binary.base64 is the format
|
||||
that the ResXResourceWriter will generate, however the reader can
|
||||
read any of the formats listed below.
|
||||
|
||||
mimetype: application/x-microsoft.net.object.binary.base64
|
||||
value : The object must be serialized with
|
||||
: System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
|
||||
: and then encoded with base64 encoding.
|
||||
|
||||
mimetype: application/x-microsoft.net.object.soap.base64
|
||||
value : The object must be serialized with
|
||||
: System.Runtime.Serialization.Formatters.Soap.SoapFormatter
|
||||
: and then encoded with base64 encoding.
|
||||
|
||||
mimetype: application/x-microsoft.net.object.bytearray.base64
|
||||
value : The object must be serialized into a byte array
|
||||
: using a System.ComponentModel.TypeConverter
|
||||
: and then encoded with base64 encoding.
|
||||
-->
|
||||
<xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
|
||||
<xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
|
||||
<xsd:element name="root" msdata:IsDataSet="true">
|
||||
<xsd:complexType>
|
||||
<xsd:choice maxOccurs="unbounded">
|
||||
<xsd:element name="metadata">
|
||||
<xsd:complexType>
|
||||
<xsd:sequence>
|
||||
<xsd:element name="value" type="xsd:string" minOccurs="0" />
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="name" use="required" type="xsd:string" />
|
||||
<xsd:attribute name="type" type="xsd:string" />
|
||||
<xsd:attribute name="mimetype" type="xsd:string" />
|
||||
<xsd:attribute ref="xml:space" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
<xsd:element name="assembly">
|
||||
<xsd:complexType>
|
||||
<xsd:attribute name="alias" type="xsd:string" />
|
||||
<xsd:attribute name="name" type="xsd:string" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
<xsd:element name="data">
|
||||
<xsd:complexType>
|
||||
<xsd:sequence>
|
||||
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
|
||||
<xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" />
|
||||
<xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
|
||||
<xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
|
||||
<xsd:attribute ref="xml:space" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
<xsd:element name="resheader">
|
||||
<xsd:complexType>
|
||||
<xsd:sequence>
|
||||
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="name" type="xsd:string" use="required" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
</xsd:choice>
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
</xsd:schema>
|
||||
<resheader name="resmimetype">
|
||||
<value>text/microsoft-resx</value>
|
||||
</resheader>
|
||||
<resheader name="version">
|
||||
<value>2.0</value>
|
||||
</resheader>
|
||||
<resheader name="reader">
|
||||
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</resheader>
|
||||
<resheader name="writer">
|
||||
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</resheader>
|
||||
</root>
|
||||
44
src/modules/MouseWithoutBorders/App/Control/ImageRadioButton.Designer.cs
generated
Normal file
44
src/modules/MouseWithoutBorders/App/Control/ImageRadioButton.Designer.cs
generated
Normal file
@@ -0,0 +1,44 @@
|
||||
namespace MouseWithoutBorders
|
||||
{
|
||||
partial class ImageRadioButton
|
||||
{
|
||||
/// <summary>
|
||||
/// Required designer variable.
|
||||
/// </summary>
|
||||
private System.ComponentModel.IContainer components = null;
|
||||
|
||||
/// <summary>
|
||||
/// Clean up any resources being used.
|
||||
/// </summary>
|
||||
/// <param name="disposing">true if managed resources should be disposed; otherwise, false.</param>
|
||||
protected override void Dispose(bool disposing)
|
||||
{
|
||||
if (disposing && (components != null))
|
||||
{
|
||||
components.Dispose();
|
||||
}
|
||||
base.Dispose(disposing);
|
||||
}
|
||||
|
||||
#region Component Designer generated code
|
||||
|
||||
/// <summary>
|
||||
/// Required method for Designer support - do not modify
|
||||
/// the contents of this method with the code editor.
|
||||
/// </summary>
|
||||
private void InitializeComponent()
|
||||
{
|
||||
this.SuspendLayout();
|
||||
//
|
||||
// ImageCheckButton
|
||||
//
|
||||
this.Name = "ImageCheckButton";
|
||||
this.Size = new System.Drawing.Size(105, 34);
|
||||
this.ResumeLayout(false);
|
||||
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,91 @@
|
||||
// Copyright (c) Microsoft Corporation
|
||||
// The Microsoft Corporation licenses this file to you under the MIT license.
|
||||
// See the LICENSE file in the project root for more information.
|
||||
|
||||
using System.ComponentModel;
|
||||
using System.Drawing;
|
||||
using System.Windows.Forms;
|
||||
|
||||
namespace MouseWithoutBorders
|
||||
{
|
||||
public partial class ImageRadioButton : RadioButton
|
||||
{
|
||||
private Image CheckImage => Checked ? CheckedImage : UncheckedImage;
|
||||
|
||||
private Point _imageLocation;
|
||||
|
||||
[Category("Appearance")]
|
||||
[Description("The bounding rectangle of the check image in local co-ordinates")]
|
||||
public Point ImageLocation
|
||||
{
|
||||
get => _imageLocation;
|
||||
set
|
||||
{
|
||||
_imageLocation = value;
|
||||
Refresh();
|
||||
}
|
||||
}
|
||||
|
||||
private Point _textLocation;
|
||||
|
||||
public Point TextLocation
|
||||
{
|
||||
get => _textLocation;
|
||||
set
|
||||
{
|
||||
_textLocation = value;
|
||||
Refresh();
|
||||
}
|
||||
}
|
||||
|
||||
public ImageRadioButton()
|
||||
{
|
||||
InitializeComponent();
|
||||
}
|
||||
|
||||
private Image _checkedImage;
|
||||
|
||||
[Category("Appearance")]
|
||||
[Description("Image to show when Mouse is pressed on button")]
|
||||
public Image CheckedImage
|
||||
{
|
||||
get => _checkedImage;
|
||||
set
|
||||
{
|
||||
_checkedImage = value;
|
||||
Refresh();
|
||||
}
|
||||
}
|
||||
|
||||
private Image _uncheckedImage;
|
||||
|
||||
[Category("Appearance")]
|
||||
[Description("Image to show when button is in normal state")]
|
||||
public Image UncheckedImage
|
||||
{
|
||||
get => _uncheckedImage;
|
||||
set
|
||||
{
|
||||
_uncheckedImage = value;
|
||||
Refresh();
|
||||
}
|
||||
}
|
||||
|
||||
protected override void OnPaint(PaintEventArgs pevent)
|
||||
{
|
||||
if (CheckImage == null)
|
||||
{
|
||||
base.OnPaint(pevent);
|
||||
}
|
||||
else
|
||||
{
|
||||
OnPaintBackground(pevent);
|
||||
pevent.Graphics.DrawImage(CheckImage, ImageLocation.X, ImageLocation.Y, CheckImage.Width, CheckImage.Height);
|
||||
if (!string.IsNullOrEmpty(Text))
|
||||
{
|
||||
pevent.Graphics.DrawString(Text, Font, Brushes.White, TextLocation);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,120 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<root>
|
||||
<!--
|
||||
Microsoft ResX Schema
|
||||
|
||||
Version 2.0
|
||||
|
||||
The primary goals of this format is to allow a simple XML format
|
||||
that is mostly human readable. The generation and parsing of the
|
||||
various data types are done through the TypeConverter classes
|
||||
associated with the data types.
|
||||
|
||||
Example:
|
||||
|
||||
... ado.net/XML headers & schema ...
|
||||
<resheader name="resmimetype">text/microsoft-resx</resheader>
|
||||
<resheader name="version">2.0</resheader>
|
||||
<resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
|
||||
<resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
|
||||
<data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
|
||||
<data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
|
||||
<data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
|
||||
<value>[base64 mime encoded serialized .NET Framework object]</value>
|
||||
</data>
|
||||
<data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
|
||||
<value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
|
||||
<comment>This is a comment</comment>
|
||||
</data>
|
||||
|
||||
There are any number of "resheader" rows that contain simple
|
||||
name/value pairs.
|
||||
|
||||
Each data row contains a name, and value. The row also contains a
|
||||
type or mimetype. Type corresponds to a .NET class that support
|
||||
text/value conversion through the TypeConverter architecture.
|
||||
Classes that don't support this are serialized and stored with the
|
||||
mimetype set.
|
||||
|
||||
The mimetype is used for serialized objects, and tells the
|
||||
ResXResourceReader how to depersist the object. This is currently not
|
||||
extensible. For a given mimetype the value must be set accordingly:
|
||||
|
||||
Note - application/x-microsoft.net.object.binary.base64 is the format
|
||||
that the ResXResourceWriter will generate, however the reader can
|
||||
read any of the formats listed below.
|
||||
|
||||
mimetype: application/x-microsoft.net.object.binary.base64
|
||||
value : The object must be serialized with
|
||||
: System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
|
||||
: and then encoded with base64 encoding.
|
||||
|
||||
mimetype: application/x-microsoft.net.object.soap.base64
|
||||
value : The object must be serialized with
|
||||
: System.Runtime.Serialization.Formatters.Soap.SoapFormatter
|
||||
: and then encoded with base64 encoding.
|
||||
|
||||
mimetype: application/x-microsoft.net.object.bytearray.base64
|
||||
value : The object must be serialized into a byte array
|
||||
: using a System.ComponentModel.TypeConverter
|
||||
: and then encoded with base64 encoding.
|
||||
-->
|
||||
<xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
|
||||
<xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
|
||||
<xsd:element name="root" msdata:IsDataSet="true">
|
||||
<xsd:complexType>
|
||||
<xsd:choice maxOccurs="unbounded">
|
||||
<xsd:element name="metadata">
|
||||
<xsd:complexType>
|
||||
<xsd:sequence>
|
||||
<xsd:element name="value" type="xsd:string" minOccurs="0" />
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="name" use="required" type="xsd:string" />
|
||||
<xsd:attribute name="type" type="xsd:string" />
|
||||
<xsd:attribute name="mimetype" type="xsd:string" />
|
||||
<xsd:attribute ref="xml:space" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
<xsd:element name="assembly">
|
||||
<xsd:complexType>
|
||||
<xsd:attribute name="alias" type="xsd:string" />
|
||||
<xsd:attribute name="name" type="xsd:string" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
<xsd:element name="data">
|
||||
<xsd:complexType>
|
||||
<xsd:sequence>
|
||||
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
|
||||
<xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" />
|
||||
<xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
|
||||
<xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
|
||||
<xsd:attribute ref="xml:space" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
<xsd:element name="resheader">
|
||||
<xsd:complexType>
|
||||
<xsd:sequence>
|
||||
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="name" type="xsd:string" use="required" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
</xsd:choice>
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
</xsd:schema>
|
||||
<resheader name="resmimetype">
|
||||
<value>text/microsoft-resx</value>
|
||||
</resheader>
|
||||
<resheader name="version">
|
||||
<value>2.0</value>
|
||||
</resheader>
|
||||
<resheader name="reader">
|
||||
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</resheader>
|
||||
<resheader name="writer">
|
||||
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</resheader>
|
||||
</root>
|
||||
207
src/modules/MouseWithoutBorders/App/Control/Machine.cs
Normal file
207
src/modules/MouseWithoutBorders/App/Control/Machine.cs
Normal file
@@ -0,0 +1,207 @@
|
||||
// Copyright (c) Microsoft Corporation
|
||||
// The Microsoft Corporation licenses this file to you under the MIT license.
|
||||
// See the LICENSE file in the project root for more information.
|
||||
|
||||
using System;
|
||||
using System.Windows.Forms;
|
||||
|
||||
// <summary>
|
||||
// User control, used in the Matrix form.
|
||||
// </summary>
|
||||
// <history>
|
||||
// 2008 created by Truong Do (ductdo).
|
||||
// 2009-... modified by Truong Do (TruongDo).
|
||||
// 2023- Included in PowerToys.
|
||||
// </history>
|
||||
using MouseWithoutBorders.Class;
|
||||
using MouseWithoutBorders.Properties;
|
||||
|
||||
namespace MouseWithoutBorders
|
||||
{
|
||||
internal partial class Machine : UserControl
|
||||
{
|
||||
// private int ip;
|
||||
// private Point mouseDownPos;
|
||||
private SocketStatus statusClient;
|
||||
|
||||
private SocketStatus statusServer;
|
||||
private bool localhost;
|
||||
|
||||
internal Machine()
|
||||
{
|
||||
InitializeComponent();
|
||||
Visible = false;
|
||||
MachineEnabled = false;
|
||||
}
|
||||
|
||||
internal string MachineName
|
||||
{
|
||||
get => textBoxName.Text;
|
||||
set => textBoxName.Text = value;
|
||||
}
|
||||
|
||||
internal bool MachineEnabled
|
||||
{
|
||||
get => checkBoxEnabled.Checked;
|
||||
set
|
||||
{
|
||||
checkBoxEnabled.Checked = value;
|
||||
Editable = value;
|
||||
pictureBoxLogo.Image = value ? Resources.MachineEnabled : (System.Drawing.Image)Resources.MachineDisabled;
|
||||
OnEnabledChanged(EventArgs.Empty); // Borrow this event since we do not use it for any other purpose:) (we can create one but l...:))
|
||||
}
|
||||
}
|
||||
|
||||
internal bool Editable
|
||||
{
|
||||
set => textBoxName.Enabled = value;
|
||||
|
||||
// get { return textBoxName.Enabled; }
|
||||
}
|
||||
|
||||
internal bool CheckAble
|
||||
{
|
||||
set
|
||||
{
|
||||
if (!value)
|
||||
{
|
||||
checkBoxEnabled.Checked = true;
|
||||
Editable = false;
|
||||
}
|
||||
|
||||
checkBoxEnabled.Enabled = value;
|
||||
}
|
||||
}
|
||||
|
||||
internal bool LocalHost
|
||||
{
|
||||
// get { return localhost; }
|
||||
set
|
||||
{
|
||||
localhost = value;
|
||||
if (localhost)
|
||||
{
|
||||
labelStatusClient.Text = "local machine";
|
||||
labelStatusServer.Text = "...";
|
||||
CheckAble = false;
|
||||
}
|
||||
else
|
||||
{
|
||||
labelStatusClient.Text = "...";
|
||||
labelStatusServer.Text = "...";
|
||||
CheckAble = true;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
private void PictureBoxLogo_MouseDown(object sender, MouseEventArgs e)
|
||||
{
|
||||
// mouseDownPos = e.Location;
|
||||
OnMouseDown(e);
|
||||
}
|
||||
|
||||
/*
|
||||
internal Point MouseDownPos
|
||||
{
|
||||
get { return mouseDownPos; }
|
||||
}
|
||||
*/
|
||||
|
||||
private void CheckBoxEnabled_CheckedChanged(object sender, EventArgs e)
|
||||
{
|
||||
MachineEnabled = checkBoxEnabled.Checked;
|
||||
}
|
||||
|
||||
private static string StatusString(SocketStatus status)
|
||||
{
|
||||
string rv = string.Empty;
|
||||
|
||||
switch (status)
|
||||
{
|
||||
case SocketStatus.Resolving:
|
||||
rv = "Resolving";
|
||||
break;
|
||||
|
||||
case SocketStatus.Connected:
|
||||
rv = "Connected";
|
||||
break;
|
||||
|
||||
case SocketStatus.Connecting:
|
||||
rv = "Connecting";
|
||||
break;
|
||||
|
||||
case SocketStatus.Error:
|
||||
rv = "Error";
|
||||
break;
|
||||
|
||||
case SocketStatus.ForceClosed:
|
||||
rv = "Closed";
|
||||
break;
|
||||
|
||||
case SocketStatus.Handshaking:
|
||||
rv = "Handshaking";
|
||||
break;
|
||||
|
||||
case SocketStatus.SendError:
|
||||
rv = "Send error";
|
||||
break;
|
||||
|
||||
case SocketStatus.InvalidKey:
|
||||
rv = "KeysNotMatched";
|
||||
break;
|
||||
|
||||
case SocketStatus.Timeout:
|
||||
rv = "Timed out";
|
||||
break;
|
||||
|
||||
case SocketStatus.NA:
|
||||
rv = "...";
|
||||
break;
|
||||
|
||||
default:
|
||||
break;
|
||||
}
|
||||
|
||||
return rv;
|
||||
}
|
||||
|
||||
internal SocketStatus StatusClient
|
||||
{
|
||||
get => statusClient;
|
||||
|
||||
set
|
||||
{
|
||||
statusClient = value;
|
||||
if (statusClient is SocketStatus.Connected or
|
||||
SocketStatus.Handshaking)
|
||||
{
|
||||
Editable = false;
|
||||
}
|
||||
|
||||
labelStatusClient.Text = StatusString(statusClient) + " -->";
|
||||
}
|
||||
}
|
||||
|
||||
internal SocketStatus StatusServer
|
||||
{
|
||||
get => statusServer;
|
||||
|
||||
set
|
||||
{
|
||||
statusServer = value;
|
||||
if (statusServer is SocketStatus.Connected or
|
||||
SocketStatus.Handshaking)
|
||||
{
|
||||
Editable = false;
|
||||
}
|
||||
|
||||
labelStatusServer.Text = StatusString(statusServer) + " <--";
|
||||
}
|
||||
}
|
||||
|
||||
private void PictureBoxLogo_Paint(object sender, PaintEventArgs e)
|
||||
{
|
||||
// e.Graphics.DrawString("(Draggable)", this.Font, Brushes.WhiteSmoke, 20, 15);
|
||||
}
|
||||
}
|
||||
}
|
||||
125
src/modules/MouseWithoutBorders/App/Control/Machine.designer.cs
generated
Normal file
125
src/modules/MouseWithoutBorders/App/Control/Machine.designer.cs
generated
Normal file
@@ -0,0 +1,125 @@
|
||||
namespace MouseWithoutBorders
|
||||
{
|
||||
partial class Machine
|
||||
{
|
||||
/// <summary>
|
||||
/// Required designer variable.
|
||||
/// </summary>
|
||||
private System.ComponentModel.IContainer components = null;
|
||||
|
||||
/// <summary>
|
||||
/// Clean up any resources being used.
|
||||
/// </summary>
|
||||
/// <param name="disposing">true if managed resources should be disposed; otherwise, false.</param>
|
||||
protected override void Dispose(bool disposing)
|
||||
{
|
||||
if (disposing && (components != null))
|
||||
{
|
||||
components.Dispose();
|
||||
}
|
||||
base.Dispose(disposing);
|
||||
}
|
||||
|
||||
#region Component Designer generated code
|
||||
|
||||
/// <summary>
|
||||
/// Required method for Designer support - do not modify
|
||||
/// the contents of this method with the code editor.
|
||||
/// </summary>
|
||||
private void InitializeComponent()
|
||||
{
|
||||
this.components = new System.ComponentModel.Container();
|
||||
this.labelStatusServer = new System.Windows.Forms.Label();
|
||||
this.textBoxName = new System.Windows.Forms.TextBox();
|
||||
this.checkBoxEnabled = new System.Windows.Forms.CheckBox();
|
||||
this.pictureBoxLogo = new System.Windows.Forms.PictureBox();
|
||||
this.labelStatusClient = new System.Windows.Forms.Label();
|
||||
this.toolTipHelp = new System.Windows.Forms.ToolTip(this.components);
|
||||
((System.ComponentModel.ISupportInitialize)(this.pictureBoxLogo)).BeginInit();
|
||||
this.SuspendLayout();
|
||||
//
|
||||
// labelStatusServer
|
||||
//
|
||||
this.labelStatusServer.Dock = System.Windows.Forms.DockStyle.Bottom;
|
||||
this.labelStatusServer.Location = new System.Drawing.Point(0, 90);
|
||||
this.labelStatusServer.Name = "labelStatusServer";
|
||||
this.labelStatusServer.Size = new System.Drawing.Size(106, 16);
|
||||
this.labelStatusServer.TabIndex = 0;
|
||||
this.labelStatusServer.Text = "...";
|
||||
this.labelStatusServer.TextAlign = System.Drawing.ContentAlignment.TopCenter;
|
||||
//
|
||||
// textBoxName
|
||||
//
|
||||
this.textBoxName.Dock = System.Windows.Forms.DockStyle.Bottom;
|
||||
this.textBoxName.Location = new System.Drawing.Point(0, 54);
|
||||
this.textBoxName.Name = "textBoxName";
|
||||
this.textBoxName.Size = new System.Drawing.Size(106, 20);
|
||||
this.textBoxName.TabIndex = 1;
|
||||
this.textBoxName.TextAlign = System.Windows.Forms.HorizontalAlignment.Center;
|
||||
//
|
||||
// checkBoxEnabled
|
||||
//
|
||||
this.checkBoxEnabled.AutoSize = true;
|
||||
this.checkBoxEnabled.Checked = true;
|
||||
this.checkBoxEnabled.CheckState = System.Windows.Forms.CheckState.Checked;
|
||||
this.checkBoxEnabled.Location = new System.Drawing.Point(91, 40);
|
||||
this.checkBoxEnabled.Name = "checkBoxEnabled";
|
||||
this.checkBoxEnabled.Size = new System.Drawing.Size(15, 14);
|
||||
this.checkBoxEnabled.TabIndex = 3;
|
||||
this.checkBoxEnabled.UseVisualStyleBackColor = true;
|
||||
this.checkBoxEnabled.CheckedChanged += new System.EventHandler(this.CheckBoxEnabled_CheckedChanged);
|
||||
//
|
||||
// pictureBoxLogo
|
||||
//
|
||||
this.pictureBoxLogo.Dock = System.Windows.Forms.DockStyle.Fill;
|
||||
this.pictureBoxLogo.ErrorImage = null;
|
||||
this.pictureBoxLogo.InitialImage = null;
|
||||
this.pictureBoxLogo.Location = new System.Drawing.Point(0, 0);
|
||||
this.pictureBoxLogo.Name = "pictureBoxLogo";
|
||||
this.pictureBoxLogo.Size = new System.Drawing.Size(106, 54);
|
||||
this.pictureBoxLogo.SizeMode = System.Windows.Forms.PictureBoxSizeMode.StretchImage;
|
||||
this.pictureBoxLogo.TabIndex = 2;
|
||||
this.pictureBoxLogo.TabStop = false;
|
||||
this.toolTipHelp.SetToolTip(this.pictureBoxLogo, "Drag to match machine physical layout. Check the checkbox to enter machine name.");
|
||||
this.pictureBoxLogo.Paint += new System.Windows.Forms.PaintEventHandler(this.PictureBoxLogo_Paint);
|
||||
this.pictureBoxLogo.MouseDown += new System.Windows.Forms.MouseEventHandler(this.PictureBoxLogo_MouseDown);
|
||||
//
|
||||
// labelStatusClient
|
||||
//
|
||||
this.labelStatusClient.Dock = System.Windows.Forms.DockStyle.Bottom;
|
||||
this.labelStatusClient.Location = new System.Drawing.Point(0, 74);
|
||||
this.labelStatusClient.Name = "labelStatusClient";
|
||||
this.labelStatusClient.Size = new System.Drawing.Size(106, 16);
|
||||
this.labelStatusClient.TabIndex = 4;
|
||||
this.labelStatusClient.Text = "...";
|
||||
this.labelStatusClient.TextAlign = System.Drawing.ContentAlignment.TopCenter;
|
||||
//
|
||||
// Machine
|
||||
//
|
||||
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
|
||||
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
|
||||
this.BackColor = System.Drawing.Color.Transparent;
|
||||
this.BackgroundImageLayout = System.Windows.Forms.ImageLayout.Stretch;
|
||||
this.Controls.Add(this.checkBoxEnabled);
|
||||
this.Controls.Add(this.pictureBoxLogo);
|
||||
this.Controls.Add(this.textBoxName);
|
||||
this.Controls.Add(this.labelStatusClient);
|
||||
this.Controls.Add(this.labelStatusServer);
|
||||
this.Name = "Machine";
|
||||
this.Size = new System.Drawing.Size(106, 106);
|
||||
((System.ComponentModel.ISupportInitialize)(this.pictureBoxLogo)).EndInit();
|
||||
this.ResumeLayout(false);
|
||||
this.PerformLayout();
|
||||
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
private System.Windows.Forms.Label labelStatusServer;
|
||||
private System.Windows.Forms.TextBox textBoxName;
|
||||
private System.Windows.Forms.PictureBox pictureBoxLogo;
|
||||
private System.Windows.Forms.CheckBox checkBoxEnabled;
|
||||
private System.Windows.Forms.Label labelStatusClient;
|
||||
private System.Windows.Forms.ToolTip toolTipHelp;
|
||||
}
|
||||
}
|
||||
126
src/modules/MouseWithoutBorders/App/Control/Machine.resx
Normal file
126
src/modules/MouseWithoutBorders/App/Control/Machine.resx
Normal file
@@ -0,0 +1,126 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<root>
|
||||
<!--
|
||||
Microsoft ResX Schema
|
||||
|
||||
Version 2.0
|
||||
|
||||
The primary goals of this format is to allow a simple XML format
|
||||
that is mostly human readable. The generation and parsing of the
|
||||
various data types are done through the TypeConverter classes
|
||||
associated with the data types.
|
||||
|
||||
Example:
|
||||
|
||||
... ado.net/XML headers & schema ...
|
||||
<resheader name="resmimetype">text/microsoft-resx</resheader>
|
||||
<resheader name="version">2.0</resheader>
|
||||
<resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
|
||||
<resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
|
||||
<data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
|
||||
<data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
|
||||
<data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
|
||||
<value>[base64 mime encoded serialized .NET Framework object]</value>
|
||||
</data>
|
||||
<data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
|
||||
<value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
|
||||
<comment>This is a comment</comment>
|
||||
</data>
|
||||
|
||||
There are any number of "resheader" rows that contain simple
|
||||
name/value pairs.
|
||||
|
||||
Each data row contains a name, and value. The row also contains a
|
||||
type or mimetype. Type corresponds to a .NET class that support
|
||||
text/value conversion through the TypeConverter architecture.
|
||||
Classes that don't support this are serialized and stored with the
|
||||
mimetype set.
|
||||
|
||||
The mimetype is used for serialized objects, and tells the
|
||||
ResXResourceReader how to depersist the object. This is currently not
|
||||
extensible. For a given mimetype the value must be set accordingly:
|
||||
|
||||
Note - application/x-microsoft.net.object.binary.base64 is the format
|
||||
that the ResXResourceWriter will generate, however the reader can
|
||||
read any of the formats listed below.
|
||||
|
||||
mimetype: application/x-microsoft.net.object.binary.base64
|
||||
value : The object must be serialized with
|
||||
: System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
|
||||
: and then encoded with base64 encoding.
|
||||
|
||||
mimetype: application/x-microsoft.net.object.soap.base64
|
||||
value : The object must be serialized with
|
||||
: System.Runtime.Serialization.Formatters.Soap.SoapFormatter
|
||||
: and then encoded with base64 encoding.
|
||||
|
||||
mimetype: application/x-microsoft.net.object.bytearray.base64
|
||||
value : The object must be serialized into a byte array
|
||||
: using a System.ComponentModel.TypeConverter
|
||||
: and then encoded with base64 encoding.
|
||||
-->
|
||||
<xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
|
||||
<xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
|
||||
<xsd:element name="root" msdata:IsDataSet="true">
|
||||
<xsd:complexType>
|
||||
<xsd:choice maxOccurs="unbounded">
|
||||
<xsd:element name="metadata">
|
||||
<xsd:complexType>
|
||||
<xsd:sequence>
|
||||
<xsd:element name="value" type="xsd:string" minOccurs="0" />
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="name" use="required" type="xsd:string" />
|
||||
<xsd:attribute name="type" type="xsd:string" />
|
||||
<xsd:attribute name="mimetype" type="xsd:string" />
|
||||
<xsd:attribute ref="xml:space" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
<xsd:element name="assembly">
|
||||
<xsd:complexType>
|
||||
<xsd:attribute name="alias" type="xsd:string" />
|
||||
<xsd:attribute name="name" type="xsd:string" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
<xsd:element name="data">
|
||||
<xsd:complexType>
|
||||
<xsd:sequence>
|
||||
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
|
||||
<xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" />
|
||||
<xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
|
||||
<xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
|
||||
<xsd:attribute ref="xml:space" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
<xsd:element name="resheader">
|
||||
<xsd:complexType>
|
||||
<xsd:sequence>
|
||||
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="name" type="xsd:string" use="required" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
</xsd:choice>
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
</xsd:schema>
|
||||
<resheader name="resmimetype">
|
||||
<value>text/microsoft-resx</value>
|
||||
</resheader>
|
||||
<resheader name="version">
|
||||
<value>2.0</value>
|
||||
</resheader>
|
||||
<resheader name="reader">
|
||||
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</resheader>
|
||||
<resheader name="writer">
|
||||
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</resheader>
|
||||
<metadata name="toolTipHelp.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
|
||||
<value>17, 17</value>
|
||||
</metadata>
|
||||
<metadata name="$this.Locked" type="System.Boolean, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
|
||||
<value>True</value>
|
||||
</metadata>
|
||||
</root>
|
||||
168
src/modules/MouseWithoutBorders/App/Control/Machine2.Designer.cs
generated
Normal file
168
src/modules/MouseWithoutBorders/App/Control/Machine2.Designer.cs
generated
Normal file
@@ -0,0 +1,168 @@
|
||||
namespace MouseWithoutBorders
|
||||
{
|
||||
partial class Machine2
|
||||
{
|
||||
/// <summary>
|
||||
/// Required designer variable.
|
||||
/// </summary>
|
||||
private System.ComponentModel.IContainer components = null;
|
||||
|
||||
/// <summary>
|
||||
/// Clean up any resources being used.
|
||||
/// </summary>
|
||||
/// <param name="disposing">true if managed resources should be disposed; otherwise, false.</param>
|
||||
protected override void Dispose(bool disposing)
|
||||
{
|
||||
if (disposing && (components != null))
|
||||
{
|
||||
components.Dispose();
|
||||
}
|
||||
base.Dispose(disposing);
|
||||
}
|
||||
|
||||
#region Component Designer generated code
|
||||
|
||||
/// <summary>
|
||||
/// Required method for Designer support - do not modify
|
||||
/// the contents of this method with the code editor.
|
||||
/// </summary>
|
||||
private void InitializeComponent()
|
||||
{
|
||||
this.StatusLabel = new System.Windows.Forms.Label();
|
||||
this.NameLabel = new System.Windows.Forms.Label();
|
||||
this.SelectedPanel = new System.Windows.Forms.Panel();
|
||||
this.ComputerPictureBox = new System.Windows.Forms.PictureBox();
|
||||
this.RemoveButton = new MouseWithoutBorders.ImageButton();
|
||||
this.OnButton = new MouseWithoutBorders.ImageButton();
|
||||
this.OffButton = new MouseWithoutBorders.ImageButton();
|
||||
((System.ComponentModel.ISupportInitialize)(this.ComputerPictureBox)).BeginInit();
|
||||
((System.ComponentModel.ISupportInitialize)(this.RemoveButton)).BeginInit();
|
||||
((System.ComponentModel.ISupportInitialize)(this.OnButton)).BeginInit();
|
||||
((System.ComponentModel.ISupportInitialize)(this.OffButton)).BeginInit();
|
||||
this.SuspendLayout();
|
||||
//
|
||||
// StatusLabel
|
||||
//
|
||||
this.StatusLabel.BackColor = System.Drawing.Color.Transparent;
|
||||
this.StatusLabel.Font = new System.Drawing.Font(DefaultFont.Name, 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
|
||||
this.StatusLabel.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(49)))), ((int)(((byte)(159)))), ((int)(((byte)(217)))));
|
||||
this.StatusLabel.Location = new System.Drawing.Point(3, 30);
|
||||
this.StatusLabel.Name = "StatusLabel";
|
||||
this.StatusLabel.Size = new System.Drawing.Size(112, 39);
|
||||
this.StatusLabel.TabIndex = 2;
|
||||
this.StatusLabel.Text = "This Computer";
|
||||
this.StatusLabel.TextAlign = System.Drawing.ContentAlignment.MiddleCenter;
|
||||
//
|
||||
// NameLabel
|
||||
//
|
||||
this.NameLabel.BackColor = System.Drawing.Color.Transparent;
|
||||
this.NameLabel.Font = new System.Drawing.Font(DefaultFont.Name, 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
|
||||
this.NameLabel.ForeColor = System.Drawing.Color.White;
|
||||
this.NameLabel.Location = new System.Drawing.Point(6, 96);
|
||||
this.NameLabel.Name = "NameLabel";
|
||||
this.NameLabel.Size = new System.Drawing.Size(109, 17);
|
||||
this.NameLabel.TabIndex = 1;
|
||||
this.NameLabel.Text = "label1";
|
||||
this.NameLabel.TextAlign = System.Drawing.ContentAlignment.MiddleCenter;
|
||||
//
|
||||
// SelectedPanel
|
||||
//
|
||||
this.SelectedPanel.Location = new System.Drawing.Point(101, 225);
|
||||
this.SelectedPanel.Name = "SelectedPanel";
|
||||
this.SelectedPanel.Size = new System.Drawing.Size(200, 100);
|
||||
this.SelectedPanel.TabIndex = 8;
|
||||
//
|
||||
// ComputerPictureBox
|
||||
//
|
||||
this.ComputerPictureBox.Image = global::MouseWithoutBorders.Properties.Resources.computer_connected;
|
||||
this.ComputerPictureBox.Location = new System.Drawing.Point(5, 5);
|
||||
this.ComputerPictureBox.Name = "ComputerPictureBox";
|
||||
this.ComputerPictureBox.Padding = new System.Windows.Forms.Padding(0, 10, 0, 0);
|
||||
this.ComputerPictureBox.Size = new System.Drawing.Size(109, 78);
|
||||
this.ComputerPictureBox.SizeMode = System.Windows.Forms.PictureBoxSizeMode.AutoSize;
|
||||
this.ComputerPictureBox.TabIndex = 0;
|
||||
this.ComputerPictureBox.TabStop = false;
|
||||
//
|
||||
// RemoveButton
|
||||
//
|
||||
this.RemoveButton.DisabledImage = null;
|
||||
this.RemoveButton.DownImage = global::MouseWithoutBorders.Properties.Resources.red_close_button_click;
|
||||
this.RemoveButton.HoverImage = global::MouseWithoutBorders.Properties.Resources.red_close_button_hover;
|
||||
this.RemoveButton.Image = global::MouseWithoutBorders.Properties.Resources.red_close_button_normal;
|
||||
this.RemoveButton.Location = new System.Drawing.Point(224, 15);
|
||||
this.RemoveButton.Name = "RemoveButton";
|
||||
this.RemoveButton.NormalImage = global::MouseWithoutBorders.Properties.Resources.red_close_button_normal;
|
||||
this.RemoveButton.Size = new System.Drawing.Size(12, 12);
|
||||
this.RemoveButton.TabIndex = 5;
|
||||
this.RemoveButton.TabStop = false;
|
||||
this.RemoveButton.Click += new System.EventHandler(this.RemoveButtonClick);
|
||||
//
|
||||
// OnButton
|
||||
//
|
||||
this.OnButton.BackColor = System.Drawing.Color.Transparent;
|
||||
this.OnButton.DisabledImage = null;
|
||||
this.OnButton.DownImage = global::MouseWithoutBorders.Properties.Resources.switch_on_click;
|
||||
this.OnButton.HoverImage = global::MouseWithoutBorders.Properties.Resources.switch_on_hover;
|
||||
this.OnButton.Image = global::MouseWithoutBorders.Properties.Resources.switch_on_normal;
|
||||
this.OnButton.Location = new System.Drawing.Point(277, 20);
|
||||
this.OnButton.Name = "OnButton";
|
||||
this.OnButton.NormalImage = global::MouseWithoutBorders.Properties.Resources.switch_on_normal;
|
||||
this.OnButton.Size = new System.Drawing.Size(30, 15);
|
||||
this.OnButton.TabIndex = 3;
|
||||
this.OnButton.TabStop = false;
|
||||
this.OnButton.Click += new System.EventHandler(this.OnButtonClick);
|
||||
//
|
||||
// OffButton
|
||||
//
|
||||
this.OffButton.BackColor = System.Drawing.Color.Transparent;
|
||||
this.OffButton.DisabledImage = null;
|
||||
this.OffButton.DownImage = global::MouseWithoutBorders.Properties.Resources.switch_off_click;
|
||||
this.OffButton.HoverImage = global::MouseWithoutBorders.Properties.Resources.switch_off_hover;
|
||||
this.OffButton.Image = global::MouseWithoutBorders.Properties.Resources.switch_off_normal;
|
||||
this.OffButton.Location = new System.Drawing.Point(241, 42);
|
||||
this.OffButton.Name = "OffButton";
|
||||
this.OffButton.NormalImage = global::MouseWithoutBorders.Properties.Resources.switch_off_normal;
|
||||
this.OffButton.Size = new System.Drawing.Size(30, 15);
|
||||
this.OffButton.TabIndex = 4;
|
||||
this.OffButton.TabStop = false;
|
||||
this.OffButton.Click += new System.EventHandler(this.OffButtonClick);
|
||||
//
|
||||
// Machine2
|
||||
//
|
||||
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
|
||||
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
|
||||
this.AutoSizeMode = System.Windows.Forms.AutoSizeMode.GrowAndShrink;
|
||||
this.BackColor = System.Drawing.Color.Transparent;
|
||||
this.Controls.Add(this.RemoveButton);
|
||||
this.Controls.Add(this.OnButton);
|
||||
this.Controls.Add(this.OffButton);
|
||||
this.Controls.Add(this.StatusLabel);
|
||||
this.Controls.Add(this.NameLabel);
|
||||
this.Controls.Add(this.ComputerPictureBox);
|
||||
this.Controls.Add(this.SelectedPanel);
|
||||
this.DoubleBuffered = true;
|
||||
this.Margin = new System.Windows.Forms.Padding(0);
|
||||
this.Size = new System.Drawing.Size(471, 432);
|
||||
((System.ComponentModel.ISupportInitialize)(this.ComputerPictureBox)).EndInit();
|
||||
((System.ComponentModel.ISupportInitialize)(this.RemoveButton)).EndInit();
|
||||
((System.ComponentModel.ISupportInitialize)(this.OnButton)).EndInit();
|
||||
((System.ComponentModel.ISupportInitialize)(this.OffButton)).EndInit();
|
||||
this.ResumeLayout(false);
|
||||
this.PerformLayout();
|
||||
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
private System.Windows.Forms.PictureBox ComputerPictureBox;
|
||||
private System.Windows.Forms.Label StatusLabel;
|
||||
private ImageButton OffButton;
|
||||
private ImageButton OnButton;
|
||||
private ImageButton RemoveButton;
|
||||
private System.Windows.Forms.Label NameLabel;
|
||||
private System.Windows.Forms.Panel SelectedPanel;
|
||||
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
120
src/modules/MouseWithoutBorders/App/Control/Machine2.resx
Normal file
120
src/modules/MouseWithoutBorders/App/Control/Machine2.resx
Normal file
@@ -0,0 +1,120 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<root>
|
||||
<!--
|
||||
Microsoft ResX Schema
|
||||
|
||||
Version 2.0
|
||||
|
||||
The primary goals of this format is to allow a simple XML format
|
||||
that is mostly human readable. The generation and parsing of the
|
||||
various data types are done through the TypeConverter classes
|
||||
associated with the data types.
|
||||
|
||||
Example:
|
||||
|
||||
... ado.net/XML headers & schema ...
|
||||
<resheader name="resmimetype">text/microsoft-resx</resheader>
|
||||
<resheader name="version">2.0</resheader>
|
||||
<resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
|
||||
<resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
|
||||
<data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
|
||||
<data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
|
||||
<data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
|
||||
<value>[base64 mime encoded serialized .NET Framework object]</value>
|
||||
</data>
|
||||
<data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
|
||||
<value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
|
||||
<comment>This is a comment</comment>
|
||||
</data>
|
||||
|
||||
There are any number of "resheader" rows that contain simple
|
||||
name/value pairs.
|
||||
|
||||
Each data row contains a name, and value. The row also contains a
|
||||
type or mimetype. Type corresponds to a .NET class that support
|
||||
text/value conversion through the TypeConverter architecture.
|
||||
Classes that don't support this are serialized and stored with the
|
||||
mimetype set.
|
||||
|
||||
The mimetype is used for serialized objects, and tells the
|
||||
ResXResourceReader how to depersist the object. This is currently not
|
||||
extensible. For a given mimetype the value must be set accordingly:
|
||||
|
||||
Note - application/x-microsoft.net.object.binary.base64 is the format
|
||||
that the ResXResourceWriter will generate, however the reader can
|
||||
read any of the formats listed below.
|
||||
|
||||
mimetype: application/x-microsoft.net.object.binary.base64
|
||||
value : The object must be serialized with
|
||||
: System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
|
||||
: and then encoded with base64 encoding.
|
||||
|
||||
mimetype: application/x-microsoft.net.object.soap.base64
|
||||
value : The object must be serialized with
|
||||
: System.Runtime.Serialization.Formatters.Soap.SoapFormatter
|
||||
: and then encoded with base64 encoding.
|
||||
|
||||
mimetype: application/x-microsoft.net.object.bytearray.base64
|
||||
value : The object must be serialized into a byte array
|
||||
: using a System.ComponentModel.TypeConverter
|
||||
: and then encoded with base64 encoding.
|
||||
-->
|
||||
<xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
|
||||
<xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
|
||||
<xsd:element name="root" msdata:IsDataSet="true">
|
||||
<xsd:complexType>
|
||||
<xsd:choice maxOccurs="unbounded">
|
||||
<xsd:element name="metadata">
|
||||
<xsd:complexType>
|
||||
<xsd:sequence>
|
||||
<xsd:element name="value" type="xsd:string" minOccurs="0" />
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="name" use="required" type="xsd:string" />
|
||||
<xsd:attribute name="type" type="xsd:string" />
|
||||
<xsd:attribute name="mimetype" type="xsd:string" />
|
||||
<xsd:attribute ref="xml:space" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
<xsd:element name="assembly">
|
||||
<xsd:complexType>
|
||||
<xsd:attribute name="alias" type="xsd:string" />
|
||||
<xsd:attribute name="name" type="xsd:string" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
<xsd:element name="data">
|
||||
<xsd:complexType>
|
||||
<xsd:sequence>
|
||||
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
|
||||
<xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" />
|
||||
<xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
|
||||
<xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
|
||||
<xsd:attribute ref="xml:space" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
<xsd:element name="resheader">
|
||||
<xsd:complexType>
|
||||
<xsd:sequence>
|
||||
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="name" type="xsd:string" use="required" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
</xsd:choice>
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
</xsd:schema>
|
||||
<resheader name="resmimetype">
|
||||
<value>text/microsoft-resx</value>
|
||||
</resheader>
|
||||
<resheader name="version">
|
||||
<value>2.0</value>
|
||||
</resheader>
|
||||
<resheader name="reader">
|
||||
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</resheader>
|
||||
<resheader name="writer">
|
||||
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</resheader>
|
||||
</root>
|
||||
99
src/modules/MouseWithoutBorders/App/Control/MachineMatrix.Designer.cs
generated
Normal file
99
src/modules/MouseWithoutBorders/App/Control/MachineMatrix.Designer.cs
generated
Normal file
@@ -0,0 +1,99 @@
|
||||
namespace MouseWithoutBorders
|
||||
{
|
||||
partial class MachineMatrix
|
||||
{
|
||||
/// <summary>
|
||||
/// Required designer variable.
|
||||
/// </summary>
|
||||
private System.ComponentModel.IContainer components = null;
|
||||
|
||||
/// <summary>
|
||||
/// Clean up any resources being used.
|
||||
/// </summary>
|
||||
/// <param name="disposing">true if managed resources should be disposed; otherwise, false.</param>
|
||||
protected override void Dispose(bool disposing)
|
||||
{
|
||||
if (disposing && (components != null))
|
||||
{
|
||||
components.Dispose();
|
||||
}
|
||||
base.Dispose(disposing);
|
||||
}
|
||||
|
||||
#region Component Designer generated code
|
||||
|
||||
/// <summary>
|
||||
/// Required method for Designer support - do not modify
|
||||
/// the contents of this method with the code editor.
|
||||
/// </summary>
|
||||
private void InitializeComponent()
|
||||
{
|
||||
this.panel1 = new System.Windows.Forms.Panel();
|
||||
this.SingleRowRadioButton = new MouseWithoutBorders.ImageRadioButton();
|
||||
this.TwoRowsRadioButton = new MouseWithoutBorders.ImageRadioButton();
|
||||
this.panel1.SuspendLayout();
|
||||
this.SuspendLayout();
|
||||
//
|
||||
// panel1
|
||||
//
|
||||
this.panel1.AutoSizeMode = System.Windows.Forms.AutoSizeMode.GrowAndShrink;
|
||||
this.panel1.Controls.Add(this.SingleRowRadioButton);
|
||||
this.panel1.Controls.Add(this.TwoRowsRadioButton);
|
||||
this.panel1.Location = new System.Drawing.Point(0, 7);
|
||||
this.panel1.Margin = new System.Windows.Forms.Padding(0);
|
||||
this.panel1.Name = "panel1";
|
||||
this.panel1.Size = new System.Drawing.Size(51, 56);
|
||||
this.panel1.TabIndex = 6;
|
||||
//
|
||||
// SingleRowRadioButton
|
||||
//
|
||||
this.SingleRowRadioButton.Checked = true;
|
||||
this.SingleRowRadioButton.CheckedImage = global::MouseWithoutBorders.Properties.Resources.one_row_button_checked;
|
||||
this.SingleRowRadioButton.ImageLocation = new System.Drawing.Point(0, 0);
|
||||
this.SingleRowRadioButton.Location = new System.Drawing.Point(0, 0);
|
||||
this.SingleRowRadioButton.Margin = new System.Windows.Forms.Padding(0);
|
||||
this.SingleRowRadioButton.Name = "SingleRowRadioButton";
|
||||
this.SingleRowRadioButton.Size = new System.Drawing.Size(51, 24);
|
||||
this.SingleRowRadioButton.TabIndex = 4;
|
||||
this.SingleRowRadioButton.TabStop = true;
|
||||
this.SingleRowRadioButton.TextLocation = new System.Drawing.Point(0, 0);
|
||||
this.SingleRowRadioButton.UncheckedImage = global::MouseWithoutBorders.Properties.Resources.one_row_button_unchecked;
|
||||
this.SingleRowRadioButton.UseVisualStyleBackColor = true;
|
||||
this.SingleRowRadioButton.CheckedChanged += new System.EventHandler(this.SingleRowRadioButtonCheckedChanged);
|
||||
//
|
||||
// TwoRowsRadioButton
|
||||
//
|
||||
this.TwoRowsRadioButton.CheckedImage = global::MouseWithoutBorders.Properties.Resources.two_row_button_checked;
|
||||
this.TwoRowsRadioButton.ImageLocation = new System.Drawing.Point(0, 0);
|
||||
this.TwoRowsRadioButton.Location = new System.Drawing.Point(0, 27);
|
||||
this.TwoRowsRadioButton.Margin = new System.Windows.Forms.Padding(0, 3, 0, 3);
|
||||
this.TwoRowsRadioButton.Name = "TwoRowsRadioButton";
|
||||
this.TwoRowsRadioButton.Size = new System.Drawing.Size(27, 24);
|
||||
this.TwoRowsRadioButton.TabIndex = 5;
|
||||
this.TwoRowsRadioButton.TextLocation = new System.Drawing.Point(0, 0);
|
||||
this.TwoRowsRadioButton.UncheckedImage = global::MouseWithoutBorders.Properties.Resources.two_row_button_unchecked;
|
||||
this.TwoRowsRadioButton.UseVisualStyleBackColor = true;
|
||||
this.TwoRowsRadioButton.CheckedChanged += new System.EventHandler(this.TwoRowsRadioButtonCheckedChanged);
|
||||
//
|
||||
// MachineMatrix
|
||||
//
|
||||
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
|
||||
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
|
||||
this.BackColor = System.Drawing.Color.Maroon;
|
||||
this.Controls.Add(this.panel1);
|
||||
this.DoubleBuffered = true;
|
||||
this.Name = "MachineMatrix";
|
||||
this.Size = new System.Drawing.Size(360, 175);
|
||||
this.panel1.ResumeLayout(false);
|
||||
this.ResumeLayout(false);
|
||||
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
private ImageRadioButton SingleRowRadioButton;
|
||||
private ImageRadioButton TwoRowsRadioButton;
|
||||
private System.Windows.Forms.Panel panel1;
|
||||
|
||||
}
|
||||
}
|
||||
120
src/modules/MouseWithoutBorders/App/Control/MachineMatrix.resx
Normal file
120
src/modules/MouseWithoutBorders/App/Control/MachineMatrix.resx
Normal file
@@ -0,0 +1,120 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<root>
|
||||
<!--
|
||||
Microsoft ResX Schema
|
||||
|
||||
Version 2.0
|
||||
|
||||
The primary goals of this format is to allow a simple XML format
|
||||
that is mostly human readable. The generation and parsing of the
|
||||
various data types are done through the TypeConverter classes
|
||||
associated with the data types.
|
||||
|
||||
Example:
|
||||
|
||||
... ado.net/XML headers & schema ...
|
||||
<resheader name="resmimetype">text/microsoft-resx</resheader>
|
||||
<resheader name="version">2.0</resheader>
|
||||
<resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
|
||||
<resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
|
||||
<data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
|
||||
<data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
|
||||
<data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
|
||||
<value>[base64 mime encoded serialized .NET Framework object]</value>
|
||||
</data>
|
||||
<data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
|
||||
<value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
|
||||
<comment>This is a comment</comment>
|
||||
</data>
|
||||
|
||||
There are any number of "resheader" rows that contain simple
|
||||
name/value pairs.
|
||||
|
||||
Each data row contains a name, and value. The row also contains a
|
||||
type or mimetype. Type corresponds to a .NET class that support
|
||||
text/value conversion through the TypeConverter architecture.
|
||||
Classes that don't support this are serialized and stored with the
|
||||
mimetype set.
|
||||
|
||||
The mimetype is used for serialized objects, and tells the
|
||||
ResXResourceReader how to depersist the object. This is currently not
|
||||
extensible. For a given mimetype the value must be set accordingly:
|
||||
|
||||
Note - application/x-microsoft.net.object.binary.base64 is the format
|
||||
that the ResXResourceWriter will generate, however the reader can
|
||||
read any of the formats listed below.
|
||||
|
||||
mimetype: application/x-microsoft.net.object.binary.base64
|
||||
value : The object must be serialized with
|
||||
: System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
|
||||
: and then encoded with base64 encoding.
|
||||
|
||||
mimetype: application/x-microsoft.net.object.soap.base64
|
||||
value : The object must be serialized with
|
||||
: System.Runtime.Serialization.Formatters.Soap.SoapFormatter
|
||||
: and then encoded with base64 encoding.
|
||||
|
||||
mimetype: application/x-microsoft.net.object.bytearray.base64
|
||||
value : The object must be serialized into a byte array
|
||||
: using a System.ComponentModel.TypeConverter
|
||||
: and then encoded with base64 encoding.
|
||||
-->
|
||||
<xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
|
||||
<xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
|
||||
<xsd:element name="root" msdata:IsDataSet="true">
|
||||
<xsd:complexType>
|
||||
<xsd:choice maxOccurs="unbounded">
|
||||
<xsd:element name="metadata">
|
||||
<xsd:complexType>
|
||||
<xsd:sequence>
|
||||
<xsd:element name="value" type="xsd:string" minOccurs="0" />
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="name" use="required" type="xsd:string" />
|
||||
<xsd:attribute name="type" type="xsd:string" />
|
||||
<xsd:attribute name="mimetype" type="xsd:string" />
|
||||
<xsd:attribute ref="xml:space" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
<xsd:element name="assembly">
|
||||
<xsd:complexType>
|
||||
<xsd:attribute name="alias" type="xsd:string" />
|
||||
<xsd:attribute name="name" type="xsd:string" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
<xsd:element name="data">
|
||||
<xsd:complexType>
|
||||
<xsd:sequence>
|
||||
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
|
||||
<xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" />
|
||||
<xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
|
||||
<xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
|
||||
<xsd:attribute ref="xml:space" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
<xsd:element name="resheader">
|
||||
<xsd:complexType>
|
||||
<xsd:sequence>
|
||||
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="name" type="xsd:string" use="required" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
</xsd:choice>
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
</xsd:schema>
|
||||
<resheader name="resmimetype">
|
||||
<value>text/microsoft-resx</value>
|
||||
</resheader>
|
||||
<resheader name="version">
|
||||
<value>2.0</value>
|
||||
</resheader>
|
||||
<resheader name="reader">
|
||||
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</resheader>
|
||||
<resheader name="writer">
|
||||
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</resheader>
|
||||
</root>
|
||||
Reference in New Issue
Block a user