199 lines
11 KiB
C#
199 lines
11 KiB
C#
namespace KVMote
|
|
{
|
|
partial class Principal
|
|
{
|
|
private System.Windows.Forms.Button btnAbove;
|
|
private System.Windows.Forms.Button btnLeft;
|
|
private System.Windows.Forms.Button btnRight;
|
|
private System.Windows.Forms.Button btnBelow;
|
|
private System.Windows.Forms.Label lblHost;
|
|
private System.Windows.Forms.Label lblPosition;
|
|
private System.Windows.Forms.Label lblPortInfo;
|
|
private System.Windows.Forms.Button btnDetect;
|
|
private System.Windows.Forms.Button btnConnect;
|
|
private System.Windows.Forms.Panel pnlBottom;
|
|
private System.Windows.Forms.Label lblStatus;
|
|
private System.Windows.Forms.Panel pnlContent;
|
|
private System.Windows.Forms.Label lblLayout;
|
|
private System.Windows.Forms.ComboBox cmbLayout;
|
|
|
|
private void InitializeComponent()
|
|
{
|
|
this.pnlContent = new System.Windows.Forms.Panel();
|
|
this.pnlBottom = new System.Windows.Forms.Panel();
|
|
this.lblLayout = new System.Windows.Forms.Label();
|
|
this.cmbLayout = new System.Windows.Forms.ComboBox();
|
|
this.lblPosition = new System.Windows.Forms.Label();
|
|
this.btnAbove = new System.Windows.Forms.Button();
|
|
this.btnLeft = new System.Windows.Forms.Button();
|
|
this.lblHost = new System.Windows.Forms.Label();
|
|
this.btnRight = new System.Windows.Forms.Button();
|
|
this.btnBelow = new System.Windows.Forms.Button();
|
|
this.lblPortInfo = new System.Windows.Forms.Label();
|
|
this.btnDetect = new System.Windows.Forms.Button();
|
|
this.btnConnect = new System.Windows.Forms.Button();
|
|
this.lblStatus = new System.Windows.Forms.Label();
|
|
|
|
this.pnlContent.SuspendLayout();
|
|
this.pnlBottom.SuspendLayout();
|
|
this.SuspendLayout();
|
|
|
|
var clrNormal = System.Drawing.Color.FromArgb(55, 55, 55);
|
|
var clrBorder = System.Drawing.Color.FromArgb(90, 90, 90);
|
|
var clrSilver = System.Drawing.Color.Silver;
|
|
var clrWhite = System.Drawing.Color.White;
|
|
var fntUI = new System.Drawing.Font("Segoe UI", 9f);
|
|
var fntBold = new System.Drawing.Font("Segoe UI", 9f, System.Drawing.FontStyle.Bold);
|
|
|
|
int gx = 56, gy = 60;
|
|
int cw = 84, ch = 32, cg = 8;
|
|
|
|
this.lblPosition.Text = "Posição do PC Cliente:";
|
|
this.lblPosition.ForeColor = clrSilver;
|
|
this.lblPosition.Font = fntUI;
|
|
this.lblPosition.AutoSize = true;
|
|
this.lblPosition.Location = new System.Drawing.Point(gx, 22);
|
|
|
|
this.btnAbove.Name = "btnAbove";
|
|
this.btnAbove.Text = "Acima";
|
|
this.btnAbove.Location = new System.Drawing.Point(gx + cw + cg, gy);
|
|
this.btnAbove.Size = new System.Drawing.Size(cw, ch);
|
|
this.btnAbove.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
|
|
this.btnAbove.BackColor = clrNormal;
|
|
this.btnAbove.ForeColor = clrSilver;
|
|
this.btnAbove.Font = fntUI;
|
|
this.btnAbove.FlatAppearance.BorderColor = clrBorder;
|
|
this.btnAbove.Click += new System.EventHandler(this.btnPosition_Click);
|
|
|
|
this.btnLeft.Name = "btnLeft";
|
|
this.btnLeft.Text = "Esquerda";
|
|
this.btnLeft.Location = new System.Drawing.Point(gx, gy + ch + cg);
|
|
this.btnLeft.Size = new System.Drawing.Size(cw, ch);
|
|
this.btnLeft.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
|
|
this.btnLeft.BackColor = clrNormal;
|
|
this.btnLeft.ForeColor = clrSilver;
|
|
this.btnLeft.Font = fntUI;
|
|
this.btnLeft.FlatAppearance.BorderColor = clrBorder;
|
|
this.btnLeft.Click += new System.EventHandler(this.btnPosition_Click);
|
|
|
|
this.lblHost.Text = "[HOST PC]";
|
|
this.lblHost.Location = new System.Drawing.Point(gx + cw + cg, gy + ch + cg);
|
|
this.lblHost.Size = new System.Drawing.Size(cw, ch);
|
|
this.lblHost.TextAlign = System.Drawing.ContentAlignment.MiddleCenter;
|
|
this.lblHost.BackColor = System.Drawing.Color.FromArgb(30, 60, 100);
|
|
this.lblHost.ForeColor = clrWhite;
|
|
this.lblHost.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle;
|
|
this.lblHost.Font = new System.Drawing.Font("Segoe UI", 8f, System.Drawing.FontStyle.Bold);
|
|
|
|
this.btnRight.Name = "btnRight";
|
|
this.btnRight.Text = "Direita";
|
|
this.btnRight.Location = new System.Drawing.Point(gx + (cw + cg) * 2, gy + ch + cg);
|
|
this.btnRight.Size = new System.Drawing.Size(cw, ch);
|
|
this.btnRight.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
|
|
this.btnRight.BackColor = clrNormal;
|
|
this.btnRight.ForeColor = clrSilver;
|
|
this.btnRight.Font = fntUI;
|
|
this.btnRight.FlatAppearance.BorderColor = clrBorder;
|
|
this.btnRight.Click += new System.EventHandler(this.btnPosition_Click);
|
|
|
|
this.btnBelow.Name = "btnBelow";
|
|
this.btnBelow.Text = "Abaixo";
|
|
this.btnBelow.Location = new System.Drawing.Point(gx + cw + cg, gy + (ch + cg) * 2);
|
|
this.btnBelow.Size = new System.Drawing.Size(cw, ch);
|
|
this.btnBelow.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
|
|
this.btnBelow.BackColor = clrNormal;
|
|
this.btnBelow.ForeColor = clrSilver;
|
|
this.btnBelow.Font = fntUI;
|
|
this.btnBelow.FlatAppearance.BorderColor = clrBorder;
|
|
this.btnBelow.Click += new System.EventHandler(this.btnPosition_Click);
|
|
|
|
int sepY = gy + (ch + cg) * 3 + 4;
|
|
|
|
this.lblPortInfo.Text = "Porta: detectando...";
|
|
this.lblPortInfo.Location = new System.Drawing.Point(gx, sepY + 10);
|
|
this.lblPortInfo.Size = new System.Drawing.Size(268, 20);
|
|
this.lblPortInfo.ForeColor = clrSilver;
|
|
this.lblPortInfo.Font = fntUI;
|
|
|
|
this.btnDetect.Text = "Detectar";
|
|
this.btnDetect.Location = new System.Drawing.Point(gx, sepY + 36);
|
|
this.btnDetect.Size = new System.Drawing.Size(100, 30);
|
|
this.btnDetect.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
|
|
this.btnDetect.BackColor = System.Drawing.Color.FromArgb(65, 65, 65);
|
|
this.btnDetect.ForeColor = clrWhite;
|
|
this.btnDetect.Font = fntUI;
|
|
this.btnDetect.FlatAppearance.BorderColor = clrBorder;
|
|
this.btnDetect.Click += new System.EventHandler(this.btnDetect_Click);
|
|
|
|
this.btnConnect.Text = "Conectar";
|
|
this.btnConnect.Location = new System.Drawing.Point(gx + 108, sepY + 36);
|
|
this.btnConnect.Size = new System.Drawing.Size(160, 30);
|
|
this.btnConnect.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
|
|
this.btnConnect.BackColor = System.Drawing.Color.FromArgb(0, 122, 204);
|
|
this.btnConnect.ForeColor = clrWhite;
|
|
this.btnConnect.Font = fntBold;
|
|
this.btnConnect.FlatAppearance.BorderColor = System.Drawing.Color.FromArgb(0, 100, 180);
|
|
this.btnConnect.Click += new System.EventHandler(this.btnConnect_Click);
|
|
|
|
this.lblLayout.Text = "Layout do cliente:";
|
|
this.lblLayout.ForeColor = clrSilver;
|
|
this.lblLayout.Font = fntUI;
|
|
this.lblLayout.AutoSize = true;
|
|
this.lblLayout.Location = new System.Drawing.Point(gx, sepY + 78);
|
|
|
|
this.cmbLayout.Items.AddRange(new object[] { "US / Internacional", "PT-BR ABNT2" });
|
|
this.cmbLayout.SelectedIndex = 0;
|
|
this.cmbLayout.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList;
|
|
this.cmbLayout.Location = new System.Drawing.Point(gx + 120, sepY + 74);
|
|
this.cmbLayout.Size = new System.Drawing.Size(148, 22);
|
|
this.cmbLayout.Font = fntUI;
|
|
this.cmbLayout.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
|
|
this.cmbLayout.BackColor = System.Drawing.Color.FromArgb(40, 40, 40);
|
|
this.cmbLayout.ForeColor = clrWhite;
|
|
this.cmbLayout.SelectedIndexChanged += new System.EventHandler(this.cmbLayout_SelectedIndexChanged);
|
|
|
|
this.pnlContent.BackColor = System.Drawing.Color.FromArgb(20, 20, 20);
|
|
this.pnlContent.Dock = System.Windows.Forms.DockStyle.Fill;
|
|
this.pnlContent.Controls.Add(this.lblPosition);
|
|
this.pnlContent.Controls.Add(this.btnAbove);
|
|
this.pnlContent.Controls.Add(this.btnLeft);
|
|
this.pnlContent.Controls.Add(this.lblHost);
|
|
this.pnlContent.Controls.Add(this.btnRight);
|
|
this.pnlContent.Controls.Add(this.btnBelow);
|
|
this.pnlContent.Controls.Add(this.lblPortInfo);
|
|
this.pnlContent.Controls.Add(this.btnDetect);
|
|
this.pnlContent.Controls.Add(this.btnConnect);
|
|
this.pnlContent.Controls.Add(this.lblLayout);
|
|
this.pnlContent.Controls.Add(this.cmbLayout);
|
|
this.pnlBottom.BackColor = System.Drawing.Color.FromArgb(40, 40, 40);
|
|
this.pnlBottom.Dock = System.Windows.Forms.DockStyle.Bottom;
|
|
this.pnlBottom.Height = 28;
|
|
this.pnlBottom.Controls.Add(this.lblStatus);
|
|
|
|
this.lblStatus.Text = "Desconectado";
|
|
this.lblStatus.ForeColor = System.Drawing.Color.Gray;
|
|
this.lblStatus.Font = fntUI;
|
|
this.lblStatus.AutoSize = true;
|
|
this.lblStatus.Location = new System.Drawing.Point(8, 6);
|
|
|
|
int contentH = sepY + 74 + 22 + 16;
|
|
|
|
this.AutoScaleDimensions = new System.Drawing.SizeF(96F, 96F);
|
|
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Dpi;
|
|
this.BackColor = System.Drawing.Color.FromArgb(20, 20, 20);
|
|
this.ClientSize = new System.Drawing.Size(380, contentH + 28);
|
|
this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedSingle;
|
|
this.MaximizeBox = false;
|
|
this.Text = "KVMote \u2014 KVM over Bluetooth";
|
|
this.StartPosition = System.Windows.Forms.FormStartPosition.CenterScreen;
|
|
this.Controls.Add(this.pnlContent);
|
|
this.Controls.Add(this.pnlBottom);
|
|
|
|
this.pnlContent.ResumeLayout(false);
|
|
this.pnlBottom.ResumeLayout(false);
|
|
this.pnlBottom.PerformLayout();
|
|
this.ResumeLayout(false);
|
|
}
|
|
}
|
|
}
|