1
0
mirror of https://github.com/chylex/Query.git synced 2025-07-05 15:04:38 +02:00

Compare commits

..

No commits in common. "2b9d5bba8f1277545fc1068ddb8b6e42e304b918" and "71bf0a5c4985d10ce126978970b219c03c4f6bbd" have entirely different histories.

26 changed files with 588 additions and 554 deletions

View File

@ -36,28 +36,14 @@ public abstract record Number : IAdditionOperators<Number, Number, Number>,
public override Number Pow(Number exponent) { public override Number Pow(Number exponent) {
if (exponent is Rational { Value: {} rationalExponent }) { if (exponent is Rational { Value: {} rationalExponent }) {
Fraction fractionExponent = rationalExponent.GetImproperFraction(); Fraction fractionExponent = rationalExponent.GetImproperFraction();
if (fractionExponent.Denominator == 1 && fractionExponent.Numerator >= 0) {
if (fractionExponent.Numerator >= 0 && fractionExponent.Denominator == 1) {
try { try {
return new Rational(BigRational.Pow(Value, fractionExponent.Numerator)); return new Rational(BigRational.Pow(Value, fractionExponent.Numerator));
} catch (OverflowException) {} } catch (OverflowException) {}
} }
if (fractionExponent.Numerator == 1 && fractionExponent.Denominator > 1) {
Number result = PowAsDecimal(exponent);
BigRational assumedPerfectPowerRoot = new BigRational(decimal.Floor(result.AsDecimal));
BigRational assumedPerfectPower = BigRational.Pow(assumedPerfectPowerRoot, fractionExponent.Denominator);
return assumedPerfectPower == Value ? assumedPerfectPowerRoot : result;
}
} }
return PowAsDecimal(exponent); return new Decimal(AsDecimal).Pow(exponent);
Number PowAsDecimal(Number number) {
return new Decimal(AsDecimal).Pow(number);
}
} }
public override string ToString(IFormatProvider? formatProvider) { public override string ToString(IFormatProvider? formatProvider) {

View File

@ -23,107 +23,109 @@
/// the contents of this method with the code editor. /// the contents of this method with the code editor.
/// </summary> /// </summary>
private void InitializeComponent() { private void InitializeComponent() {
components = new System.ComponentModel.Container(); this.components = new System.ComponentModel.Container();
System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(MainForm)); System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(MainForm));
queryLog = new Query.Form.QueryHistoryLog(); this.queryLog = new QueryHistoryLog();
queryBox = new Query.Form.QueryTextBox(); this.queryBox = new QueryTextBox();
trayIcon = new System.Windows.Forms.NotifyIcon(components); this.trayIcon = new System.Windows.Forms.NotifyIcon(this.components);
contextMenuTray = new System.Windows.Forms.ContextMenuStrip(components); this.contextMenuTray = new System.Windows.Forms.ContextMenuStrip(this.components);
showToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); this.showToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
hookToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); this.hookToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
exitToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); this.exitToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
contextMenuTray.SuspendLayout(); this.contextMenuTray.SuspendLayout();
SuspendLayout(); this.SuspendLayout();
// //
// queryLog // queryLog
// //
queryLog.Anchor = ((System.Windows.Forms.AnchorStyles) (((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom) | System.Windows.Forms.AnchorStyles.Left) | System.Windows.Forms.AnchorStyles.Right)); this.queryLog.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom)
queryLog.BackColor = System.Drawing.Color.Transparent; | System.Windows.Forms.AnchorStyles.Left)
queryLog.Font = new System.Drawing.Font("Consolas", 14.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte) 238)); | System.Windows.Forms.AnchorStyles.Right)));
queryLog.Location = new System.Drawing.Point(7, 8); this.queryLog.BackColor = System.Drawing.Color.Transparent;
queryLog.Margin = new System.Windows.Forms.Padding(7, 8, 7, 8); this.queryLog.Font = new System.Drawing.Font("Consolas", 14.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(238)));
queryLog.Name = "queryLog"; this.queryLog.Location = new System.Drawing.Point(5, 5);
queryLog.Size = new System.Drawing.Size(696, 296); this.queryLog.Margin = new System.Windows.Forms.Padding(5);
queryLog.TabIndex = 1; this.queryLog.Name = "queryLog";
this.queryLog.Size = new System.Drawing.Size(522, 192);
this.queryLog.TabIndex = 1;
// //
// queryBox // queryBox
// //
queryBox.BackColor = System.Drawing.Color.FromArgb(((int) ((byte) 36)), ((int) ((byte) 36)), ((int) ((byte) 36))); this.queryBox.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left)
queryBox.Dock = System.Windows.Forms.DockStyle.Bottom; | System.Windows.Forms.AnchorStyles.Right)));
queryBox.Location = new System.Drawing.Point(0, 312); this.queryBox.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(36)))), ((int)(((byte)(36)))), ((int)(((byte)(36)))));
queryBox.Margin = new System.Windows.Forms.Padding(0); this.queryBox.Location = new System.Drawing.Point(0, 202);
queryBox.Name = "queryBox"; this.queryBox.Margin = new System.Windows.Forms.Padding(0);
queryBox.Size = new System.Drawing.Size(709, 50); this.queryBox.Name = "queryBox";
queryBox.TabIndex = 0; this.queryBox.Size = new System.Drawing.Size(532, 33);
this.queryBox.TabIndex = 0;
// //
// trayIcon // trayIcon
// //
trayIcon.ContextMenuStrip = contextMenuTray; this.trayIcon.ContextMenuStrip = this.contextMenuTray;
trayIcon.Icon = ((System.Drawing.Icon) resources.GetObject("trayIcon.Icon")); this.trayIcon.Icon = ((System.Drawing.Icon)(resources.GetObject("trayIcon.Icon")));
trayIcon.Text = "Query"; this.trayIcon.Text = "Query";
trayIcon.Visible = true; this.trayIcon.Visible = true;
trayIcon.Click += trayIcon_Click; this.trayIcon.Click += new System.EventHandler(this.trayIcon_Click);
// //
// contextMenuTray // contextMenuTray
// //
contextMenuTray.ImageScalingSize = new System.Drawing.Size(20, 20); this.contextMenuTray.Items.AddRange(new System.Windows.Forms.ToolStripItem[] {
contextMenuTray.Items.AddRange(new System.Windows.Forms.ToolStripItem[] { this.showToolStripMenuItem,
showToolStripMenuItem, hookToolStripMenuItem, exitToolStripMenuItem this.hookToolStripMenuItem,
}); this.exitToolStripMenuItem});
contextMenuTray.Name = "contextMenuTray"; this.contextMenuTray.Name = "contextMenuTray";
contextMenuTray.ShowImageMargin = false; this.contextMenuTray.ShowImageMargin = false;
contextMenuTray.ShowItemToolTips = false; this.contextMenuTray.ShowItemToolTips = false;
contextMenuTray.Size = new System.Drawing.Size(90, 76); this.contextMenuTray.Size = new System.Drawing.Size(128, 92);
// //
// showToolStripMenuItem // showToolStripMenuItem
// //
showToolStripMenuItem.Name = "showToolStripMenuItem"; this.showToolStripMenuItem.Name = "showToolStripMenuItem";
showToolStripMenuItem.Size = new System.Drawing.Size(89, 24); this.showToolStripMenuItem.Size = new System.Drawing.Size(127, 22);
showToolStripMenuItem.Text = "Show"; this.showToolStripMenuItem.Text = "Show";
showToolStripMenuItem.Click += showToolStripMenuItem_Click; this.showToolStripMenuItem.Click += new System.EventHandler(this.showToolStripMenuItem_Click);
// //
// hookToolStripMenuItem // hookToolStripMenuItem
// //
hookToolStripMenuItem.Name = "hookToolStripMenuItem"; this.hookToolStripMenuItem.Name = "hookToolStripMenuItem";
hookToolStripMenuItem.Size = new System.Drawing.Size(89, 24); this.hookToolStripMenuItem.Size = new System.Drawing.Size(127, 22);
hookToolStripMenuItem.Text = "Hook"; this.hookToolStripMenuItem.Text = "Hook";
hookToolStripMenuItem.Click += hookToolStripMenuItem_Click; this.hookToolStripMenuItem.Click += new System.EventHandler(this.hookToolStripMenuItem_Click);
// //
// exitToolStripMenuItem // exitToolStripMenuItem
// //
exitToolStripMenuItem.Name = "exitToolStripMenuItem"; this.exitToolStripMenuItem.Name = "exitToolStripMenuItem";
exitToolStripMenuItem.Size = new System.Drawing.Size(89, 24); this.exitToolStripMenuItem.Size = new System.Drawing.Size(127, 22);
exitToolStripMenuItem.Text = "Exit"; this.exitToolStripMenuItem.Text = "Exit";
exitToolStripMenuItem.Click += exitToolStripMenuItem_Click; this.exitToolStripMenuItem.Click += new System.EventHandler(this.exitToolStripMenuItem_Click);
// //
// MainForm // MainForm
// //
AutoScaleDimensions = new System.Drawing.SizeF(8F, 20F); this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
BackColor = System.Drawing.Color.FromArgb(((int) ((byte) 64)), ((int) ((byte) 64)), ((int) ((byte) 64))); this.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(64)))), ((int)(((byte)(64)))), ((int)(((byte)(64)))));
ClientSize = new System.Drawing.Size(709, 362); this.ClientSize = new System.Drawing.Size(532, 235);
ControlBox = false; this.ControlBox = false;
Controls.Add(queryLog); this.Controls.Add(this.queryLog);
Controls.Add(queryBox); this.Controls.Add(this.queryBox);
FormBorderStyle = System.Windows.Forms.FormBorderStyle.None; this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.None;
Icon = ((System.Drawing.Icon) resources.GetObject("$this.Icon")); this.Icon = ((System.Drawing.Icon)(resources.GetObject("$this.Icon")));
Margin = new System.Windows.Forms.Padding(4, 5, 4, 5); this.MaximizeBox = false;
MaximizeBox = false; this.MinimizeBox = false;
MinimizeBox = false; this.Name = "MainForm";
ShowInTaskbar = false; this.ShowInTaskbar = false;
Text = "Query"; this.Text = "Query";
Deactivate += MainForm_Deactivate; this.Deactivate += new System.EventHandler(this.MainForm_Deactivate);
Shown += MainForm_Shown; this.Shown += new System.EventHandler(this.MainForm_Shown);
LocationChanged += MainForm_LocationChanged; this.contextMenuTray.ResumeLayout(false);
SizeChanged += MainForm_SizeChanged; this.ResumeLayout(false);
contextMenuTray.ResumeLayout(false);
ResumeLayout(false);
} }
#endregion #endregion
private Query.Form.QueryTextBox queryBox; private QueryTextBox queryBox;
private Query.Form.QueryHistoryLog queryLog; private QueryHistoryLog queryLog;
private System.Windows.Forms.NotifyIcon trayIcon; private System.Windows.Forms.NotifyIcon trayIcon;
private System.Windows.Forms.ContextMenuStrip contextMenuTray; private System.Windows.Forms.ContextMenuStrip contextMenuTray;
private System.Windows.Forms.ToolStripMenuItem showToolStripMenuItem; private System.Windows.Forms.ToolStripMenuItem showToolStripMenuItem;

