private void Block_BothClicked(Button sender, MouseStateEventArgs e)
        {
            Block block = sender as Block;

            if (block.Trigged && !block.Flaged)
            {
                int minenum = block.GetMinesAround();
                int flagnum = block.GetFlagsAround();
                if (minenum == flagnum)
                {
                    block.TriggerAround();
                }
            }
        }
        private void Block_RClicked(Button sender, MouseStateEventArgs e)
        {
            Block block = sender as Block;

            if (!block.Trigged)
            {
                if (!block.Flaged)
                {
                    block.Fixed = true;
                    _totalFlags++;
                    _totalMines--;
                    block.Flaged     = true;
                    block.BackGround = Color.LightGreen;
                }
                else
                {
                    block.Fixed = false;
                    _totalFlags--;
                    _totalMines++;
                    block.Flaged     = false;
                    block.BackGround = Color.AliceBlue;
                }
            }
        }
        private void Block_Clicked(Button sender, MouseStateEventArgs e)
        {
            Block block = sender as Block;

            if (!block.Trigged && !block.Flaged)
            {
                if (block.HaveMine)
                {
                    foreach (Block item in _blocks)
                    {
                        item.Fixed      = true;
                        item.Trigged    = true;
                        item.BackGround = item.HaveMine ? Color.Pink : Color.LightGray;
                    }
                    losed = true;
                }
                else
                {
                    _totalBlocks--;
                    block.Fixed      = true;
                    block.Trigged    = true;
                    block.BackGround = Color.LightGray;
                    int num = block.GetMinesAround();
                    if (num > 0)
                    {
                        block.Text = num.ToString();
                        switch (num)
                        {
                        case 1:
                            block.ForeGround = Color.Blue;
                            break;

                        case 2:
                            block.ForeGround = Color.Green;
                            break;

                        case 3:
                            block.ForeGround = Color.Red;
                            break;

                        case 4:
                            block.ForeGround = Color.MidnightBlue;
                            break;

                        case 5:
                            block.ForeGround = Color.DarkRed;
                            break;

                        case 6:
                            block.ForeGround = Color.ForestGreen;
                            break;

                        case 7:
                            block.ForeGround = Color.Black;
                            break;

                        case 8:
                            block.ForeGround = Color.DarkGray;
                            break;
                        }
                    }
                    else
                    {
                        block.TriggerAround();
                    }
                }
            }
        }