コード例 #1
0
        private void buttonCoop_Click(object sender, EventArgs e)
        {
            var coopForm = new CoopForm();

            this.Hide();
            coopForm.ShowDialog();
            // When new form DioalogResult = ok
            this.Show();
        }
コード例 #2
0
        public void InputCoopTest()
        {
            //(numericPlayer.Value == 0 || textBoxProduct.Text == "" || richTextBoxMaterials.Text == "")
            CoopForm coopTest = new CoopForm();

            coopTest.richTextBoxPlayerFunc.Text = "";
            coopTest.numericPlayer.Value = 0;
            coopTest.richTextBoxMaterials.Text = "";
            Assert.IsFalse(coopTest.CheckFill());

            coopTest.numericPlayer.Value = 5;
            Assert.IsFalse(coopTest.CheckFill());

            coopTest.richTextBoxPlayerFunc.Text = "alma";
            Assert.IsFalse(coopTest.CheckFill());

            coopTest.richTextBoxMaterials.Text = "rost\nmag";
            Assert.IsTrue(coopTest.CheckFill());
        }