示例#1
0
        private void GetOptionValue()
        {
            frmOption.Owner = Window.GetWindow(this);

            if (optionEntity == null)
            {
                optionEntity = new OptionEntity();
            }
            frmOption.SetOptionEntity(optionEntity);
            frmOption.ShowDialog();

            if (optionEntity.isContinue)
            {
                lblLevel.Content = CommonMethod.UseStringBuilder("Level : ", optionEntity.difficultyType, " Class");
                currentBombNum   = optionEntity.numForMine;
                SetBombText(0);

                GameStart();
            }
        }
示例#2
0
        private void SetBombText(int num)
        {
            string strTmp = string.Empty;

            currentBombNum += num;
            strTmp          = Convert.ToString(currentBombNum);

            if (strTmp.Length == 1)
            {
                textBlock1.Text = CommonMethod.UseStringBuilder("0", "0", strTmp);
            }
            else if (strTmp.Length == 1)
            {
                textBlock1.Text = CommonMethod.UseStringBuilder("0", strTmp);
            }
            else
            {
                textBlock1.Text = strTmp;
            }
        }
示例#3
0
        void BtnOnCheckedForBtn(object sender, RoutedEventArgs e)
        {
            ToggleButton btn = sender as ToggleButton;

            if (btn.Background == null)
            {
                btn.IsChecked = false;
                return;
            }

            int num = (int)btn.Tag;

            if ((bool)btn.IsChecked)
            {
                btn.Content    = bomb[num].ToString();
                btn.Foreground = CommonMethod.GetNumByColorKey <SolidColorBrush>(bomb[num], CommonCode.numColorDi);
                if (bomb[num] == 0)
                {
                    BtnCheckedForReguler(num);
                }
            }
        }