diff --git a/acnhpoker/Form1.Designer.cs b/acnhpoker/Form1.Designer.cs index b1c0eb5..b1ebd70 100644 --- a/acnhpoker/Form1.Designer.cs +++ b/acnhpoker/Form1.Designer.cs @@ -90,320 +90,340 @@ private void InitializeComponent() this.slotBtn1.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(114)))), ((int)(((byte)(137)))), ((int)(((byte)(218))))); this.slotBtn1.FlatAppearance.BorderSize = 0; this.slotBtn1.FlatStyle = System.Windows.Forms.FlatStyle.Flat; - this.slotBtn1.Font = new System.Drawing.Font("Microsoft Sans Serif", 18F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.slotBtn1.Font = new System.Drawing.Font("Microsoft Sans Serif", 14.25F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0))); this.slotBtn1.ForeColor = System.Drawing.Color.White; this.slotBtn1.Location = new System.Drawing.Point(12, 51); this.slotBtn1.Name = "slotBtn1"; this.slotBtn1.Size = new System.Drawing.Size(75, 75); this.slotBtn1.TabIndex = 9; this.slotBtn1.Tag = "1"; - this.slotBtn1.Text = "slot 1"; + this.slotBtn1.TextAlign = System.Drawing.ContentAlignment.TopLeft; this.slotBtn1.UseVisualStyleBackColor = false; this.slotBtn1.Click += new System.EventHandler(this.slotBtn_Click); + this.slotBtn1.Paint += new System.Windows.Forms.PaintEventHandler(this.slotBtn_Paint); // // button1 // this.button1.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(114)))), ((int)(((byte)(137)))), ((int)(((byte)(218))))); this.button1.FlatAppearance.BorderSize = 0; this.button1.FlatStyle = System.Windows.Forms.FlatStyle.Flat; - this.button1.Font = new System.Drawing.Font("Microsoft Sans Serif", 18F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.button1.Font = new System.Drawing.Font("Microsoft Sans Serif", 14.25F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0))); this.button1.ForeColor = System.Drawing.Color.White; this.button1.Location = new System.Drawing.Point(93, 51); this.button1.Name = "button1"; this.button1.Size = new System.Drawing.Size(75, 75); this.button1.TabIndex = 10; this.button1.Tag = "2"; - this.button1.Text = "slot2"; + this.button1.TextAlign = System.Drawing.ContentAlignment.TopLeft; this.button1.UseVisualStyleBackColor = false; this.button1.Click += new System.EventHandler(this.slotBtn_Click); + this.button1.Paint += new System.Windows.Forms.PaintEventHandler(this.slotBtn_Paint); // // button2 // this.button2.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(114)))), ((int)(((byte)(137)))), ((int)(((byte)(218))))); this.button2.FlatAppearance.BorderSize = 0; this.button2.FlatStyle = System.Windows.Forms.FlatStyle.Flat; - this.button2.Font = new System.Drawing.Font("Microsoft Sans Serif", 18F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.button2.Font = new System.Drawing.Font("Microsoft Sans Serif", 14.25F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0))); this.button2.ForeColor = System.Drawing.Color.White; this.button2.Location = new System.Drawing.Point(174, 51); this.button2.Name = "button2"; this.button2.Size = new System.Drawing.Size(75, 75); this.button2.TabIndex = 11; this.button2.Tag = "3"; - this.button2.Text = "slot3"; + this.button2.TextAlign = System.Drawing.ContentAlignment.TopLeft; this.button2.UseVisualStyleBackColor = false; this.button2.Click += new System.EventHandler(this.slotBtn_Click); + this.button2.Paint += new System.Windows.Forms.PaintEventHandler(this.slotBtn_Paint); // // button3 // this.button3.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(114)))), ((int)(((byte)(137)))), ((int)(((byte)(218))))); this.button3.FlatAppearance.BorderSize = 0; this.button3.FlatStyle = System.Windows.Forms.FlatStyle.Flat; - this.button3.Font = new System.Drawing.Font("Microsoft Sans Serif", 18F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.button3.Font = new System.Drawing.Font("Microsoft Sans Serif", 14.25F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0))); this.button3.ForeColor = System.Drawing.Color.White; this.button3.Location = new System.Drawing.Point(255, 51); this.button3.Name = "button3"; this.button3.Size = new System.Drawing.Size(75, 75); this.button3.TabIndex = 12; this.button3.Tag = "4"; - this.button3.Text = "slot4"; + this.button3.TextAlign = System.Drawing.ContentAlignment.TopLeft; this.button3.UseVisualStyleBackColor = false; this.button3.Click += new System.EventHandler(this.slotBtn_Click); + this.button3.Paint += new System.Windows.Forms.PaintEventHandler(this.slotBtn_Paint); // // button4 // this.button4.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(114)))), ((int)(((byte)(137)))), ((int)(((byte)(218))))); this.button4.FlatAppearance.BorderSize = 0; this.button4.FlatStyle = System.Windows.Forms.FlatStyle.Flat; - this.button4.Font = new System.Drawing.Font("Microsoft Sans Serif", 18F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.button4.Font = new System.Drawing.Font("Microsoft Sans Serif", 14.25F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0))); this.button4.ForeColor = System.Drawing.Color.White; this.button4.Location = new System.Drawing.Point(336, 51); this.button4.Name = "button4"; this.button4.Size = new System.Drawing.Size(75, 75); this.button4.TabIndex = 13; this.button4.Tag = "5"; - this.button4.Text = "slot5"; + this.button4.TextAlign = System.Drawing.ContentAlignment.TopLeft; this.button4.UseVisualStyleBackColor = false; this.button4.Click += new System.EventHandler(this.slotBtn_Click); + this.button4.Paint += new System.Windows.Forms.PaintEventHandler(this.slotBtn_Paint); // // button5 // this.button5.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(114)))), ((int)(((byte)(137)))), ((int)(((byte)(218))))); this.button5.FlatAppearance.BorderSize = 0; this.button5.FlatStyle = System.Windows.Forms.FlatStyle.Flat; - this.button5.Font = new System.Drawing.Font("Microsoft Sans Serif", 18F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.button5.Font = new System.Drawing.Font("Microsoft Sans Serif", 14.25F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0))); this.button5.ForeColor = System.Drawing.Color.White; this.button5.Location = new System.Drawing.Point(417, 51); this.button5.Name = "button5"; this.button5.Size = new System.Drawing.Size(75, 75); this.button5.TabIndex = 14; this.button5.Tag = "6"; - this.button5.Text = "slot6"; + this.button5.TextAlign = System.Drawing.ContentAlignment.TopLeft; this.button5.UseVisualStyleBackColor = false; this.button5.Click += new System.EventHandler(this.slotBtn_Click); + this.button5.Paint += new System.Windows.Forms.PaintEventHandler(this.slotBtn_Paint); // // button6 // this.button6.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(114)))), ((int)(((byte)(137)))), ((int)(((byte)(218))))); this.button6.FlatAppearance.BorderSize = 0; this.button6.FlatStyle = System.Windows.Forms.FlatStyle.Flat; - this.button6.Font = new System.Drawing.Font("Microsoft Sans Serif", 18F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.button6.Font = new System.Drawing.Font("Microsoft Sans Serif", 14.25F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0))); this.button6.ForeColor = System.Drawing.Color.White; this.button6.Location = new System.Drawing.Point(498, 51); this.button6.Name = "button6"; this.button6.Size = new System.Drawing.Size(75, 75); this.button6.TabIndex = 15; this.button6.Tag = "7"; - this.button6.Text = "slot7"; + this.button6.TextAlign = System.Drawing.ContentAlignment.TopLeft; this.button6.UseVisualStyleBackColor = false; this.button6.Click += new System.EventHandler(this.slotBtn_Click); + this.button6.Paint += new System.Windows.Forms.PaintEventHandler(this.slotBtn_Paint); // // button7 // this.button7.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(114)))), ((int)(((byte)(137)))), ((int)(((byte)(218))))); this.button7.FlatAppearance.BorderSize = 0; this.button7.FlatStyle = System.Windows.Forms.FlatStyle.Flat; - this.button7.Font = new System.Drawing.Font("Microsoft Sans Serif", 18F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.button7.Font = new System.Drawing.Font("Microsoft Sans Serif", 14.25F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0))); this.button7.ForeColor = System.Drawing.Color.White; this.button7.Location = new System.Drawing.Point(579, 51); this.button7.Name = "button7"; this.button7.Size = new System.Drawing.Size(75, 75); this.button7.TabIndex = 16; this.button7.Tag = "8"; - this.button7.Text = "slot8"; + this.button7.TextAlign = System.Drawing.ContentAlignment.TopLeft; this.button7.UseVisualStyleBackColor = false; this.button7.Click += new System.EventHandler(this.slotBtn_Click); + this.button7.Paint += new System.Windows.Forms.PaintEventHandler(this.slotBtn_Paint); // // button8 // this.button8.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(114)))), ((int)(((byte)(137)))), ((int)(((byte)(218))))); this.button8.FlatAppearance.BorderSize = 0; this.button8.FlatStyle = System.Windows.Forms.FlatStyle.Flat; - this.button8.Font = new System.Drawing.Font("Microsoft Sans Serif", 18F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.button8.Font = new System.Drawing.Font("Microsoft Sans Serif", 14.25F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0))); this.button8.ForeColor = System.Drawing.Color.White; this.button8.Location = new System.Drawing.Point(660, 51); this.button8.Name = "button8"; this.button8.Size = new System.Drawing.Size(75, 75); this.button8.TabIndex = 17; this.button8.Tag = "9"; - this.button8.Text = "slot9"; + this.button8.TextAlign = System.Drawing.ContentAlignment.TopLeft; this.button8.UseVisualStyleBackColor = false; this.button8.Click += new System.EventHandler(this.slotBtn_Click); + this.button8.Paint += new System.Windows.Forms.PaintEventHandler(this.slotBtn_Paint); // // button9 // this.button9.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(114)))), ((int)(((byte)(137)))), ((int)(((byte)(218))))); this.button9.FlatAppearance.BorderSize = 0; this.button9.FlatStyle = System.Windows.Forms.FlatStyle.Flat; - this.button9.Font = new System.Drawing.Font("Microsoft Sans Serif", 18F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.button9.Font = new System.Drawing.Font("Microsoft Sans Serif", 14.25F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0))); this.button9.ForeColor = System.Drawing.Color.White; this.button9.Location = new System.Drawing.Point(741, 51); this.button9.Name = "button9"; this.button9.Size = new System.Drawing.Size(75, 75); this.button9.TabIndex = 18; this.button9.Tag = "10"; - this.button9.Text = "slot10"; + this.button9.TextAlign = System.Drawing.ContentAlignment.TopLeft; this.button9.UseVisualStyleBackColor = false; this.button9.Click += new System.EventHandler(this.slotBtn_Click); + this.button9.Paint += new System.Windows.Forms.PaintEventHandler(this.slotBtn_Paint); // // button10 // this.button10.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(114)))), ((int)(((byte)(137)))), ((int)(((byte)(218))))); this.button10.FlatAppearance.BorderSize = 0; this.button10.FlatStyle = System.Windows.Forms.FlatStyle.Flat; - this.button10.Font = new System.Drawing.Font("Microsoft Sans Serif", 18F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.button10.Font = new System.Drawing.Font("Microsoft Sans Serif", 14.25F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0))); this.button10.ForeColor = System.Drawing.Color.White; this.button10.Location = new System.Drawing.Point(741, 132); this.button10.Name = "button10"; this.button10.Size = new System.Drawing.Size(75, 75); this.button10.TabIndex = 28; this.button10.Tag = "20"; - this.button10.Text = "slot20"; + this.button10.TextAlign = System.Drawing.ContentAlignment.TopLeft; this.button10.UseVisualStyleBackColor = false; this.button10.Click += new System.EventHandler(this.slotBtn_Click); + this.button10.Paint += new System.Windows.Forms.PaintEventHandler(this.slotBtn_Paint); // // button11 // this.button11.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(114)))), ((int)(((byte)(137)))), ((int)(((byte)(218))))); this.button11.FlatAppearance.BorderSize = 0; this.button11.FlatStyle = System.Windows.Forms.FlatStyle.Flat; - this.button11.Font = new System.Drawing.Font("Microsoft Sans Serif", 18F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.button11.Font = new System.Drawing.Font("Microsoft Sans Serif", 14.25F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0))); this.button11.ForeColor = System.Drawing.Color.White; this.button11.Location = new System.Drawing.Point(660, 132); this.button11.Name = "button11"; this.button11.Size = new System.Drawing.Size(75, 75); this.button11.TabIndex = 27; this.button11.Tag = "19"; - this.button11.Text = "slot19"; + this.button11.TextAlign = System.Drawing.ContentAlignment.TopLeft; this.button11.UseVisualStyleBackColor = false; this.button11.Click += new System.EventHandler(this.slotBtn_Click); + this.button11.Paint += new System.Windows.Forms.PaintEventHandler(this.slotBtn_Paint); // // button12 // this.button12.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(114)))), ((int)(((byte)(137)))), ((int)(((byte)(218))))); this.button12.FlatAppearance.BorderSize = 0; this.button12.FlatStyle = System.Windows.Forms.FlatStyle.Flat; - this.button12.Font = new System.Drawing.Font("Microsoft Sans Serif", 18F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.button12.Font = new System.Drawing.Font("Microsoft Sans Serif", 14.25F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0))); this.button12.ForeColor = System.Drawing.Color.White; this.button12.Location = new System.Drawing.Point(579, 132); this.button12.Name = "button12"; this.button12.Size = new System.Drawing.Size(75, 75); this.button12.TabIndex = 26; this.button12.Tag = "18"; - this.button12.Text = "slot18"; + this.button12.TextAlign = System.Drawing.ContentAlignment.TopLeft; this.button12.UseVisualStyleBackColor = false; this.button12.Click += new System.EventHandler(this.slotBtn_Click); + this.button12.Paint += new System.Windows.Forms.PaintEventHandler(this.slotBtn_Paint); // // button13 // this.button13.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(114)))), ((int)(((byte)(137)))), ((int)(((byte)(218))))); this.button13.FlatAppearance.BorderSize = 0; this.button13.FlatStyle = System.Windows.Forms.FlatStyle.Flat; - this.button13.Font = new System.Drawing.Font("Microsoft Sans Serif", 18F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.button13.Font = new System.Drawing.Font("Microsoft Sans Serif", 14.25F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0))); this.button13.ForeColor = System.Drawing.Color.White; this.button13.Location = new System.Drawing.Point(498, 132); this.button13.Name = "button13"; this.button13.Size = new System.Drawing.Size(75, 75); this.button13.TabIndex = 25; this.button13.Tag = "17"; - this.button13.Text = "slot17"; + this.button13.TextAlign = System.Drawing.ContentAlignment.TopLeft; this.button13.UseVisualStyleBackColor = false; this.button13.Click += new System.EventHandler(this.slotBtn_Click); + this.button13.Paint += new System.Windows.Forms.PaintEventHandler(this.slotBtn_Paint); // // button14 // this.button14.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(114)))), ((int)(((byte)(137)))), ((int)(((byte)(218))))); this.button14.FlatAppearance.BorderSize = 0; this.button14.FlatStyle = System.Windows.Forms.FlatStyle.Flat; - this.button14.Font = new System.Drawing.Font("Microsoft Sans Serif", 18F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.button14.Font = new System.Drawing.Font("Microsoft Sans Serif", 14.25F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0))); this.button14.ForeColor = System.Drawing.Color.White; this.button14.Location = new System.Drawing.Point(417, 132); this.button14.Name = "button14"; this.button14.Size = new System.Drawing.Size(75, 75); this.button14.TabIndex = 24; this.button14.Tag = "16"; - this.button14.Text = "slot16"; + this.button14.TextAlign = System.Drawing.ContentAlignment.TopLeft; this.button14.UseVisualStyleBackColor = false; this.button14.Click += new System.EventHandler(this.slotBtn_Click); + this.button14.Paint += new System.Windows.Forms.PaintEventHandler(this.slotBtn_Paint); // // button15 // this.button15.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(114)))), ((int)(((byte)(137)))), ((int)(((byte)(218))))); this.button15.FlatAppearance.BorderSize = 0; this.button15.FlatStyle = System.Windows.Forms.FlatStyle.Flat; - this.button15.Font = new System.Drawing.Font("Microsoft Sans Serif", 18F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.button15.Font = new System.Drawing.Font("Microsoft Sans Serif", 14.25F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0))); this.button15.ForeColor = System.Drawing.Color.White; this.button15.Location = new System.Drawing.Point(336, 132); this.button15.Name = "button15"; this.button15.Size = new System.Drawing.Size(75, 75); this.button15.TabIndex = 23; this.button15.Tag = "15"; - this.button15.Text = "slot 15"; + this.button15.TextAlign = System.Drawing.ContentAlignment.TopLeft; this.button15.UseVisualStyleBackColor = false; this.button15.Click += new System.EventHandler(this.slotBtn_Click); + this.button15.Paint += new System.Windows.Forms.PaintEventHandler(this.slotBtn_Paint); // // button16 // this.button16.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(114)))), ((int)(((byte)(137)))), ((int)(((byte)(218))))); this.button16.FlatAppearance.BorderSize = 0; this.button16.FlatStyle = System.Windows.Forms.FlatStyle.Flat; - this.button16.Font = new System.Drawing.Font("Microsoft Sans Serif", 18F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.button16.Font = new System.Drawing.Font("Microsoft Sans Serif", 14.25F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0))); this.button16.ForeColor = System.Drawing.Color.White; this.button16.Location = new System.Drawing.Point(255, 132); this.button16.Name = "button16"; this.button16.Size = new System.Drawing.Size(75, 75); this.button16.TabIndex = 22; this.button16.Tag = "14"; - this.button16.Text = "slot14"; + this.button16.TextAlign = System.Drawing.ContentAlignment.TopLeft; this.button16.UseVisualStyleBackColor = false; this.button16.Click += new System.EventHandler(this.slotBtn_Click); + this.button16.Paint += new System.Windows.Forms.PaintEventHandler(this.slotBtn_Paint); // // button17 // this.button17.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(114)))), ((int)(((byte)(137)))), ((int)(((byte)(218))))); this.button17.FlatAppearance.BorderSize = 0; this.button17.FlatStyle = System.Windows.Forms.FlatStyle.Flat; - this.button17.Font = new System.Drawing.Font("Microsoft Sans Serif", 18F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.button17.Font = new System.Drawing.Font("Microsoft Sans Serif", 14.25F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0))); this.button17.ForeColor = System.Drawing.Color.White; this.button17.Location = new System.Drawing.Point(174, 132); this.button17.Name = "button17"; this.button17.Size = new System.Drawing.Size(75, 75); this.button17.TabIndex = 21; this.button17.Tag = "13"; - this.button17.Text = "slot13"; + this.button17.TextAlign = System.Drawing.ContentAlignment.TopLeft; this.button17.UseVisualStyleBackColor = false; this.button17.Click += new System.EventHandler(this.slotBtn_Click); + this.button17.Paint += new System.Windows.Forms.PaintEventHandler(this.slotBtn_Paint); // // button18 // this.button18.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(114)))), ((int)(((byte)(137)))), ((int)(((byte)(218))))); this.button18.FlatAppearance.BorderSize = 0; this.button18.FlatStyle = System.Windows.Forms.FlatStyle.Flat; - this.button18.Font = new System.Drawing.Font("Microsoft Sans Serif", 18F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.button18.Font = new System.Drawing.Font("Microsoft Sans Serif", 14.25F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0))); this.button18.ForeColor = System.Drawing.Color.White; this.button18.Location = new System.Drawing.Point(93, 132); this.button18.Name = "button18"; this.button18.Size = new System.Drawing.Size(75, 75); this.button18.TabIndex = 20; this.button18.Tag = "12"; - this.button18.Text = "slot12"; + this.button18.TextAlign = System.Drawing.ContentAlignment.TopLeft; this.button18.UseVisualStyleBackColor = false; this.button18.Click += new System.EventHandler(this.slotBtn_Click); + this.button18.Paint += new System.Windows.Forms.PaintEventHandler(this.slotBtn_Paint); // // button19 // this.button19.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(114)))), ((int)(((byte)(137)))), ((int)(((byte)(218))))); this.button19.FlatAppearance.BorderSize = 0; this.button19.FlatStyle = System.Windows.Forms.FlatStyle.Flat; - this.button19.Font = new System.Drawing.Font("Microsoft Sans Serif", 18F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.button19.Font = new System.Drawing.Font("Microsoft Sans Serif", 14.25F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0))); this.button19.ForeColor = System.Drawing.Color.White; this.button19.Location = new System.Drawing.Point(12, 132); this.button19.Name = "button19"; this.button19.Size = new System.Drawing.Size(75, 75); this.button19.TabIndex = 19; this.button19.Tag = "11"; - this.button19.Text = "slot11"; + this.button19.TextAlign = System.Drawing.ContentAlignment.TopLeft; this.button19.UseVisualStyleBackColor = false; this.button19.Click += new System.EventHandler(this.slotBtn_Click); + this.button19.Paint += new System.Windows.Forms.PaintEventHandler(this.slotBtn_Paint); // // itemGridView // diff --git a/acnhpoker/Form1.cs b/acnhpoker/Form1.cs index b64f85b..5ee0213 100644 --- a/acnhpoker/Form1.cs +++ b/acnhpoker/Form1.cs @@ -7,6 +7,7 @@ using System.Net; using System.Net.Sockets; using System.Runtime.InteropServices; +using System.Text; using System.Text.RegularExpressions; using System.Threading; using System.Windows.Forms; @@ -19,6 +20,7 @@ public partial class Form1 : Form Socket s; Utilities utilities = new Utilities(); + private Button selectedButton; public int selectedSlot = 1; public DataGridViewRow lastRow; @@ -75,6 +77,19 @@ private void connectBtn_Click(object sender, EventArgs e) if (conSuceded == true) { + try + { + s.EndConnect(result); + } + catch + { + this.pictureBox1.Invoke((MethodInvoker)delegate + { + this.pictureBox1.BackColor = System.Drawing.Color.Red; + }); + return; + } + this.connectBtn.Invoke((MethodInvoker)delegate { this.connectBtn.Enabled = false; @@ -87,7 +102,9 @@ private void connectBtn_Click(object sender, EventArgs e) { this.ipBox.ReadOnly = true; }); - s.EndConnect(result); + + Invoke((MethodInvoker)delegate { updateInventory(); }); + } else @@ -105,6 +122,91 @@ private void connectBtn_Click(object sender, EventArgs e) } + private string getImagePathFromID(string itemID) + { + int rowIndex = -1; + + DataGridViewRow row = itemGridView.Rows + .Cast() + .Where(r => r.Cells["ID"].Value.ToString().Equals(itemID.ToLower())) + .FirstOrDefault(); + + if(row == null) + { + return ""; //row not found + } + else + { + //row found set the index and find the file + rowIndex = row.Index; + + string path = @"img\" + itemGridView.Rows[rowIndex].Cells[1].Value.ToString() + @"\" + itemGridView.Rows[rowIndex].Cells[0].Value.ToString() + ".png"; + if (File.Exists(path)) + { + return path; //file found + } + else + { + return ""; //file not found + } + } + + } + + private void updateInventory() + { + byte[] inventoryBytes = utilities.GetInventory(s); + + foreach(Button btn in this.Controls.OfType