private void btnSetBelongedPerson_Click(object sender, EventArgs e) { frmSelectPersonList list = new frmSelectPersonList(); list.SelectOne = true; list.Persons = this.Scenario.Persons; list.ShowDialog(); if (list.SelectedPerson != null) { this.EditingTreasure.BelongedPerson = list.SelectedPerson; this.EditingTreasure.Available = this.EditingTreasure.BelongedPerson.Available; this.lbBelongedPerson.Text = this.EditingTreasure.BelongedPersonString; } }
private void btnSelectFollowedLeader_Click(object sender, EventArgs e) { if (this.editingMilitary != null) { frmSelectPersonList list = new frmSelectPersonList(); list.Persons = this.editingMilitary.Scenario.Persons; list.SelectOne = true; list.ShowDialog(); if (list.IDList.Count == 1) { this.tbFollowedLeaderID.Text = list.IDList[0].ToString(); } } }
private void button1_Click(object sender, EventArgs e) { frmSelectPersonList list = new frmSelectPersonList(); list.Persons = this.Scenario.Persons; list.SelectOne = true; list.ShowDialog(); if (list.IDList.Count == 1) { this.Dialog.SpeakingPerson = this.Scenario.Persons.GetGameObject(list.IDList[0]) as Person; if (this.Dialog.SpeakingPerson != null) { this.lbPerson.Text = this.Dialog.SpeakingPerson.Name; } } }
private void btnAddHatedPersons_Click(object sender, EventArgs e) { if ((this.Persons != null) && (this.Persons.Count != 0)) { frmSelectPersonList list = new frmSelectPersonList(); list.Persons = this.AllPersons; list.ShowDialog(); foreach (int num in list.IDList) { this.lbHatedPersons.Items.Add(num.ToString() + " " + (this.AllPersons.GetGameObject(num) as Person).Name); } } }
private void btnAddPerson_Click(object sender, EventArgs e) { frmSelectPersonList list = new frmSelectPersonList(); list.Persons = this.editingArchitecture.Scenario.Persons; list.ShowDialog(); foreach (int num in list.IDList) { Person gameObject = this.editingArchitecture.Scenario.Persons.GetGameObject(num) as Person; gameObject.Alive = true; gameObject.Available = true; gameObject.LocationArchitecture = this.editingArchitecture; gameObject.Status = GameObjects.PersonDetail.PersonStatus.Normal; } this.RefreshPersons(); }
private void btnAddNoFactionPerson_Click(object sender, EventArgs e) { frmSelectPersonList list = new frmSelectPersonList(); list.Persons = this.editingArchitecture.Scenario.Persons; list.ShowDialog(); foreach (int num in list.IDList) { Person gameObject = this.editingArchitecture.Scenario.Persons.GetGameObject(num) as Person; gameObject.Available = true; try { gameObject.LocationArchitecture = this.editingArchitecture; gameObject.Status = GameObjects.PersonDetail.PersonStatus.NoFaction; } catch { MessageBox.Show(gameObject.Name + "没有被添加到在野人物列表。", "操作无效"); } } this.RefreshNoFactionPersons(); }
private void btnAddDialogFromAll_Click(object sender, EventArgs e) { frmSelectPersonList list = new frmSelectPersonList(); list.Persons = this.Scenario.Persons; list.SelectOne = true; list.ShowDialog(); if (list.IDList.Count == 1) { PersonDialog item = new PersonDialog(); item.SpeakingPerson = this.Scenario.Persons.GetGameObject(list.IDList[0]) as Person; item.Text = "非空话语"; this.EditingEvent.Dialogs.Add(item); this.RefreshDialogs(); } }
private void button1_Click(object sender, EventArgs e) { PersonList list = new PersonList(); if (this.EditingEvent.LaunchPerson != null) { list.Add(this.EditingEvent.LaunchPerson); } if (this.EditingEvent.TargetPersons.Count > 0) { foreach (PersonRelation relation in this.EditingEvent.TargetPersons) { list.Add(relation.SpeakingPerson); } } frmSelectPersonList list2 = new frmSelectPersonList(); list2.Persons = list; list2.SelectOne = true; list2.ShowDialog(); if (list2.IDList.Count == 1) { TroopEffectPerson item = new TroopEffectPerson(); item.EffectPerson = list.GetGameObject(list2.IDList[0]) as Person; item.Effect = this.cbPersonEffect.Items[0] as GameObjects.TroopDetail.EventEffect.EventEffect; this.EditingEvent.EffectPersons.Add(item); this.RefreshPersonEffects(); } }
private void btnAddTargetPerson_Click(object sender, EventArgs e) { frmSelectPersonList list = new frmSelectPersonList(); list.Persons = this.Scenario.Persons; list.ShowDialog(); if (list.IDList.Count > 0) { foreach (int num in list.IDList) { PersonRelation item = new PersonRelation(); item.SpeakingPerson = this.Scenario.Persons.GetGameObject(num) as Person; if (this.clbTargetPersons.Items.IndexOf(item.SpeakingPerson) < 0) { this.EditingEvent.TargetPersons.Add(item); } } this.RefreshTargetPersons(); } }
private void btnAddPersonEffectFromAll_Click(object sender, EventArgs e) { frmSelectPersonList list = new frmSelectPersonList(); list.Persons = this.Scenario.Persons; list.SelectOne = true; list.ShowDialog(); if (list.IDList.Count == 1) { TroopEffectPerson item = new TroopEffectPerson(); item.EffectPerson = this.Scenario.Persons.GetGameObject(list.IDList[0]) as Person; item.Effect = this.cbPersonEffect.Items[0] as GameObjects.TroopDetail.EventEffect.EventEffect; this.EditingEvent.EffectPersons.Add(item); this.RefreshPersonEffects(); } }
private void btnAddDialogFromRelated_Click(object sender, EventArgs e) { PersonList list = new PersonList(); if (this.EditingEvent.LaunchPerson != null) { list.Add(this.EditingEvent.LaunchPerson); } if (this.EditingEvent.TargetPersons.Count > 0) { foreach (PersonRelation relation in this.EditingEvent.TargetPersons) { list.Add(relation.SpeakingPerson); } } frmSelectPersonList list2 = new frmSelectPersonList(); list2.Persons = list; list2.SelectOne = true; list2.ShowDialog(); if (list2.IDList.Count == 1) { PersonDialog item = new PersonDialog(); item.SpeakingPerson = list.GetGameObject(list2.IDList[0]) as Person; item.Text = "非空话语"; this.EditingEvent.Dialogs.Add(item); this.RefreshDialogs(); } }
private void btnSelectLeaderInCurrentArchitecture_Click(object sender, EventArgs e) { if ((this.CurrentArchitecture != null) && (this.editingMilitary != null)) { frmSelectPersonList list = new frmSelectPersonList(); list.Persons = this.CurrentArchitecture.Persons; list.SelectOne = true; list.ShowDialog(); if (list.IDList.Count == 1) { this.tbLeaderID.Text = list.IDList[0].ToString(); } } }