private void Window_Loaded(object sender, RoutedEventArgs e) { entity.difficultyType = CommonMethod.GetRegistryKey(CommonCode.REGKEY_LEVEL); if (entity.difficultyType.Equals(CommonCode.REGKEY_LEVELVALUE_LOW)) { rdoLow.IsChecked = true; SetClassValue(CommonCode.REGKEY_LEVELVALUE_LOW, 9, 9, 10); } else if (entity.difficultyType.Equals(CommonCode.REGKEY_LEVELVALUE_MIDDLE)) { rdoMiddle.IsChecked = true; SetClassValue(CommonCode.REGKEY_LEVELVALUE_MIDDLE, 16, 16, 40); } else if (entity.difficultyType.Equals(CommonCode.REGKEY_LEVELVALUE_HIGH)) { rdoHigh.IsChecked = true; SetClassValue(CommonCode.REGKEY_LEVELVALUE_HIGH, 16, 30, 90); } else { rdoLow.IsChecked = true; SetClassValue(CommonCode.REGKEY_LEVELVALUE_LOW, 9, 9, 10); } entity.isContinue = true; this.Hide(); }
private void btnApply_Click(object sender, RoutedEventArgs e) { SetDifficulty(); if (!entity.difficultyType.Equals(CommonMethod.GetRegistryKey(CommonCode.REGKEY_LEVEL))) { if (entity.difficultyType.Equals(CommonCode.REGKEY_LEVELVALUE_LOW)) { SetClassValue(CommonCode.REGKEY_LEVELVALUE_LOW, 9, 9, 10); } else if (entity.difficultyType.Equals(CommonCode.REGKEY_LEVELVALUE_MIDDLE)) { SetClassValue(CommonCode.REGKEY_LEVELVALUE_MIDDLE, 16, 16, 40); } else if (entity.difficultyType.Equals(CommonCode.REGKEY_LEVELVALUE_HIGH)) { SetClassValue(CommonCode.REGKEY_LEVELVALUE_HIGH, 16, 30, 90); } else { MessageBox.Show("Please Select Difficulty Class", "Apply", MessageBoxButton.OK, MessageBoxImage.Error); return; } } entity.isContinue = true; this.Hide(); }