View File

@ -45,7 +45,10 @@ sealed partial class MainForm : System.Windows.Forms.Form {
} }
private void MainForm_Shown(object? sender, EventArgs e) { private void MainForm_Shown(object? sender, EventArgs e) {
FixLocation(); if (Screen.PrimaryScreen is {} primaryScreen) {
Rectangle screenRect = primaryScreen.WorkingArea;
Location = new Point(screenRect.X + screenRect.Width - Width, screenRect.Y + screenRect.Height - Height);
}
if (!isLoaded) { if (!isLoaded) {
isLoaded = true; isLoaded = true;
@ -53,25 +56,6 @@ sealed partial class MainForm : System.Windows.Forms.Form {
} }
} }
private void MainForm_LocationChanged(object sender, EventArgs e) {
FixLocation();
}
private void MainForm_SizeChanged(object sender, EventArgs e) {
FixLocation();
}
private bool isMoving = false;
private void FixLocation() {
if (!isMoving && Screen.FromControl(this) is {} screen) {
Rectangle screenRect = screen.WorkingArea;
isMoving = true;
Location = new Point(screenRect.X + screenRect.Width - Width, screenRect.Y + screenRect.Height - Height);
isMoving = false;
}
}
private void MainForm_Deactivate(object? sender, EventArgs e) { private void MainForm_Deactivate(object? sender, EventArgs e) {
SetShown(false); SetShown(false);
} }
@ -104,8 +88,10 @@ sealed partial class MainForm : System.Windows.Forms.Form {
} }
private void focusTimer_Tick(object? sender, EventArgs e) { private void focusTimer_Tick(object? sender, EventArgs e) {
WindowState = FormWindowState.Minimized;
Show(); Show();
Activate(); Activate();
WindowState = FormWindowState.Normal;
queryBox.Focus(); queryBox.Focus();
focusTimer.Stop(); focusTimer.Stop();

View File

@ -1,5 +1,64 @@
<?xml version="1.0" encoding="utf-8"?> <?xml version="1.0" encoding="utf-8"?>
<root> <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: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:import namespace="http://www.w3.org/XML/1998/namespace" />
<xsd:element name="root" msdata:IsDataSet="true"> <xsd:element name="root" msdata:IsDataSet="true">
@ -53,19 +112,19 @@
<value>2.0</value> <value>2.0</value>
</resheader> </resheader>
<resheader name="reader"> <resheader name="reader">
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=8.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value> <value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader> </resheader>
<resheader name="writer"> <resheader name="writer">
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=8.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value> <value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader> </resheader>
<metadata name="trayIcon.TrayLocation" type="System.Drawing.Point, System.Drawing.Primitives, Version=8.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a"> <metadata name="trayIcon.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
<value>17, 17</value> <value>17, 17</value>
</metadata> </metadata>
<metadata name="contextMenuTray.TrayLocation" type="System.Drawing.Point, System.Drawing.Primitives, Version=8.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a"> <metadata name="contextMenuTray.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
<value>112, 17</value> <value>112, 17</value>
</metadata> </metadata>
<assembly alias="System.Drawing.Common" name="System.Drawing.Common, Version=8.0.0.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51" /> <assembly alias="System.Drawing" name="System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />
<data name="trayIcon.Icon" type="System.Drawing.Icon, System.Drawing.Common" mimetype="application/x-microsoft.net.object.bytearray.base64"> <data name="trayIcon.Icon" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
<value> <value>
AAABAAEAGBgAAAEAIACICQAAFgAAACgAAAAYAAAAMAAAAAEAIAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA AAABAAEAGBgAAAEAIACICQAAFgAAACgAAAAYAAAAMAAAAAEAIAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
AAAkJCT/JCQk/yQkJP8kJCT/JCQk/yQkJP8kJCT/JCQk/yQkJP8kJCT/JCQk/yQkJP8kJCT/JCQk/yQk AAAkJCT/JCQk/yQkJP8kJCT/JCQk/yQkJP8kJCT/JCQk/yQkJP8kJCT/JCQk/yQkJP8kJCT/JCQk/yQk
@ -111,7 +170,7 @@
AEE= AEE=
</value> </value>
</data> </data>
<data name="$this.Icon" type="System.Drawing.Icon, System.Drawing.Common" mimetype="application/x-microsoft.net.object.bytearray.base64"> <data name="$this.Icon" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
<value> <value>
AAABAAEAGBgAAAEAIACICQAAFgAAACgAAAAYAAAAMAAAAAEAIAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA AAABAAEAGBgAAAEAIACICQAAFgAAACgAAAAYAAAAMAAAAAEAIAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
AAAkJCT/JCQk/yQkJP8kJCT/JCQk/yQkJP8kJCT/JCQk/yQkJP8kJCT/JCQk/yQkJP8kJCT/JCQk/yQk AAAkJCT/JCQk/yQkJP8kJCT/JCQk/yQkJP8kJCT/JCQk/yQkJP8kJCT/JCQk/yQkJP8kJCT/JCQk/yQk

View File

@ -23,32 +23,31 @@
/// the contents of this method with the code editor. /// the contents of this method with the code editor.
/// </summary> /// </summary>
private void InitializeComponent() { private void InitializeComponent() {
container = new System.Windows.Forms.FlowLayoutPanel(); this.container = new System.Windows.Forms.FlowLayoutPanel();
SuspendLayout(); this.SuspendLayout();
// //
// container // container
// //
container.AutoScroll = true; this.container.AutoScroll = true;
container.Dock = System.Windows.Forms.DockStyle.Fill; this.container.Dock = System.Windows.Forms.DockStyle.Fill;
container.FlowDirection = System.Windows.Forms.FlowDirection.TopDown; this.container.FlowDirection = System.Windows.Forms.FlowDirection.TopDown;
container.ForeColor = System.Drawing.Color.FromArgb(((int) ((byte) 240)), ((int) ((byte) 240)), ((int) ((byte) 240))); this.container.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(240)))), ((int)(((byte)(240)))), ((int)(((byte)(240)))));
container.Location = new System.Drawing.Point(0, 0); this.container.Location = new System.Drawing.Point(0, 0);
container.Margin = new System.Windows.Forms.Padding(4); this.container.Name = "container";
container.Name = "container"; this.container.Size = new System.Drawing.Size(150, 150);
container.Size = new System.Drawing.Size(195, 191); this.container.TabIndex = 0;
container.TabIndex = 0; this.container.WrapContents = false;
container.WrapContents = false;
// //
// QueryHistoryLog // QueryHistoryLog
// //
AutoScaleDimensions = new System.Drawing.SizeF(8F, 20F); this.AutoScaleDimensions = new System.Drawing.SizeF(10F, 22F);
AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
BackColor = System.Drawing.Color.Transparent; this.BackColor = System.Drawing.Color.Transparent;
Controls.Add(container); this.Controls.Add(this.container);
Font = new System.Drawing.Font("Consolas", 14.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte) 238)); this.Font = new System.Drawing.Font("Consolas", 14.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(238)));
Margin = new System.Windows.Forms.Padding(4); this.Name = "QueryHistoryLog";
Size = new System.Drawing.Size(195, 191); this.ResumeLayout(false);
ResumeLayout(false);
} }
#endregion #endregion

