コード例 #1
0
        void CmpCard(Control control)
        {
            RoundCheckBox curtcmp = control as RoundCheckBox;

            if (curtcmp.IsCheck == true)
            {
                for (int i = 0; i < cmpcard.Length; i++)
                {
                    if (cmpcard[i] != curtcmp)
                    {
                        cmpcard[i].IsCheck = false;
                    }
                }


                //
                for (int i = 0; i < cmpcard.Length; i++)
                {
                    if (cmpcard[i] == curtcmp)
                    {
                        settingData.time = 180;
                    }
                }
            }
        }
コード例 #2
0
        void Optional(Control control)
        {
            RoundCheckBox curtOpt = control as RoundCheckBox;

            if (curtOpt.IsCheck == true)
            {
                if (curtOpt == optional[optional.Length - 1])
                {
                    tips.Text = "测试消息3";
                    suitSelecter.IsDisabled   = false;
                    suitSelecter.SelectedSuit = Suits.Spade;
                }

                for (int i = 0; i < optional.Length; i++)
                {
                    if (optional[i] == curtOpt && i == 1)
                    {
                        tips.Text = "测试消息2";
                    }

                    if (optional[i] != curtOpt)
                    {
                        optional[i].IsCheck = false;

                        if (i == optional.Length - 1)
                        {
                            suitSelecter.SelectedSuit = Suits.None;
                            suitSelecter.IsDisabled   = true;
                        }
                    }
                }

                //
                for (int i = 0; i < optional.Length; i++)
                {
                    if (optional[i] == curtOpt)
                    {
                        settingData.opt = i;

                        if (i == optional.Length - 1)
                        {
                            settingData.suit = suitSelecter.SelectedSuit;
                        }
                        else
                        {
                            settingData.suit = Suits.None;
                        }
                    }
                }
            }
        }
コード例 #3
0
        void CreateInfo2()
        {
            Tabler tabler = Control.Create <Tabler>();

            tabler.SetDefaultCellMargin(new Margin(0, 0, 30, 0));
            listViewer.AddChild(tabler, 50);

            Label peopleCountLabel = Control.Create <Label>();

            peopleCountLabel.CtrlSizeChangeMode = ControlSizeChangeMode.FitContentSize;
            peopleCountLabel.Height             = 25;
            peopleCountLabel.Text = "人数:";
            tabler.AddChild(peopleCountLabel, 0, 0);
            tabler.SetCellMargin(0, 0, new Margin(10, 0, 10, 0));

            peopleCount = Control.Create <RoundCheckBox>();
            peopleCount.CtrlSizeChangeMode = ControlSizeChangeMode.FitContentSize;
            peopleCount.Height             = 25;
            peopleCount.Text = "3-8人";
            tabler.AddChild(peopleCount, 0, 1);

            Label turnLabel = Control.Create <Label>();

            turnLabel.CtrlSizeChangeMode = ControlSizeChangeMode.FitContentSize;
            turnLabel.Height             = 25;
            turnLabel.Text = "局数:";
            tabler.AddChild(turnLabel, 0, 3);
            tabler.SetCellMargin(0, 3, new Margin(0, 0, 20, 0));

            string[] name = { "10局", "20局", "30局" };
            for (int i = 0; i < name.Length; i++)
            {
                turn[i] = Control.Create <RoundCheckBox>();
                turn[i].CtrlSizeChangeMode = ControlSizeChangeMode.FitContentSize;
                turn[i].Height             = 25;
                turn[i].Text        = name[i];
                turn[i].BindProcess = TrunProcess;
                tabler.AddChild(turn[i], 0, 4 + i);
            }

            tabler.EnableTableLineAutoAdjustRichSize(2, true, LineDir.VERTICAL);
            tabler.EnableTableLineAutoAdjustRichSize(0, true, LineDir.HORIZONTAL);
        }
コード例 #4
0
        void CostMode(Control control)
        {
            RoundCheckBox curtCost = control as RoundCheckBox;

            if (curtCost.IsCheck == true)
            {
                for (int i = 0; i < costmode.Length; i++)
                {
                    if (costmode[i] == curtCost && i == 1)
                    {
                        tips.Text = "测试消息1";
                    }

                    if (costmode[i] != curtCost)
                    {
                        costmode[i].IsCheck = false;
                    }
                }


                //
                for (int i = 0; i < costmode.Length; i++)
                {
                    if (costmode[i] == curtCost)
                    {
                        if (i == 0)
                        {
                            settingData.roomCostMode = 2;
                        }
                        else
                        {
                            settingData.roomCostMode = 1;
                        }


                        SetRoomCostInfo();
                    }
                }
            }
        }
コード例 #5
0
        void TrunProcess(Control control)
        {
            RoundCheckBox curtTurn = control as RoundCheckBox;

            if (curtTurn.IsCheck == true)
            {
                for (int i = 0; i < turn.Length; i++)
                {
                    if (turn[i] != curtTurn)
                    {
                        turn[i].IsCheck = false;
                    }
                }

                //数据设置
                for (int i = 0; i < turn.Length; i++)
                {
                    if (turn[i] == curtTurn)
                    {
                        if (i == 0)
                        {
                            settingData.turnCount = 10;
                        }
                        else if (i == 1)
                        {
                            settingData.turnCount = 20;
                        }
                        else
                        {
                            settingData.turnCount = 30;
                        }

                        SetRoomCostInfo();
                        break;
                    }
                }
            }
        }
コード例 #6
0
        void JokerCountSelect(Control control)
        {
            RoundCheckBox curtJoker = control as RoundCheckBox;

            if (curtJoker.IsCheck == true)
            {
                for (int i = 0; i < joker.Length; i++)
                {
                    if (joker[i] != curtJoker)
                    {
                        joker[i].IsCheck = false;
                    }
                }

                //数据设置
                for (int i = 0; i < joker.Length; i++)
                {
                    if (joker[i] == curtJoker)
                    {
                        switch (i)
                        {
                        case 0: settingData.jokerCount = 0; break;

                        case 1: settingData.jokerCount = 2; break;

                        case 2: settingData.jokerCount = 4; break;

                        case 4: settingData.jokerCount = 6; break;

                        case 5: settingData.jokerCount = 8; break;
                        }
                        break;
                    }
                }
            }
        }