private void imgNotes_Click(object sender, EventArgs e) { string strOldValue = _objContact.Notes; using (frmNotes frmContactNotes = new frmNotes { Notes = strOldValue }) { frmContactNotes.ShowDialog(this); if (frmContactNotes.DialogResult != DialogResult.OK) { return; } frmContactNotes.ShowDialog(this); _objContact.Notes = frmContactNotes.Notes; if (strOldValue == _objContact.Notes) { return; } } string strTooltip = LanguageManager.GetString("Tip_Contact_EditNotes"); if (!string.IsNullOrEmpty(_objContact.Notes)) { strTooltip += Environment.NewLine + Environment.NewLine + _objContact.Notes; } imgNotes.SetToolTip(strTooltip.WordWrap()); ContactDetailChanged?.Invoke(this, new TextEventArgs("Notes")); }
private void imgNotes_Click(object sender, EventArgs e) { using (frmNotes frmSpritNotes = new frmNotes { Notes = _objSpirit.Notes }) { frmSpritNotes.ShowDialog(this); if (frmSpritNotes.DialogResult == DialogResult.OK && _objSpirit.Notes != frmSpritNotes.Notes) { _objSpirit.Notes = frmSpritNotes.Notes; string strTooltip = LanguageManager.GetString(_objSpirit.EntityType == SpiritType.Spirit ? "Tip_Spirit_EditNotes" : "Tip_Sprite_EditNotes"); if (!string.IsNullOrEmpty(_objSpirit.Notes)) { strTooltip += Environment.NewLine + Environment.NewLine + _objSpirit.Notes; } imgNotes.SetToolTip(strTooltip.WordWrap(100)); ContactDetailChanged?.Invoke(this, e); } } }
private void imgNotes_Click(object sender, EventArgs e) { frmNotes frmContactNotes = new frmNotes(); frmContactNotes.Notes = _objContact.Notes; frmContactNotes.ShowDialog(this); if (frmContactNotes.DialogResult == DialogResult.OK) { _objContact.Notes = frmContactNotes.Notes; } string strTooltip = ""; if (_objContact.EntityType == ContactType.Enemy) { strTooltip = LanguageManager.Instance.GetString("Tip_Enemy_EditNotes"); } else { strTooltip = LanguageManager.Instance.GetString("Tip_Contact_EditNotes"); } if (_objContact.Notes != string.Empty) { strTooltip += "\n\n" + _objContact.Notes; } tipTooltip.SetToolTip(imgNotes, strTooltip); }
private void imgNotes_Click(object sender, EventArgs e) { frmNotes frmSpritNotes = new frmNotes { Notes = _objSpirit.Notes }; frmSpritNotes.ShowDialog(this); if (frmSpritNotes.DialogResult == DialogResult.OK) { _objSpirit.Notes = frmSpritNotes.Notes; } string strTooltip = string.Empty; if (_objSpirit.EntityType == SpiritType.Spirit) { strTooltip = LanguageManager.GetString("Tip_Spirit_EditNotes"); } else { strTooltip = LanguageManager.GetString("Tip_Sprite_EditNotes"); } if (!string.IsNullOrEmpty(_objSpirit.Notes)) { strTooltip += "\n\n" + _objSpirit.Notes; } tipTooltip.SetToolTip(imgNotes, CommonFunctions.WordWrap(strTooltip, 100)); }
/// <summary> /// Writes notes to an IHasNotes object, returns True if notes were changed and False otherwise. /// </summary> /// <param name="objNotes"></param> /// <param name="treNode"></param> public static bool WriteNotes(this IHasNotes objNotes, TreeNode treNode) { if (objNotes == null || treNode == null) { return(false); } string strOldValue = objNotes.Notes; using (frmNotes frmItemNotes = new frmNotes { Notes = strOldValue }) { frmItemNotes.ShowDialog(Program.MainForm); if (frmItemNotes.DialogResult != DialogResult.OK) { return(false); } objNotes.Notes = frmItemNotes.Notes; } if (objNotes.Notes != strOldValue) { treNode.ForeColor = objNotes.PreferredColor; treNode.ToolTipText = objNotes.Notes.WordWrap(100); return(true); } return(false); }
private void imgNotes_Click(object sender, EventArgs e) { using (frmNotes frmContactNotes = new frmNotes { Notes = _objContact.Notes }) { frmContactNotes.ShowDialog(this); if (frmContactNotes.DialogResult != DialogResult.OK || _objContact.Notes == frmContactNotes.Notes) { return; } _objContact.Notes = frmContactNotes.Notes; } string strTooltip = LanguageManager.GetString(_objContact.EntityType == ContactType.Enemy ? "Tip_Enemy_EditNotes" : "Tip_Contact_EditNotes"); if (!string.IsNullOrEmpty(_objContact.Notes)) { strTooltip += Environment.NewLine + Environment.NewLine + _objContact.Notes; } imgNotes.SetToolTip(strTooltip.WordWrap(100)); ContactDetailChanged?.Invoke(this, new TextEventArgs("Notes")); }
private void imgNotes_Click(object sender, EventArgs e) { frmNotes frmPowerNotes = new frmNotes(); frmPowerNotes.Notes = _objPower.Notes; frmPowerNotes.ShowDialog(this); if (frmPowerNotes.DialogResult == DialogResult.OK) { _objPower.Notes = frmPowerNotes.Notes; } string strTooltip = LanguageManager.Instance.GetString("Tip_Power_EditNotes"); if (_objPower.Notes != string.Empty) { strTooltip += "\n\n" + _objPower.Notes; } tipTooltip.SetToolTip(imgNotes, functions.WordWrap(strTooltip, 100)); }
private void imgNotes_Click(object sender, EventArgs e) { frmNotes frmContactNotes = new frmNotes(); frmContactNotes.Notes = _objContact.Notes; frmContactNotes.ShowDialog(this); if (frmContactNotes.DialogResult == DialogResult.OK) { _objContact.Notes = frmContactNotes.Notes; } string strTooltip = LanguageManager.GetString("Tip_Contact_EditNotes"); if (!string.IsNullOrEmpty(_objContact.Notes)) { strTooltip += "\n\n" + _objContact.Notes; } tipTooltip.SetToolTip(imgNotes, CommonFunctions.WordWrap(strTooltip, 100)); }
private void imgNotes_Click(object sender, EventArgs e) { frmNotes frmPowerNotes = new frmNotes { Notes = _objPower.Notes }; frmPowerNotes.ShowDialog(this); if (frmPowerNotes.DialogResult == DialogResult.OK) { _objPower.Notes = frmPowerNotes.Notes; } string strTooltip = LanguageManager.GetString("Tip_Power_EditNotes", GlobalOptions.Language); if (_objPower.Notes != "") { strTooltip += "\n\n" + _objPower.Notes; } tipTooltip.SetToolTip(imgNotes, strTooltip.WordWrap(100)); }
private void imgNotes_Click(object sender, EventArgs e) { frmNotes frmContactNotes = new frmNotes { Notes = _objContact.Notes }; frmContactNotes.ShowDialog(this); if (frmContactNotes.DialogResult == DialogResult.OK) { _objContact.Notes = frmContactNotes.Notes; } string strTooltip = LanguageManager.GetString(_objContact.EntityType == ContactType.Enemy ? "Tip_Enemy_EditNotes" : "Tip_Contact_EditNotes", GlobalOptions.Language); if (!string.IsNullOrEmpty(_objContact.Notes)) { strTooltip += "\n\n" + _objContact.Notes; } tipTooltip.SetToolTip(imgNotes, strTooltip.WordWrap(100)); }
private void imgNotes_Click(object sender, EventArgs e) { frmNotes frmContactNotes = new frmNotes { Notes = _objContact.Notes }; frmContactNotes.ShowDialog(this); if (frmContactNotes.DialogResult == DialogResult.OK && _objContact.Notes != frmContactNotes.Notes) { _objContact.Notes = frmContactNotes.Notes; string strTooltip = LanguageManager.GetString(_objContact.EntityType == ContactType.Enemy ? "Tip_Enemy_EditNotes" : "Tip_Contact_EditNotes", GlobalOptions.Language); if (!string.IsNullOrEmpty(_objContact.Notes)) { strTooltip += Environment.NewLine + Environment.NewLine + _objContact.Notes; } tipTooltip.SetToolTip(imgNotes, strTooltip.WordWrap(100)); ContactDetailChanged?.Invoke(this, new TextEventArgs("Notes")); } }
private void imgNotes_Click(object sender, EventArgs e) { frmNotes frmPowerNotes = new frmNotes { Notes = _objPower.Notes }; frmPowerNotes.ShowDialog(this); if (frmPowerNotes.DialogResult == DialogResult.OK) { _objPower.Notes = frmPowerNotes.Notes; } string strTooltip = LanguageManager.GetString("Tip_Power_EditNotes", GlobalOptions.Language); if (!string.IsNullOrEmpty(_objPower.Notes)) { strTooltip += Environment.NewLine + Environment.NewLine + _objPower.Notes; } GlobalOptions.ToolTipProcessor.SetToolTip(imgNotes, strTooltip.WordWrap(100)); }
/// <summary> /// Writes notes to an IHasNotes object, returns True if notes were changed and False otherwise. /// </summary> /// <param name="objNotes"></param> public static bool WriteNotes(this IHasNotes objNotes, TreeNode treNode) { string strOldValue = objNotes.Notes; frmNotes frmItemNotes = new frmNotes { Notes = strOldValue }; frmItemNotes.ShowDialog(); if (frmItemNotes.DialogResult == DialogResult.OK) { objNotes.Notes = frmItemNotes.Notes; if (objNotes.Notes != strOldValue) { treNode.ForeColor = objNotes.PreferredColor; treNode.ToolTipText = objNotes.Notes.WordWrap(100); return(true); } } return(false); }
private void tsVehicleWeaponModNotes_Click(object sender, EventArgs e) { WeaponMod objMod = _objFunctions.FindVehicleWeaponMod(treVehicles.SelectedNode.Tag.ToString(), _objCharacter.Vehicles); frmNotes frmItemNotes = new frmNotes(); frmItemNotes.Notes = objMod.Notes; string strOldValue = objMod.Notes; frmItemNotes.ShowDialog(this); if (frmItemNotes.DialogResult == DialogResult.OK) { objMod.Notes = frmItemNotes.Notes; if (objMod.Notes != strOldValue) { _blnIsDirty = true; UpdateWindowTitle(); } } if (objMod.Notes != string.Empty) treVehicles.SelectedNode.ForeColor = Color.SaddleBrown; else treVehicles.SelectedNode.ForeColor = SystemColors.WindowText; treVehicles.SelectedNode.ToolTipText = CommonFunctions.WordWrap(objMod.Notes, 100); }
private void tsVehicleNotes_Click(object sender, EventArgs e) { Vehicle objVehicle = new Vehicle(_objCharacter); VehicleMod objMod = new VehicleMod(_objCharacter); bool blnFoundVehicle = false; bool blnFoundMod = false; try { foreach (Vehicle objCharacterVehicle in _objCharacter.Vehicles) { if (objCharacterVehicle.InternalId == treVehicles.SelectedNode.Tag.ToString()) { objVehicle = objCharacterVehicle; blnFoundVehicle = true; break; } foreach (VehicleMod objVehicleMod in objCharacterVehicle.Mods) { if (objVehicleMod.InternalId == treVehicles.SelectedNode.Tag.ToString()) { objMod = objVehicleMod; blnFoundMod = true; break; } } } if (blnFoundVehicle) { frmNotes frmItemNotes = new frmNotes(); frmItemNotes.Notes = objVehicle.Notes; string strOldValue = objVehicle.Notes; frmItemNotes.ShowDialog(this); if (frmItemNotes.DialogResult == DialogResult.OK) { objVehicle.Notes = frmItemNotes.Notes; if (objVehicle.Notes != strOldValue) { _blnIsDirty = true; UpdateWindowTitle(); } } if (objVehicle.Notes != string.Empty) treVehicles.SelectedNode.ForeColor = Color.SaddleBrown; else treVehicles.SelectedNode.ForeColor = SystemColors.WindowText; treVehicles.SelectedNode.ToolTipText = CommonFunctions.WordWrap(objVehicle.Notes, 100); } if (blnFoundMod) { frmNotes frmItemNotes = new frmNotes(); frmItemNotes.Notes = objMod.Notes; string strOldValue = objMod.Notes; frmItemNotes.ShowDialog(this); if (frmItemNotes.DialogResult == DialogResult.OK) { objMod.Notes = frmItemNotes.Notes; if (objMod.Notes != strOldValue) { _blnIsDirty = true; UpdateWindowTitle(); } } if (objMod.Notes != string.Empty) treVehicles.SelectedNode.ForeColor = Color.SaddleBrown; else { if (objMod.IncludedInVehicle) treVehicles.SelectedNode.ForeColor = SystemColors.GrayText; else treVehicles.SelectedNode.ForeColor = SystemColors.WindowText; } treVehicles.SelectedNode.ToolTipText = CommonFunctions.WordWrap(objMod.Notes, 100); } } catch { } }
private void tsVehicleWeaponNotes_Click(object sender, EventArgs e) { bool blnFound = false; Vehicle objFoundVehicle = new Vehicle(_objCharacter); Weapon objWeapon = _objFunctions.FindVehicleWeapon(treVehicles.SelectedNode.Tag.ToString(), _objCharacter.Vehicles, out objFoundVehicle); if (objWeapon != null) blnFound = true; if (blnFound) { frmNotes frmItemNotes = new frmNotes(); frmItemNotes.Notes = objWeapon.Notes; string strOldValue = objWeapon.Notes; frmItemNotes.ShowDialog(this); if (frmItemNotes.DialogResult == DialogResult.OK) { objWeapon.Notes = frmItemNotes.Notes; if (objWeapon.Notes != strOldValue) { _blnIsDirty = true; UpdateWindowTitle(); } } if (objWeapon.Notes != string.Empty) treVehicles.SelectedNode.ForeColor = Color.SaddleBrown; else { if (objWeapon.Cyberware || objWeapon.Category == "Gear") treVehicles.SelectedNode.ForeColor = SystemColors.GrayText; else treVehicles.SelectedNode.ForeColor = SystemColors.WindowText; } treVehicles.SelectedNode.ToolTipText = CommonFunctions.WordWrap(objWeapon.Notes, 100); } }
private void tsCyberwareNotes_Click(object sender, EventArgs e) { try { bool blnFound = false; Cyberware objCyberware = _objFunctions.FindCyberware(treCyberware.SelectedNode.Tag.ToString(), _objCharacter.Cyberware); if (objCyberware != null) blnFound = true; if (blnFound) { frmNotes frmItemNotes = new frmNotes(); frmItemNotes.Notes = objCyberware.Notes; string strOldValue = objCyberware.Notes; frmItemNotes.ShowDialog(this); if (frmItemNotes.DialogResult == DialogResult.OK) { objCyberware.Notes = frmItemNotes.Notes; if (objCyberware.Notes != strOldValue) { _blnIsDirty = true; UpdateWindowTitle(); } } if (objCyberware.Notes != string.Empty) treCyberware.SelectedNode.ForeColor = Color.SaddleBrown; else { if (objCyberware.Capacity == "[*]") treCyberware.SelectedNode.ForeColor = SystemColors.GrayText; else treCyberware.SelectedNode.ForeColor = SystemColors.WindowText; } treCyberware.SelectedNode.ToolTipText = CommonFunctions.WordWrap(objCyberware.Notes, 100); } } catch { } }
private void tsQualityNotes_Click(object sender, EventArgs e) { try { bool blnFound = false; Quality objQuality = _objFunctions.FindQuality(treQualities.SelectedNode.Tag.ToString(), _objCharacter.Qualities); if (objQuality != null) blnFound = true; if (blnFound) { frmNotes frmItemNotes = new frmNotes(); frmItemNotes.Notes = objQuality.Notes; string strOldValue = objQuality.Notes; frmItemNotes.ShowDialog(this); if (frmItemNotes.DialogResult == DialogResult.OK) { objQuality.Notes = frmItemNotes.Notes; if (objQuality.Notes != strOldValue) { _blnIsDirty = true; UpdateWindowTitle(); } } if (objQuality.Notes != string.Empty) treQualities.SelectedNode.ForeColor = Color.SaddleBrown; else { if (objQuality.OriginSource == QualitySource.Metatype || objQuality.OriginSource == QualitySource.MetatypeRemovable) treQualities.SelectedNode.ForeColor = SystemColors.GrayText; else if (!objQuality.Implemented) treQualities.SelectedNode.ForeColor = Color.Red; else treQualities.SelectedNode.ForeColor = SystemColors.WindowText; } treQualities.SelectedNode.ToolTipText = CommonFunctions.WordWrap(objQuality.Notes, 100); } } catch { } }
private void tsVehicleGearNotes_Click(object sender, EventArgs e) { try { bool blnFound = false; Vehicle objVehicle = new Vehicle(_objCharacter); Gear objGear = _objFunctions.FindVehicleGear(treVehicles.SelectedNode.Tag.ToString(), _objCharacter.Vehicles, out objVehicle); if (objGear != null) blnFound = true; if (blnFound) { frmNotes frmItemNotes = new frmNotes(); frmItemNotes.Notes = objGear.Notes; string strOldValue = objGear.Notes; frmItemNotes.ShowDialog(this); if (frmItemNotes.DialogResult == DialogResult.OK) { objGear.Notes = frmItemNotes.Notes; if (objGear.Notes != strOldValue) { _blnIsDirty = true; UpdateWindowTitle(); } } if (objGear.Notes != string.Empty) treVehicles.SelectedNode.ForeColor = Color.SaddleBrown; else treVehicles.SelectedNode.ForeColor = SystemColors.WindowText; treVehicles.SelectedNode.ToolTipText = CommonFunctions.WordWrap(objGear.Notes, 100); } } catch { } }
private void tsImprovementNotes_Click(object sender, EventArgs e) { try { if (treImprovements.SelectedNode.Level > 0) { Improvement objImprovement = new Improvement(); foreach (Improvement objCharacterImprovement in _objCharacter.Improvements) { if (objCharacterImprovement.SourceName == treImprovements.SelectedNode.Tag.ToString()) { objImprovement = objCharacterImprovement; break; } } frmNotes frmItemNotes = new frmNotes(); frmItemNotes.Notes = objImprovement.Notes; string strOldValue = objImprovement.Notes; frmItemNotes.ShowDialog(this); if (frmItemNotes.DialogResult == DialogResult.OK) { objImprovement.Notes = frmItemNotes.Notes; if (objImprovement.Notes != strOldValue) { _blnIsDirty = true; UpdateWindowTitle(); } } if (objImprovement.Notes != string.Empty) { if (objImprovement.Enabled) treImprovements.SelectedNode.ForeColor = Color.SaddleBrown; else treImprovements.SelectedNode.ForeColor = Color.SandyBrown; } else { if (objImprovement.Enabled) treImprovements.SelectedNode.ForeColor = SystemColors.WindowText; else treImprovements.SelectedNode.ForeColor = SystemColors.GrayText; } treImprovements.SelectedNode.ToolTipText = objImprovement.Notes; } } catch { } }
private void imgNotes_Click(object sender, EventArgs e) { frmNotes frmContactNotes = new frmNotes(); frmContactNotes.Notes = _objContact.Notes; frmContactNotes.ShowDialog(this); if (frmContactNotes.DialogResult == DialogResult.OK) _objContact.Notes = frmContactNotes.Notes; string strTooltip = ""; strTooltip = LanguageManager.Instance.GetString("Tip_Contact_EditNotes"); if (_objContact.Notes != string.Empty) strTooltip += "\n\n" + _objContact.Notes; tipTooltip.SetToolTip(imgNotes, CommonFunctions.WordWrap(strTooltip, 100)); }
private void imgNotes_Click(object sender, EventArgs e) { frmNotes frmSpritNotes = new frmNotes(); frmSpritNotes.Notes = _objSpirit.Notes; frmSpritNotes.ShowDialog(this); if (frmSpritNotes.DialogResult == DialogResult.OK) _objSpirit.Notes = frmSpritNotes.Notes; string strTooltip = ""; if (_objSpirit.EntityType == SpiritType.Spirit) strTooltip = LanguageManager.Instance.GetString("Tip_Spirit_EditNotes"); else strTooltip = LanguageManager.Instance.GetString("Tip_Sprite_EditNotes"); if (_objSpirit.Notes != string.Empty) strTooltip += "\n\n" + _objSpirit.Notes; tipTooltip.SetToolTip(imgNotes, functions.WordWrap(strTooltip, 100)); }
private void imgNotes_Click(object sender, EventArgs e) { frmNotes frmPowerNotes = new frmNotes(); frmPowerNotes.Notes = _objPower.Notes; frmPowerNotes.ShowDialog(this); if (frmPowerNotes.DialogResult == DialogResult.OK) _objPower.Notes = frmPowerNotes.Notes; string strTooltip = LanguageManager.Instance.GetString("Tip_Power_EditNotes"); if (_objPower.Notes != string.Empty) strTooltip += "\n\n" + _objPower.Notes; tipTooltip.SetToolTip(imgNotes, strTooltip); }
private void cmdEditWeek_Click(object sender, EventArgs e) { try { ListViewItem objTest = lstCalendar.SelectedItems[0]; } catch { return; } CalendarWeek objWeek = new CalendarWeek(); ListViewItem objItem = lstCalendar.SelectedItems[0]; // Find the selected Calendar Week. foreach (CalendarWeek objCharacterWeek in _objCharacter.Calendar) { if (objCharacterWeek.InternalId == objItem.SubItems[2].Text) { objWeek = objCharacterWeek; break; } } frmNotes frmItemNotes = new frmNotes(); frmItemNotes.Notes = objWeek.Notes; string strOldValue = objWeek.Notes; frmItemNotes.ShowDialog(this); if (frmItemNotes.DialogResult == DialogResult.OK) { objWeek.Notes = frmItemNotes.Notes; if (objWeek.Notes != strOldValue) { _blnIsDirty = true; UpdateWindowTitle(); PopulateCalendar(); } } }
private void tsWeaponAccessoryNotes_Click(object sender, EventArgs e) { WeaponAccessory objAccessory = _objFunctions.FindWeaponAccessory(treWeapons.SelectedNode.Tag.ToString(), _objCharacter.Weapons); frmNotes frmItemNotes = new frmNotes(); frmItemNotes.Notes = objAccessory.Notes; string strOldValue = objAccessory.Notes; frmItemNotes.ShowDialog(this); if (frmItemNotes.DialogResult == DialogResult.OK) { objAccessory.Notes = frmItemNotes.Notes; if (objAccessory.Notes != strOldValue) { _blnIsDirty = true; UpdateWindowTitle(); } } if (objAccessory.Notes != string.Empty) treWeapons.SelectedNode.ForeColor = Color.SaddleBrown; else treWeapons.SelectedNode.ForeColor = SystemColors.WindowText; treWeapons.SelectedNode.ToolTipText = objAccessory.Notes; }
private void imgNotes_Click(object sender, EventArgs e) { frmNotes frmContactNotes = new frmNotes(); frmContactNotes.Notes = _objContact.Notes; frmContactNotes.ShowDialog(this); if (frmContactNotes.DialogResult == DialogResult.OK) _objContact.Notes = frmContactNotes.Notes; string strTooltip = ""; if (_objContact.EntityType == ContactType.Enemy) strTooltip = LanguageManager.Instance.GetString("Tip_Enemy_EditNotes"); else strTooltip = LanguageManager.Instance.GetString("Tip_Contact_EditNotes"); if (_objContact.Notes != string.Empty) strTooltip += "\n\n" + _objContact.Notes; tipTooltip.SetToolTip(imgNotes, strTooltip); }
private void tsWeaponNotes_Click(object sender, EventArgs e) { try { bool blnFound = false; Weapon objWeapon = (Weapon)_objFunctions.FindEquipment(treWeapons.SelectedNode.Tag.ToString(), _objCharacter.Weapons, typeof(Weapon)); if (objWeapon != null) blnFound = true; if (blnFound) { frmNotes frmItemNotes = new frmNotes(); frmItemNotes.Notes = objWeapon.Notes; string strOldValue = objWeapon.Notes; frmItemNotes.ShowDialog(this); if (frmItemNotes.DialogResult == DialogResult.OK) { objWeapon.Notes = frmItemNotes.Notes; if (objWeapon.Notes != strOldValue) { _blnIsDirty = true; UpdateWindowTitle(); } } if (objWeapon.Notes != string.Empty) treWeapons.SelectedNode.ForeColor = Color.SaddleBrown; else { if (objWeapon.Category.StartsWith("Cyberware") || objWeapon.Category == "Gear") treWeapons.SelectedNode.ForeColor = SystemColors.GrayText; else treWeapons.SelectedNode.ForeColor = SystemColors.WindowText; } treWeapons.SelectedNode.ToolTipText = objWeapon.Notes; } } catch { } }
private void tsInitiationNotes_Click(object sender, EventArgs e) { try { // Locate the selected Metamagic. Metamagic objMetamagic = _objFunctions.FindMetamagic(treMetamagic.SelectedNode.Tag.ToString(), _objCharacter.Metamagics); if (objMetamagic != null) { frmNotes frmItemNotes = new frmNotes(); frmItemNotes.Notes = objMetamagic.Notes; string strOldValue = objMetamagic.Notes; frmItemNotes.ShowDialog(this); if (frmItemNotes.DialogResult == DialogResult.OK) { objMetamagic.Notes = frmItemNotes.Notes; if (objMetamagic.Notes != strOldValue) { _blnIsDirty = true; UpdateWindowTitle(); } } if (objMetamagic.Notes != string.Empty) treMetamagic.SelectedNode.ForeColor = Color.SaddleBrown; else treMetamagic.SelectedNode.ForeColor = SystemColors.WindowText; treMetamagic.SelectedNode.ToolTipText = CommonFunctions.WordWrap(objMetamagic.Notes, 100); return; } // Locate the selected Art. Art objArt = _objFunctions.FindArt(treMetamagic.SelectedNode.Tag.ToString(), _objCharacter.Arts); if (objArt != null) { frmNotes frmItemNotes = new frmNotes(); frmItemNotes.Notes = objArt.Notes; string strOldValue = objArt.Notes; frmItemNotes.ShowDialog(this); if (frmItemNotes.DialogResult == DialogResult.OK) { objArt.Notes = frmItemNotes.Notes; if (objArt.Notes != strOldValue) { _blnIsDirty = true; UpdateWindowTitle(); } } if (objArt.Notes != string.Empty) treMetamagic.SelectedNode.ForeColor = Color.SaddleBrown; else treMetamagic.SelectedNode.ForeColor = SystemColors.WindowText; treMetamagic.SelectedNode.ToolTipText = CommonFunctions.WordWrap(objArt.Notes, 100); return; } // Locate the selected Spell. Spell objSpell = _objFunctions.FindSpell(treMetamagic.SelectedNode.Tag.ToString(), _objCharacter.Spells); if (objSpell != null) { frmNotes frmItemNotes = new frmNotes(); frmItemNotes.Notes = objSpell.Notes; string strOldValue = objSpell.Notes; frmItemNotes.ShowDialog(this); if (frmItemNotes.DialogResult == DialogResult.OK) { objSpell.Notes = frmItemNotes.Notes; if (objSpell.Notes != strOldValue) { _blnIsDirty = true; UpdateWindowTitle(); } } if (objSpell.Notes != string.Empty) treMetamagic.SelectedNode.ForeColor = Color.SaddleBrown; else treMetamagic.SelectedNode.ForeColor = SystemColors.WindowText; treMetamagic.SelectedNode.ToolTipText = objSpell.Notes; foreach (TreeNode nodSchool in treSpells.Nodes) { foreach (TreeNode nodSpell in nodSchool.Nodes) { if (nodSpell.Tag.ToString() == treMetamagic.SelectedNode.Tag.ToString()) { if (objSpell.Notes != string.Empty) nodSpell.ForeColor = Color.SaddleBrown; else nodSpell.ForeColor = SystemColors.WindowText; nodSpell.ToolTipText = CommonFunctions.WordWrap(objSpell.Notes, 100); } } } return; } } catch { } }
private void tsMetamagicNotes_Click(object sender, EventArgs e) { try { bool blnFound = false; InitiationGrade objGrade = _objFunctions.FindInitiationGrade(treMetamagic.SelectedNode.Tag.ToString(), _objCharacter.InitiationGrades); if (objGrade != null) blnFound = true; if (blnFound) { frmNotes frmItemNotes = new frmNotes(); frmItemNotes.Notes = objGrade.Notes; string strOldValue = objGrade.Notes; frmItemNotes.ShowDialog(this); if (frmItemNotes.DialogResult == DialogResult.OK) { objGrade.Notes = frmItemNotes.Notes; if (objGrade.Notes != strOldValue) { _blnIsDirty = true; UpdateWindowTitle(); } } if (objGrade.Notes != string.Empty) treMetamagic.SelectedNode.ForeColor = Color.SaddleBrown; else treMetamagic.SelectedNode.ForeColor = SystemColors.WindowText; treMetamagic.SelectedNode.ToolTipText = CommonFunctions.WordWrap(objGrade.Notes, 100); } } catch { } }
private void tsAddTechniqueNotes_Click(object sender, EventArgs e) { try { bool blnFound = false; MartialArt objMartialArt = new MartialArt(_objCharacter); MartialArtAdvantage objTechnique = _objFunctions.FindMartialArtAdvantage(treMartialArts.SelectedNode.Tag.ToString(), _objCharacter.MartialArts, out objMartialArt); if (objTechnique != null) blnFound = true; if (blnFound) { frmNotes frmItemNotes = new frmNotes(); frmItemNotes.Notes = objTechnique.Notes; string strOldValue = objTechnique.Notes; frmItemNotes.ShowDialog(this); if (frmItemNotes.DialogResult == DialogResult.OK) { objTechnique.Notes = frmItemNotes.Notes; if (objTechnique.Notes != strOldValue) { _blnIsDirty = true; UpdateWindowTitle(); } } if (objTechnique.Notes != string.Empty) treMartialArts.SelectedNode.ForeColor = Color.SaddleBrown; else treMartialArts.SelectedNode.ForeColor = SystemColors.WindowText; treMartialArts.SelectedNode.ToolTipText = CommonFunctions.WordWrap(objTechnique.Notes, 100); } } catch { } }
private void tssLimitModifierNotes_Click(object sender, EventArgs e) { try { LimitModifier obLimitModifier = _objFunctions.FindLimitModifier(treLimit.SelectedNode.Tag.ToString(), _objCharacter.LimitModifiers); if (obLimitModifier != null) { frmNotes frmItemNotes = new frmNotes(); frmItemNotes.Notes = obLimitModifier.Notes; string strOldValue = obLimitModifier.Notes; frmItemNotes.ShowDialog(this); if (frmItemNotes.DialogResult == DialogResult.OK) { obLimitModifier.Notes = frmItemNotes.Notes; if (obLimitModifier.Notes != strOldValue) { _blnIsDirty = true; UpdateWindowTitle(); } } if (obLimitModifier.Notes != string.Empty) treLimit.SelectedNode.ForeColor = Color.SaddleBrown; else treLimit.SelectedNode.ForeColor = SystemColors.WindowText; treLimit.SelectedNode.ToolTipText = CommonFunctions.WordWrap(obLimitModifier.Notes, 100); } else { // the limit modifier has a source foreach (Improvement objImprovement in _objCharacter.Improvements) { if (objImprovement.ImproveType == Improvement.ImprovementType.LimitModifier && objImprovement.SourceName == treLimit.SelectedNode.Tag.ToString()) { frmNotes frmItemNotes = new frmNotes(); frmItemNotes.Notes = objImprovement.Notes; string strOldValue = objImprovement.Notes; frmItemNotes.ShowDialog(this); if (frmItemNotes.DialogResult == DialogResult.OK) { objImprovement.Notes = frmItemNotes.Notes; if (objImprovement.Notes != strOldValue) { _blnIsDirty = true; UpdateWindowTitle(); } } if (objImprovement.Notes != string.Empty) treLimit.SelectedNode.ForeColor = Color.SaddleBrown; else treLimit.SelectedNode.ForeColor = SystemColors.WindowText; treLimit.SelectedNode.ToolTipText = CommonFunctions.WordWrap(objImprovement.Notes, 100); } } } } catch { } }
private void tsSpellNotes_Click(object sender, EventArgs e) { try { bool blnFound = false; Spell objSpell = _objFunctions.FindSpell(treSpells.SelectedNode.Tag.ToString(), _objCharacter.Spells); if (objSpell != null) blnFound = true; if (blnFound) { frmNotes frmItemNotes = new frmNotes(); frmItemNotes.Notes = objSpell.Notes; string strOldValue = objSpell.Notes; frmItemNotes.ShowDialog(this); if (frmItemNotes.DialogResult == DialogResult.OK) { objSpell.Notes = frmItemNotes.Notes; if (objSpell.Notes != strOldValue) { _blnIsDirty = true; UpdateWindowTitle(); } } if (objSpell.Notes != string.Empty) treSpells.SelectedNode.ForeColor = Color.SaddleBrown; else treSpells.SelectedNode.ForeColor = SystemColors.WindowText; treSpells.SelectedNode.ToolTipText = objSpell.Notes; } } catch { } }
private void tsComplexFormPluginNotes_Click(object sender, EventArgs e) { bool blnFound = false; TechProgram objFoundProgram = new TechProgram(_objCharacter); TechProgramOption objOption = _objFunctions.FindTechProgramOption(treComplexForms.SelectedNode.Tag.ToString(), _objCharacter.TechPrograms, out objFoundProgram); if (objOption != null) blnFound = true; if (blnFound) { frmNotes frmItemNotes = new frmNotes(); frmItemNotes.Notes = objOption.Notes; string strOldValue = objOption.Notes; frmItemNotes.ShowDialog(this); if (frmItemNotes.DialogResult == DialogResult.OK) { objOption.Notes = frmItemNotes.Notes; if (objOption.Notes != strOldValue) { _blnIsDirty = true; UpdateWindowTitle(); } } if (objOption.Notes != string.Empty) treComplexForms.SelectedNode.ForeColor = Color.SaddleBrown; else treComplexForms.SelectedNode.ForeColor = SystemColors.WindowText; treComplexForms.SelectedNode.ToolTipText = objOption.Notes; } }