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(); } }
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; } }
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); } } }