public OptionDialog(OperateRecordManager operateRecordManager, int pageIndex, int commandIndex, string prevCommand, int preUniqueId) { InitializeComponent(); this.operateRecordManager = operateRecordManager; this.PageIndex = pageIndex; this.CommandIndex = commandIndex; this.prevCommand = prevCommand; this.PreUniqueId = preUniqueId; this.UniqueId = UniqueIdManager.Create(); OptionCommand = operateRecordManager.AddOptionCommand(this.PageIndex, this.CommandIndex, this.Rule.Text, this.Comment.Text, prevCommand, preUniqueId, UniqueId); }
private void Next_Click(object sender, EventArgs e) { if (Utils.ValidateIsSelected(MapDropDownList.SelectedValue) && Utils.ValidateIsSelected(NpcDropDownList.SelectedValue)) { OperateRecordManager.SetOperateRecordInfo( Utils.TryToInt(MapDropDownList.SelectedValue, 0), Utils.TryToInt(NpcDropDownList.SelectedValue, 0) ); this.Hide(); DialogType dialogType = new DialogType(OperateRecordManager, 0, 0, "", UniqueIdManager.ReCreate()); dialogType.ShowDialog(); } else { MessageBox.Show("请选择地图以及NPC!"); } }