-
Notifications
You must be signed in to change notification settings - Fork 1
/
FormBorder.cs
154 lines (138 loc) · 5.92 KB
/
FormBorder.cs
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
using System;
using System.ComponentModel;
using System.Drawing;
using System.Windows.Forms;
namespace Chess_Bot_2
{
public class FormBorder : Form
{
private string coords;
private IContainer components = null;
private Button button1;
private Panel panel1;
private Panel panel2;
private Panel panel3;
private Panel panel4;
public string Coords
{
get
{
return coords;
}
set
{
coords = value;
}
}
public FormBorder()
{
base.TransparencyKey = Color.AliceBlue;
BackColor = Color.AliceBlue;
InitializeComponent();
}
private void button1_Click(object sender, EventArgs e)
{
int num = base.Location.X + 20;
int num2 = base.Location.Y + 44;
int num3 = base.Width - 35;
int num4 = base.Height - 61;
Coords = num + ", " + num2 + ", " + num3 + ", " + num4;
}
protected override void Dispose(bool disposing)
{
if (disposing && components != null)
{
components.Dispose();
}
base.Dispose(disposing);
}
private void InitializeComponent()
{
this.button1 = new System.Windows.Forms.Button();
this.panel1 = new System.Windows.Forms.Panel();
this.panel2 = new System.Windows.Forms.Panel();
this.panel3 = new System.Windows.Forms.Panel();
this.panel4 = new System.Windows.Forms.Panel();
this.SuspendLayout();
//
// button1
//
this.button1.Anchor = System.Windows.Forms.AnchorStyles.Bottom;
this.button1.BackColor = System.Drawing.Color.DodgerBlue;
this.button1.DialogResult = System.Windows.Forms.DialogResult.OK;
this.button1.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
this.button1.Font = new System.Drawing.Font("Microsoft Sans Serif", 10F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
this.button1.ForeColor = System.Drawing.Color.White;
this.button1.Location = new System.Drawing.Point(197, 304);
this.button1.Name = "button1";
this.button1.Size = new System.Drawing.Size(120, 31);
this.button1.TabIndex = 1;
this.button1.Text = "Save";
this.button1.UseVisualStyleBackColor = false;
this.button1.Click += new System.EventHandler(this.button1_Click);
//
// panel1
//
this.panel1.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom)
| System.Windows.Forms.AnchorStyles.Left)));
this.panel1.BackColor = System.Drawing.SystemColors.ActiveCaption;
this.panel1.Location = new System.Drawing.Point(0, 0);
this.panel1.Name = "panel1";
this.panel1.Size = new System.Drawing.Size(10, 362);
this.panel1.TabIndex = 2;
//
// panel2
//
this.panel2.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom)
| System.Windows.Forms.AnchorStyles.Right)));
this.panel2.BackColor = System.Drawing.SystemColors.ActiveCaption;
this.panel2.Location = new System.Drawing.Point(524, 0);
this.panel2.Name = "panel2";
this.panel2.Size = new System.Drawing.Size(10, 362);
this.panel2.TabIndex = 3;
//
// panel3
//
this.panel3.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left)
| System.Windows.Forms.AnchorStyles.Right)));
this.panel3.BackColor = System.Drawing.SystemColors.ActiveCaption;
this.panel3.Location = new System.Drawing.Point(10, 0);
this.panel3.Name = "panel3";
this.panel3.Size = new System.Drawing.Size(515, 13);
this.panel3.TabIndex = 3;
//
// panel4
//
this.panel4.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left)
| System.Windows.Forms.AnchorStyles.Right)));
this.panel4.BackColor = System.Drawing.SystemColors.ActiveCaption;
this.panel4.Location = new System.Drawing.Point(10, 351);
this.panel4.Name = "panel4";
this.panel4.Size = new System.Drawing.Size(515, 10);
this.panel4.TabIndex = 4;
//
// FormBorder
//
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
this.ClientSize = new System.Drawing.Size(534, 361);
this.Controls.Add(this.panel4);
this.Controls.Add(this.panel3);
this.Controls.Add(this.panel2);
this.Controls.Add(this.panel1);
this.Controls.Add(this.button1);
this.MaximizeBox = false;
this.Name = "FormBorder";
this.Padding = new System.Windows.Forms.Padding(10);
this.ShowIcon = false;
this.ShowInTaskbar = false;
this.Text = "Frame";
this.TopMost = true;
this.Load += new System.EventHandler(this.FormBorder_Load);
this.ResumeLayout(false);
}
private void FormBorder_Load(object sender, EventArgs e)
{
}
}
}