private void btnCareerIncrease_Click(object sender, EventArgs e) { frmCareer parent = ParentForm as frmCareer; if (parent != null) { int upgradeKarmaCost = _skill.UpgradeKarmaCost(); if (upgradeKarmaCost == -1) { return; //TODO: more descriptive } string confirmstring; if (_skill.Karma == 0) { confirmstring = string.Format(LanguageManager.Instance.GetString("Message_ConfirmKarmaExpenseKnowledgeSkill"), _skill.DisplayName, _skill.Rating + 1, _skill.CharacterObject.Options.KarmaNewKnowledgeSkill, cboType.GetItemText(cboType.SelectedItem)); } else { confirmstring = string.Format(LanguageManager.Instance.GetString("Message_ConfirmKarmaExpense"), _skill.DisplayName, _skill.Rating + 1, upgradeKarmaCost, cboType.GetItemText(cboType.SelectedItem)); } if (!parent.ConfirmKarmaExpense(confirmstring)) { return; } } cboType.Enabled = false; _skill.Upgrade(); }
private void btnCareerIncrease_Click(object sender, EventArgs e) { int upgradeKarmaCost = _skill.UpgradeKarmaCost; if (upgradeKarmaCost == -1) { return; //TODO: more descriptive } string confirmstring = string.Format(GlobalOptions.CultureInfo, LanguageManager.GetString("Message_ConfirmKarmaExpense"), _skill.CurrentDisplayName, _skill.Rating + 1, upgradeKarmaCost, cboType.GetItemText(cboType.SelectedItem)); if (!_skill.CharacterObject.ConfirmKarmaExpense(confirmstring)) { return; } SuspendLayout(); if (cboName.Visible || !lblName.Visible) { lblName.Visible = true; cboName.Visible = false; cboName.DataBindings.Clear(); lblName.DoOneWayDataBinding("Text", _skill, nameof(KnowledgeSkill.WriteableName)); lblName.DoOneWayDataBinding("ForeColor", _skill, nameof(Skill.PreferredColor)); } cboType.Enabled = false; ResumeLayout(); _skill.Upgrade(); }
private void btnAddSpec_Click(object sender, EventArgs e) { frmCareer parrent = ParentForm as frmCareer; if (parrent != null) { string confirmstring = string.Format(LanguageManager.Instance.GetString("Message_ConfirmKarmaExpense"), skill.DisplayName, skill.Rating + 1, skill.UpgradeKarmaCost()); if (!parrent.ConfirmKarmaExpense(confirmstring)) { return; } } skill.Upgrade(); }
private void btnCareerIncrease_Click(object sender, EventArgs e) { int upgradeKarmaCost = _skill.UpgradeKarmaCost; if (upgradeKarmaCost == -1) { return; //TODO: more descriptive } string confirmstring = string.Format(GlobalOptions.CultureInfo, LanguageManager.GetString("Message_ConfirmKarmaExpense"), _skill.CurrentDisplayName, _skill.Rating + 1, upgradeKarmaCost, cboType.GetItemText(cboType.SelectedItem)); if (!_skill.CharacterObject.ConfirmKarmaExpense(confirmstring)) { return; } _skill.Upgrade(); }
private async void btnCareerIncrease_Click(object sender, EventArgs e) { int upgradeKarmaCost = _objSkill.UpgradeKarmaCost; if (upgradeKarmaCost == -1) { return; //TODO: more descriptive } string confirmstring = string.Format(GlobalSettings.CultureInfo, await LanguageManager.GetStringAsync("Message_ConfirmKarmaExpense"), _objSkill.CurrentDisplayName, _objSkill.Rating + 1, upgradeKarmaCost, cboType.GetItemText(cboType.SelectedItem)); if (!CommonFunctions.ConfirmKarmaExpense(confirmstring)) { return; } _objSkill.Upgrade(); }
private void btnCareerIncrease_Click(object sender, EventArgs e) { if (ParentForm is frmCareer parent) { int upgradeKarmaCost = _skill.UpgradeKarmaCost(); if (upgradeKarmaCost == -1) { return; //TODO: more descriptive } string confirmstring = string.Format(LanguageManager.GetString("Message_ConfirmKarmaExpense"), _skill.DisplayName, _skill.Rating + 1, upgradeKarmaCost, cboType.GetItemText(cboType.SelectedItem)); if (!parent.ConfirmKarmaExpense(confirmstring)) { return; } } cboType.Enabled = false; _skill.Upgrade(); }
private void btnCareerIncrease_Click(object sender, EventArgs e) { frmCareer parrent = ParentForm as frmCareer; if (parrent != null) { int upgradeKarmaCost = skill.UpgradeKarmaCost(); if (upgradeKarmaCost == -1) { return; //TODO: more descriptive } string confirmstring = string.Format(LanguageManager.Instance.GetString("Message_ConfirmKarmaExpense"), skill.DisplayName, skill.Rating + 1, upgradeKarmaCost); if (!parrent.ConfirmKarmaExpense(confirmstring)) { return; } } skill.Upgrade(); }