示例#1
0
        public int getColorTest01([PexAssumeUnderTest] BusinessPlayer target, string input)
        {
            int result = target.getColor(input);

            return(result);
            // TODO: add assertions to method BusinessPlayerTest.getColorTest01(BusinessPlayer, String)
        }
示例#2
0
        public List <string> getColorTest([PexAssumeUnderTest] BusinessPlayer target)
        {
            List <string> result = target.getColor();

            return(result);
            // TODO: add assertions to method BusinessPlayerTest.getColorTest(BusinessPlayer)
        }
示例#3
0
        private void simpleButton1_Click(object sender, EventArgs e)
        {
            String         input    = colorsBox.Text;
            BusinessPlayer business = new BusinessPlayer(Login.UserName, Login.Password);

            if (input.Equals(""))
            {
                MessageBox.Show("Vui lòng nhập màu sắc!");
                return;
            }

            if (business.getColor(input) > 0)
            {
                MessageBox.Show("Màu đã tồn tại. Vui lòng nhập màu khác!");
                return;
            }

            if (business.addColor(input) > 0)
            {
                MessageBox.Show("Thêm thành công!");
                this.DialogResult = DialogResult.OK;
                this.color        = input;
                this.Close();
            }
            else
            {
                MessageBox.Show("Thêm thất bại!");
            }
        }
示例#4
0
        private void getColor()
        {
            List <String> colors = business.getColor();

            foreach (String color in colors)
            {
                colorsBox.Items.Add(color);
            }
        }
示例#5
0
        private void getColor()
        {
            BusinessPlayer business = new BusinessPlayer(Login.UserName, Login.Password);
            List <String>  colors   = business.getColor();

            foreach (String color in colors)
            {
                colorsBox.Items.Add(color);
            }
        }