Total points field

This commit is contained in:
2022-07-02 08:51:52 +02:00
parent d39a372b3a
commit 3c920dad02
2 changed files with 69 additions and 26 deletions

View File

@ -39,23 +39,26 @@
this.btnClose = new System.Windows.Forms.Button();
this.txtMaxValue = new System.Windows.Forms.TextBox();
this.txtChosenValue = new System.Windows.Forms.TextBox();
this.textBox1 = new System.Windows.Forms.TextBox();
this.lblRecentPoints = new System.Windows.Forms.Label();
this.SuspendLayout();
//
// label1
//
this.label1.AutoSize = true;
this.label1.Font = new System.Drawing.Font("Segoe UI", 15.75F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point);
this.label1.Location = new System.Drawing.Point(23, 17);
this.label1.Location = new System.Drawing.Point(26, 23);
this.label1.Name = "label1";
this.label1.Size = new System.Drawing.Size(105, 30);
this.label1.Size = new System.Drawing.Size(134, 37);
this.label1.TabIndex = 0;
this.label1.Text = "Nu kör vi";
//
// btnThrow
//
this.btnThrow.Location = new System.Drawing.Point(32, 71);
this.btnThrow.Location = new System.Drawing.Point(37, 95);
this.btnThrow.Margin = new System.Windows.Forms.Padding(3, 4, 3, 4);
this.btnThrow.Name = "btnThrow";
this.btnThrow.Size = new System.Drawing.Size(96, 23);
this.btnThrow.Size = new System.Drawing.Size(110, 31);
this.btnThrow.TabIndex = 1;
this.btnThrow.Text = "Kasta Tärningar";
this.btnThrow.UseVisualStyleBackColor = true;
@ -63,9 +66,10 @@
//
// btnDiceTmpl1
//
this.btnDiceTmpl1.Location = new System.Drawing.Point(746, 82);
this.btnDiceTmpl1.Location = new System.Drawing.Point(853, 109);
this.btnDiceTmpl1.Margin = new System.Windows.Forms.Padding(3, 4, 3, 4);
this.btnDiceTmpl1.Name = "btnDiceTmpl1";
this.btnDiceTmpl1.Size = new System.Drawing.Size(42, 44);
this.btnDiceTmpl1.Size = new System.Drawing.Size(48, 59);
this.btnDiceTmpl1.TabIndex = 2;
this.btnDiceTmpl1.Text = "1";
this.btnDiceTmpl1.UseVisualStyleBackColor = true;
@ -74,9 +78,10 @@
//
// btnDiceTmpl2
//
this.btnDiceTmpl2.Location = new System.Drawing.Point(746, 126);
this.btnDiceTmpl2.Location = new System.Drawing.Point(853, 168);
this.btnDiceTmpl2.Margin = new System.Windows.Forms.Padding(3, 4, 3, 4);
this.btnDiceTmpl2.Name = "btnDiceTmpl2";
this.btnDiceTmpl2.Size = new System.Drawing.Size(42, 44);
this.btnDiceTmpl2.Size = new System.Drawing.Size(48, 59);
this.btnDiceTmpl2.TabIndex = 3;
this.btnDiceTmpl2.Text = "2";
this.btnDiceTmpl2.UseVisualStyleBackColor = true;
@ -85,9 +90,10 @@
//
// btnDiceTmpl4
//
this.btnDiceTmpl4.Location = new System.Drawing.Point(746, 214);
this.btnDiceTmpl4.Location = new System.Drawing.Point(853, 285);
this.btnDiceTmpl4.Margin = new System.Windows.Forms.Padding(3, 4, 3, 4);
this.btnDiceTmpl4.Name = "btnDiceTmpl4";
this.btnDiceTmpl4.Size = new System.Drawing.Size(42, 44);
this.btnDiceTmpl4.Size = new System.Drawing.Size(48, 59);
this.btnDiceTmpl4.TabIndex = 5;
this.btnDiceTmpl4.Text = "4";
this.btnDiceTmpl4.UseVisualStyleBackColor = true;
@ -96,9 +102,10 @@
//
// btnDiceTmpl3
//
this.btnDiceTmpl3.Location = new System.Drawing.Point(746, 170);
this.btnDiceTmpl3.Location = new System.Drawing.Point(853, 227);
this.btnDiceTmpl3.Margin = new System.Windows.Forms.Padding(3, 4, 3, 4);
this.btnDiceTmpl3.Name = "btnDiceTmpl3";
this.btnDiceTmpl3.Size = new System.Drawing.Size(42, 44);
this.btnDiceTmpl3.Size = new System.Drawing.Size(48, 59);
this.btnDiceTmpl3.TabIndex = 4;
this.btnDiceTmpl3.Text = "3";
this.btnDiceTmpl3.UseVisualStyleBackColor = true;
@ -107,9 +114,10 @@
//
// btnDiceTmpl6
//
this.btnDiceTmpl6.Location = new System.Drawing.Point(746, 302);
this.btnDiceTmpl6.Location = new System.Drawing.Point(853, 403);
this.btnDiceTmpl6.Margin = new System.Windows.Forms.Padding(3, 4, 3, 4);
this.btnDiceTmpl6.Name = "btnDiceTmpl6";
this.btnDiceTmpl6.Size = new System.Drawing.Size(42, 44);
this.btnDiceTmpl6.Size = new System.Drawing.Size(48, 59);
this.btnDiceTmpl6.TabIndex = 7;
this.btnDiceTmpl6.Text = "6";
this.btnDiceTmpl6.UseVisualStyleBackColor = true;
@ -118,9 +126,10 @@
//
// btnDiceTmpl5
//
this.btnDiceTmpl5.Location = new System.Drawing.Point(746, 258);
this.btnDiceTmpl5.Location = new System.Drawing.Point(853, 344);
this.btnDiceTmpl5.Margin = new System.Windows.Forms.Padding(3, 4, 3, 4);
this.btnDiceTmpl5.Name = "btnDiceTmpl5";
this.btnDiceTmpl5.Size = new System.Drawing.Size(42, 44);
this.btnDiceTmpl5.Size = new System.Drawing.Size(48, 59);
this.btnDiceTmpl5.TabIndex = 6;
this.btnDiceTmpl5.Text = "5";
this.btnDiceTmpl5.UseVisualStyleBackColor = true;
@ -129,9 +138,10 @@
//
// btnClose
//
this.btnClose.Location = new System.Drawing.Point(678, 397);
this.btnClose.Location = new System.Drawing.Point(775, 529);
this.btnClose.Margin = new System.Windows.Forms.Padding(3, 4, 3, 4);
this.btnClose.Name = "btnClose";
this.btnClose.Size = new System.Drawing.Size(75, 23);
this.btnClose.Size = new System.Drawing.Size(86, 31);
this.btnClose.TabIndex = 8;
this.btnClose.Text = "Stäng";
this.btnClose.UseVisualStyleBackColor = true;
@ -139,27 +149,48 @@
//
// txtMaxValue
//
this.txtMaxValue.Location = new System.Drawing.Point(669, 82);
this.txtMaxValue.Location = new System.Drawing.Point(765, 109);
this.txtMaxValue.Margin = new System.Windows.Forms.Padding(3, 4, 3, 4);
this.txtMaxValue.Multiline = true;
this.txtMaxValue.Name = "txtMaxValue";
this.txtMaxValue.Size = new System.Drawing.Size(42, 44);
this.txtMaxValue.Size = new System.Drawing.Size(47, 57);
this.txtMaxValue.TabIndex = 9;
this.txtMaxValue.Visible = false;
//
// txtChosenValue
//
this.txtChosenValue.Location = new System.Drawing.Point(669, 126);
this.txtChosenValue.Location = new System.Drawing.Point(765, 168);
this.txtChosenValue.Margin = new System.Windows.Forms.Padding(3, 4, 3, 4);
this.txtChosenValue.Multiline = true;
this.txtChosenValue.Name = "txtChosenValue";
this.txtChosenValue.Size = new System.Drawing.Size(42, 44);
this.txtChosenValue.Size = new System.Drawing.Size(47, 57);
this.txtChosenValue.TabIndex = 10;
this.txtChosenValue.Visible = false;
//
// textBox1
//
this.textBox1.Location = new System.Drawing.Point(400, 97);
this.textBox1.Name = "textBox1";
this.textBox1.Size = new System.Drawing.Size(125, 27);
this.textBox1.TabIndex = 11;
//
// lblRecentPoints
//
this.lblRecentPoints.AutoSize = true;
this.lblRecentPoints.Font = new System.Drawing.Font("Segoe UI", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point);
this.lblRecentPoints.Location = new System.Drawing.Point(196, 93);
this.lblRecentPoints.Name = "lblRecentPoints";
this.lblRecentPoints.Size = new System.Drawing.Size(198, 28);
this.lblRecentPoints.TabIndex = 12;
this.lblRecentPoints.Text = "Aktuell poängsumma";
//
// frmPersonRound
//
this.AutoScaleDimensions = new System.Drawing.SizeF(7F, 15F);
this.AutoScaleDimensions = new System.Drawing.SizeF(8F, 20F);
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
this.ClientSize = new System.Drawing.Size(800, 450);
this.ClientSize = new System.Drawing.Size(914, 600);
this.Controls.Add(this.lblRecentPoints);
this.Controls.Add(this.textBox1);
this.Controls.Add(this.txtChosenValue);
this.Controls.Add(this.txtMaxValue);
this.Controls.Add(this.btnClose);
@ -171,6 +202,7 @@
this.Controls.Add(this.btnDiceTmpl1);
this.Controls.Add(this.btnThrow);
this.Controls.Add(this.label1);
this.Margin = new System.Windows.Forms.Padding(3, 4, 3, 4);
this.Name = "frmPersonRound";
this.StartPosition = System.Windows.Forms.FormStartPosition.CenterScreen;
this.Text = "Din tur -";
@ -192,5 +224,7 @@
private Button btnClose;
private TextBox txtMaxValue;
private TextBox txtChosenValue;
private TextBox textBox1;
private Label lblRecentPoints;
}
}

View File

@ -147,21 +147,30 @@ namespace WinGreed
txt = txtMaxValue.Clone<TextBox>();
txt.Name = $"txtMaxValue{row}";
txt.Location = new Point(x + 350, y);
txt.Location = new Point(x + 400, y);
txt.Visible = true;
this.Controls.Add(txt);
this.Refresh();
txtRes = txtChosenValue.Clone<TextBox>();
txtRes.Name = $"txtChosenValue{row}";
txtRes.Location = new Point(x + 350 + (txtRes.Width + 5), y);
txtRes.Location = new Point(x + 400 + (txtRes.Width + 5), y);
txtRes.Visible = true;
this.Controls.Add(txtRes);
this.Refresh();
}
string outPut = CheckForDifferentOutCome(numbers);
numbers.ForEach(x => Debug.Write($"{x}, "));
Debug.WriteLine(" -");
}
private string CheckForDifferentOutCome(List<int> numbers)
{
throw new NotImplementedException();
}
private void btnDiceTmpl_Click(object sender, EventArgs e)