private void btnFindValue2_Click(object sender, EventArgs e) { switch (_type) { case ObjTemplate.ObjectType.switch_trigger: { SelectRoom dlg = new SelectRoom(_area); if (dlg.ShowDialog() == DialogResult.OK) { txtValue2.Text = dlg.GetIndexNumberString(); } } return; case ObjTemplate.ObjectType.container: case ObjTemplate.ObjectType.quiver: { int value = 0; Int32.TryParse(txtValue1.Text, out value); FlagEditor dlg = new FlagEditor(BitvectorFlagType.ContainerFlags, value, 0); dlg.ShowDialog(); if (dlg.DialogResult == DialogResult.OK) { txtValue2.Text = dlg.Value.ToString(); } } return; default: return; } }
private void btnFindValue5_Click(object sender, EventArgs e) { switch ((String)cbCommand.SelectedItem) { case "G": // Mob Number { SelectMob dlg = new SelectMob(_area); dlg.ShowDialog(); if (dlg.DialogResult == DialogResult.OK) { txtArg5.Text = dlg.GetIndexNumberString(); } } break; case "P": // Room Number { SelectRoom dlg = new SelectRoom(_area); dlg.ShowDialog(); if (dlg.DialogResult == DialogResult.OK) { txtArg5.Text = dlg.GetIndexNumberString(); } } break; default: return; } }
private void btnFindRoomAction_Click(object sender, EventArgs e) { SelectRoom dlg = new SelectRoom(_area); if (dlg.ShowDialog() == DialogResult.OK) { txtActionData.Text = dlg.GetIndexNumberString(); } }
private void btnFindValue3_Click(object sender, EventArgs e) { switch ((String)cbCommand.SelectedItem) { case "F": case "G": case "M": case "O": case "R": // Room Number { SelectRoom dlg = new SelectRoom(_area); dlg.ShowDialog(); if (dlg.DialogResult == DialogResult.OK) { txtArg3.Text = dlg.GetIndexNumberString(); } } break; case "E": // Equipment Slot { SelectEquipmentSlot dlg = new SelectEquipmentSlot(); dlg.ShowDialog(); if (dlg.DialogResult == DialogResult.OK) { txtArg3.Text = dlg.GetNumber().ToString(); } } break; case "P": // Object Number { SelectObject dlg = new SelectObject(_area); dlg.ShowDialog(); if (dlg.DialogResult == DialogResult.OK) { txtArg3.Text = dlg.GetIndexNumberString(); } } break; case "D": // Door State { FlagEditor dlg = new FlagEditor(BitvectorFlagType.ExitFlags, 0, 0); DialogResult result = dlg.ShowDialog(); if (result == DialogResult.OK) { dlg.Text = dlg.Value.ToString(); } } break; default: return; } }
private void btnFindRoom_Click(object sender, EventArgs e) { SelectRoom dlg = new SelectRoom(_area); if (dlg.ShowDialog() == DialogResult.OK) { txtIndexNumber.Text = dlg.GetIndexNumberString(); } }
private void btnFindValue5_Click(object sender, EventArgs e) { switch ((String)cbCommand.SelectedItem) { case "G": // Mob Number { SelectMob dlg = new SelectMob(_area); dlg.ShowDialog(); if (dlg.DialogResult == DialogResult.OK) { txtArg5.Text = dlg.GetIndexNumberString(); } } break; case "P": // Room Number { SelectRoom dlg = new SelectRoom(_area); dlg.ShowDialog(); if (dlg.DialogResult == DialogResult.OK) { txtArg5.Text = dlg.GetIndexNumberString(); } } break; default: return; } }
private void btnFindValue3_Click(object sender, EventArgs e) { switch ((String)cbCommand.SelectedItem) { case "F": case "G": case "M": case "O": case "R": // Room Number { SelectRoom dlg = new SelectRoom(_area); dlg.ShowDialog(); if (dlg.DialogResult == DialogResult.OK) { txtArg3.Text = dlg.GetIndexNumberString(); } } break; case "E": // Equipment Slot { SelectEquipmentSlot dlg = new SelectEquipmentSlot(); dlg.ShowDialog(); if (dlg.DialogResult == DialogResult.OK) { txtArg3.Text = dlg.GetNumber().ToString(); } } break; case "P": // Object Number { SelectObject dlg = new SelectObject(_area); dlg.ShowDialog(); if (dlg.DialogResult == DialogResult.OK) { txtArg3.Text = dlg.GetIndexNumberString(); } } break; case "D": // Door State { FlagEditor dlg = new FlagEditor(BitvectorFlagType.ExitFlags, 0, 0); DialogResult result = dlg.ShowDialog(); if (result == DialogResult.OK) { dlg.Text = dlg.Value.ToString(); } } break; default: return; } }
private void btnFindValue1_Click(object sender, EventArgs e) { switch (_type) { case ObjTemplate.ObjectType.weapon: { SelectWeaponType dlg = new SelectWeaponType(); dlg.ShowDialog(); if (dlg.DialogResult == DialogResult.OK) { txtValue1.Text = dlg.GetNumber().ToString(); } } return; case ObjTemplate.ObjectType.totem: { int value = 0; Int32.TryParse(txtValue1.Text, out value); FlagEditor dlg = new FlagEditor(BitvectorFlagType.TotemFlags, value, 0); dlg.ShowDialog(); if (dlg.DialogResult == DialogResult.OK) { txtValue1.Text = dlg.Value.ToString(); } } return; case ObjTemplate.ObjectType.teleport: { SelectRoom dlg = new SelectRoom(_area); if (dlg.ShowDialog() == DialogResult.OK) { txtValue1.Text = dlg.GetIndexNumberString(); } } return; case ObjTemplate.ObjectType.note: { SelectLanguage dlg = new SelectLanguage(); if (dlg.ShowDialog() == DialogResult.OK) { txtValue1.Text = ((int)dlg.GetLanguage()).ToString(); } } return; case ObjTemplate.ObjectType.instrument: { SelectInstrumentType dlg = new SelectInstrumentType(); if (dlg.ShowDialog() == DialogResult.OK) { txtValue1.Text = dlg.GetInstrumentType().ToString(); } } return; default: return; } }
private void btnFindValue1_Click(object sender, EventArgs e) { switch (_type) { case ObjTemplate.ObjectType.weapon: { SelectWeaponType dlg = new SelectWeaponType(); dlg.ShowDialog(); if (dlg.DialogResult == DialogResult.OK) { txtValue1.Text = dlg.GetNumber().ToString(); } } return; case ObjTemplate.ObjectType.totem: { int value = 0; Int32.TryParse(txtValue1.Text, out value); FlagEditor dlg = new FlagEditor(BitvectorFlagType.TotemFlags, value, 0); dlg.ShowDialog(); if (dlg.DialogResult == DialogResult.OK) { txtValue1.Text = dlg.Value.ToString(); } } return; case ObjTemplate.ObjectType.teleport: { SelectRoom dlg = new SelectRoom(_area); if (dlg.ShowDialog() == DialogResult.OK) { txtValue1.Text = dlg.GetIndexNumberString(); } } return; case ObjTemplate.ObjectType.note: { SelectLanguage dlg = new SelectLanguage(); if (dlg.ShowDialog() == DialogResult.OK) { txtValue1.Text = ((int)dlg.GetLanguage()).ToString(); } } return; case ObjTemplate.ObjectType.instrument: { SelectInstrumentType dlg = new SelectInstrumentType(); if (dlg.ShowDialog() == DialogResult.OK) { txtValue1.Text = dlg.GetInstrumentType().ToString(); } } return; default: return; } }
private void btnFindValue2_Click(object sender, EventArgs e) { switch (_type) { case ObjTemplate.ObjectType.switch_trigger: { SelectRoom dlg = new SelectRoom(_area); if (dlg.ShowDialog() == DialogResult.OK) { txtValue2.Text = dlg.GetIndexNumberString(); } } return; case ObjTemplate.ObjectType.container: case ObjTemplate.ObjectType.quiver: { int value = 0; Int32.TryParse(txtValue1.Text, out value); FlagEditor dlg = new FlagEditor(BitvectorFlagType.ContainerFlags, value, 0); dlg.ShowDialog(); if (dlg.DialogResult == DialogResult.OK) { txtValue2.Text = dlg.Value.ToString(); } } return; default: return; } }