public void SetOpponentTry(int attempt, string code) { this._myPanels[8 + 36 + (attempt * 4) + 3].BackColor = ENUMS.GetColor((ENUMS.color)Int32.Parse(code.Substring(0, 1)) - 1); this._myPanels[8 + 36 + (attempt * 4) + 2].BackColor = ENUMS.GetColor((ENUMS.color)Int32.Parse(code.Substring(1, 1)) - 1); this._myPanels[8 + 36 + (attempt * 4) + 1].BackColor = ENUMS.GetColor((ENUMS.color)Int32.Parse(code.Substring(2, 1)) - 1); this._myPanels[8 + 36 + (attempt * 4) + 0].BackColor = ENUMS.GetColor((ENUMS.color)Int32.Parse(code.Substring(3, 1)) - 1); }
public void MoveCode(bool first, byte attempt) { if (first) { this._inputCode1.BackColor = this._input1.BackColor; this._inputCode2.BackColor = this._input2.BackColor; this._inputCode3.BackColor = this._input3.BackColor; this._inputCode4.BackColor = this._input4.BackColor; ResetCodes(); } else { this._myPanels[8 + (attempt * 4) + 0].BackColor = this._input1.BackColor; this._myPanels[8 + (attempt * 4) + 1].BackColor = this._input2.BackColor; this._myPanels[8 + (attempt * 4) + 2].BackColor = this._input3.BackColor; this._myPanels[8 + (attempt * 4) + 3].BackColor = this._input4.BackColor; ResetCodes(); } this._input1.BackColor = ENUMS.GetColor(ENUMS.color.WHITE); this._input2.BackColor = ENUMS.GetColor(ENUMS.color.WHITE); this._input3.BackColor = ENUMS.GetColor(ENUMS.color.WHITE); this._input4.BackColor = ENUMS.GetColor(ENUMS.color.WHITE); }
private void InputCode3Clicked(object sender, MouseEventArgs e) { code3++; if (code3 > 5) { code3 = 0; } //Console.WriteLine("Changing code3 to : " + code3); this._input3.BackColor = ENUMS.GetColor((ENUMS.color)code3); _controller.InputCodeClicked(sender, e, 3); }