Nya ResultatRutor
This commit is contained in:
24
WinGreed/frmPersonRound.Designer.cs
generated
24
WinGreed/frmPersonRound.Designer.cs
generated
@ -37,6 +37,8 @@
|
|||||||
this.btnDiceTmpl6 = new System.Windows.Forms.Button();
|
this.btnDiceTmpl6 = new System.Windows.Forms.Button();
|
||||||
this.btnDiceTmpl5 = new System.Windows.Forms.Button();
|
this.btnDiceTmpl5 = new System.Windows.Forms.Button();
|
||||||
this.btnClose = new System.Windows.Forms.Button();
|
this.btnClose = new System.Windows.Forms.Button();
|
||||||
|
this.txtMaxValue = new System.Windows.Forms.TextBox();
|
||||||
|
this.txtChosenValue = new System.Windows.Forms.TextBox();
|
||||||
this.SuspendLayout();
|
this.SuspendLayout();
|
||||||
//
|
//
|
||||||
// label1
|
// label1
|
||||||
@ -135,11 +137,31 @@
|
|||||||
this.btnClose.UseVisualStyleBackColor = true;
|
this.btnClose.UseVisualStyleBackColor = true;
|
||||||
this.btnClose.Click += new System.EventHandler(this.btnClose_Click);
|
this.btnClose.Click += new System.EventHandler(this.btnClose_Click);
|
||||||
//
|
//
|
||||||
|
// txtMaxValue
|
||||||
|
//
|
||||||
|
this.txtMaxValue.Location = new System.Drawing.Point(669, 82);
|
||||||
|
this.txtMaxValue.Multiline = true;
|
||||||
|
this.txtMaxValue.Name = "txtMaxValue";
|
||||||
|
this.txtMaxValue.Size = new System.Drawing.Size(42, 44);
|
||||||
|
this.txtMaxValue.TabIndex = 9;
|
||||||
|
this.txtMaxValue.Visible = false;
|
||||||
|
//
|
||||||
|
// txtChosenValue
|
||||||
|
//
|
||||||
|
this.txtChosenValue.Location = new System.Drawing.Point(669, 126);
|
||||||
|
this.txtChosenValue.Multiline = true;
|
||||||
|
this.txtChosenValue.Name = "txtChosenValue";
|
||||||
|
this.txtChosenValue.Size = new System.Drawing.Size(42, 44);
|
||||||
|
this.txtChosenValue.TabIndex = 10;
|
||||||
|
this.txtChosenValue.Visible = false;
|
||||||
|
//
|
||||||
// frmPersonRound
|
// frmPersonRound
|
||||||
//
|
//
|
||||||
this.AutoScaleDimensions = new System.Drawing.SizeF(7F, 15F);
|
this.AutoScaleDimensions = new System.Drawing.SizeF(7F, 15F);
|
||||||
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
|
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
|
||||||
this.ClientSize = new System.Drawing.Size(800, 450);
|
this.ClientSize = new System.Drawing.Size(800, 450);
|
||||||
|
this.Controls.Add(this.txtChosenValue);
|
||||||
|
this.Controls.Add(this.txtMaxValue);
|
||||||
this.Controls.Add(this.btnClose);
|
this.Controls.Add(this.btnClose);
|
||||||
this.Controls.Add(this.btnDiceTmpl6);
|
this.Controls.Add(this.btnDiceTmpl6);
|
||||||
this.Controls.Add(this.btnDiceTmpl5);
|
this.Controls.Add(this.btnDiceTmpl5);
|
||||||
@ -168,5 +190,7 @@
|
|||||||
private Button btnDiceTmpl6;
|
private Button btnDiceTmpl6;
|
||||||
private Button btnDiceTmpl5;
|
private Button btnDiceTmpl5;
|
||||||
private Button btnClose;
|
private Button btnClose;
|
||||||
|
private TextBox txtMaxValue;
|
||||||
|
private TextBox txtChosenValue;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -134,19 +134,40 @@ namespace WinGreed
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
AnalyseNumbers(Numbers);
|
AnalyseNumbers(Numbers, false);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
private void AnalyseNumbers(List<int> numbers)
|
private void AnalyseNumbers(List<int> numbers, bool before = true)
|
||||||
{
|
{
|
||||||
|
if (before)
|
||||||
|
{
|
||||||
|
TextBox txt = null;
|
||||||
|
TextBox txtRes = null;
|
||||||
|
|
||||||
|
txt = txtMaxValue.Clone<TextBox>();
|
||||||
|
txt.Name = $"txtMaxValue{row}";
|
||||||
|
txt.Location = new Point(x + 350, 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.Visible = true;
|
||||||
|
this.Controls.Add(txtRes);
|
||||||
|
this.Refresh();
|
||||||
|
}
|
||||||
|
|
||||||
numbers.ForEach(x => Debug.Write($"{x}, "));
|
numbers.ForEach(x => Debug.Write($"{x}, "));
|
||||||
Debug.WriteLine(" -");
|
Debug.WriteLine(" -");
|
||||||
}
|
}
|
||||||
|
|
||||||
private void btnDiceTmpl_Click(object sender, EventArgs e)
|
private void btnDiceTmpl_Click(object sender, EventArgs e)
|
||||||
{
|
{
|
||||||
if (((Dice)((Button)sender).Tag).Chosen) {
|
if (((Dice)((Button)sender).Tag).Chosen)
|
||||||
|
{
|
||||||
((Button)sender).BackColor = Color.Green;
|
((Button)sender).BackColor = Color.Green;
|
||||||
((Dice)((Button)sender).Tag).Chosen = false;
|
((Dice)((Button)sender).Tag).Chosen = false;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user