View File

@ -23,36 +23,39 @@
/// the contents of this method with the code editor. /// the contents of this method with the code editor.
/// </summary> /// </summary>
private void InitializeComponent() { private void InitializeComponent() {
tb = new Query.Form.QueryTextBox.CustomTextBox(); this.tb = new CustomTextBox();
SuspendLayout(); this.SuspendLayout();
// //
// tb // tb
// //
tb.Anchor = ((System.Windows.Forms.AnchorStyles) (((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom) | System.Windows.Forms.AnchorStyles.Left) | System.Windows.Forms.AnchorStyles.Right)); this.tb.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom)
tb.BackColor = System.Drawing.Color.FromArgb(((int) ((byte) 36)), ((int) ((byte) 36)), ((int) ((byte) 36))); | System.Windows.Forms.AnchorStyles.Left)
tb.BorderStyle = System.Windows.Forms.BorderStyle.None; | System.Windows.Forms.AnchorStyles.Right)));
tb.Font = new System.Drawing.Font("Consolas", 14.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte) 238)); this.tb.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(36)))), ((int)(((byte)(36)))), ((int)(((byte)(36)))));
tb.ForeColor = System.Drawing.Color.FromArgb(((int) ((byte) 240)), ((int) ((byte) 240)), ((int) ((byte) 240))); this.tb.BorderStyle = System.Windows.Forms.BorderStyle.None;
tb.Location = new System.Drawing.Point(11, 11); this.tb.Font = new System.Drawing.Font("Consolas", 14.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(238)));
tb.Margin = new System.Windows.Forms.Padding(11); this.tb.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(240)))), ((int)(((byte)(240)))), ((int)(((byte)(240)))));
tb.Name = "tb"; this.tb.Location = new System.Drawing.Point(5, 6);
tb.Size = new System.Drawing.Size(670, 28); this.tb.Margin = new System.Windows.Forms.Padding(5);
tb.TabIndex = 0; this.tb.Name = "tb";
this.tb.Size = new System.Drawing.Size(509, 23);
this.tb.TabIndex = 0;
// //
// QueryTextBox // QueryTextBox
// //
AutoScaleDimensions = new System.Drawing.SizeF(8F, 20F); this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
BackColor = System.Drawing.Color.FromArgb(((int) ((byte) 36)), ((int) ((byte) 36)), ((int) ((byte) 36))); this.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(36)))), ((int)(((byte)(36)))), ((int)(((byte)(36)))));
Controls.Add(tb); this.Controls.Add(this.tb);
Margin = new System.Windows.Forms.Padding(4, 5, 4, 5); this.Name = "QueryTextBox";
Size = new System.Drawing.Size(692, 50); this.Size = new System.Drawing.Size(519, 33);
ResumeLayout(false); this.ResumeLayout(false);
PerformLayout(); this.PerformLayout();
} }
#endregion #endregion
private Query.Form.QueryTextBox.CustomTextBox tb; private CustomTextBox tb;
} }
} }

View File

@ -8,7 +8,6 @@ static class Program {
[STAThread] [STAThread]
private static void Main() { private static void Main() {
Application.EnableVisualStyles(); Application.EnableVisualStyles();
Application.SetHighDpiMode(HighDpiMode.PerMonitorV2);
Application.SetCompatibleTextRenderingDefault(false); Application.SetCompatibleTextRenderingDefault(false);
Application.Run(new MainForm()); Application.Run(new MainForm());
} }