/// <summary> /// - helper for /// <c><see cref="cellclick_InfoInput()">cellclick_InfoInput()</see></c> /// </summary> void doIntInputClass() { using (var iic = new InfoInputClasses(this, _sel)) doIntInput(iic); }
/// <summary> /// Handles a singlecell-click <c><see cref="InfoInputDialog"/></c>. /// </summary> /// <param name="sender"><c><see cref="cellit_Input"/></c></param> /// <param name="e"></param> void cellclick_InfoInput(object sender, EventArgs e) { switch (Table.Info) { case YataGrid.InfoType.INFO_SPELL: switch (_sel.x) { case InfoInputSpells.School: // STRING Input -> case InfoInputSpells.Range: case InfoInputSpells.ImmunityType: case InfoInputSpells.UserType: using (var iis = new InfoInputSpells(this, _sel)) { if (iis.ShowDialog(this) == DialogResult.OK && str1 != str0) { Table.ChangeCellText(_sel, str1); // does not do a text-check } } break; case InfoInputSpells.MetaMagic: // HEX Input -> case InfoInputSpells.TargetType: case InfoInputSpells.AsMetaMagic: using (var iis = new InfoInputSpells(this, _sel)) { if (iis.ShowDialog(this) == DialogResult.OK && int1 != int0) { if (int1 == II_ASSIGN_STARS) { Table.ChangeCellText(_sel, gs.Stars); // does not do a text-check } else { string f; if (int1 > 0xFF) { f = "X6"; // is MetaMagic (invocation) } else { f = "X2"; // is MetaMagic (standard) or TargetType } Table.ChangeCellText(_sel, "0x" + int1.ToString(f, CultureInfo.InvariantCulture)); // does not do a text-check } } } break; case InfoInputSpells.Category: // INT Input -> case InfoInputSpells.SpontCastClass: case InfoInputSpells.TargetingUI: doIntInputSpells(); break; } break; case YataGrid.InfoType.INFO_FEAT: switch (_sel.x) { case InfoInputFeat.Category: // INT Input -> case InfoInputFeat.MasterFeat: case InfoInputFeat.ToggleMode: doIntInputFeat(); break; case InfoInputFeat.ToolsCategories: // STRING Input -> case InfoInputFeat.FeatCategory: using (var iif = new InfoInputFeat(this, _sel)) { if (iif.ShowDialog(this) == DialogResult.OK && str1 != str0) { Table.ChangeCellText(_sel, str1); // does not do a text-check } } break; } break; case YataGrid.InfoType.INFO_CLASS: switch (_sel.x) { case InfoInputClasses.PrimaryAbil: // STRING Input -> case InfoInputClasses.SpellAbil: using (var iic = new InfoInputClasses(this, _sel)) { if (iic.ShowDialog(this) == DialogResult.OK && str1 != str0) { Table.ChangeCellText(_sel, str1); // does not do a text-check } } break; case InfoInputClasses.AlignRestrict: // HEX Input -> case InfoInputClasses.AlignRstrctType: using (var iis = new InfoInputClasses(this, _sel)) { if (iis.ShowDialog(this) == DialogResult.OK && int1 != int0) { if (int1 == II_ASSIGN_STARS) { Table.ChangeCellText(_sel, gs.Stars); // does not do a text-check } else { string f; if (_sel.x == InfoInputClasses.AlignRestrict) { f = "X2"; } else { f = "X1"; // _sel.x == InfoInputClasses.AlignRstrctType } Table.ChangeCellText(_sel, "0x" + int1.ToString(f, CultureInfo.InvariantCulture)); // does not do a text-check } } } break; case InfoInputClasses.Package: // INT Input -> doIntInputClass(); break; } break; } }