Пример #1
0
 private void btnSetHidePlace_Click(object sender, EventArgs e)
 {
     frmSelectArchitectureList list = new frmSelectArchitectureList();
     list.SelectOne = true;
     list.Architectures = this.Scenario.Architectures;
     list.ShowDialog();
     if (list.SelectedArchitecture != null)
     {
         this.EditingTreasure.HidePlace = list.SelectedArchitecture;
         this.lbHidePlace.Text = this.EditingTreasure.HidePlaceString;
     }
 }
Пример #2
0
 private void btnAddArchitectures_Click(object sender, EventArgs e)
 {
     frmSelectArchitectureList list = new frmSelectArchitectureList();
     list.Architectures = this.editingFaction.Scenario.Architectures;
     list.ShowDialog();
     foreach (int num in list.IDList)
     {
         Architecture gameObject = list.Architectures.GetGameObject(num) as Architecture;
         if (gameObject != null)
         {
             this.editingFaction.AddArchitecture(gameObject);
             this.editingFaction.AddArchitectureMilitaries(gameObject);
         }
     }
     this.RefreshArchitectures();
 }
Пример #3
0
 private void btnStateAdmin_Click(object sender, EventArgs e)
 {
     frmSelectArchitectureList list = new frmSelectArchitectureList();
     list.Architectures = this.Scenario.Architectures;
     list.SelectOne = true;
     list.ShowDialog();
     foreach (int num in list.IDList)
     {
         Architecture gameObject = list.Architectures.GetGameObject(num) as Architecture;
         if (gameObject != null)
         {
             this.EditingState.StateAdmin = gameObject;
             this.lbStateAdmin.Text = this.EditingState.StateAdminString;
             break;
         }
     }
 }
Пример #4
0
 private void SelectRegionCore()
 {
     if (!this.dgvRegion.IsCurrentCellInEditMode && (this.dgvRegion.SelectedRows.Count > 0))
     {
         GameObjects.ArchitectureDetail.Region dataBoundItem = this.dgvRegion.SelectedRows[0].DataBoundItem as GameObjects.ArchitectureDetail.Region;
         frmSelectArchitectureList list = new frmSelectArchitectureList();
         list.Architectures = this.Scenario.Architectures;
         list.SelectOne = true;
         list.ShowDialog();
         foreach (int num in list.IDList)
         {
             Architecture gameObject = list.Architectures.GetGameObject(num) as Architecture;
             if (gameObject != null)
             {
                 dataBoundItem.RegionCore = gameObject;
                 this.dgvRegion.Invalidate();
                 break;
             }
         }
     }
 }
Пример #5
0
 private void 设置位置ToolStripMenuItem_Click(object sender, EventArgs e)
 {
     if ((this.Persons != null) && (this.Persons.Count != 0))
     {
         PersonList list = new PersonList();
         for (int i = 0; i < this.dgvPersons.SelectedRows.Count; i++)
         {
             list.Add(this.dgvPersons.SelectedRows[i].DataBoundItem as Person);
         }
         frmSelectArchitectureList list2 = new frmSelectArchitectureList();
         list2.Architectures = this.Persons[0].Scenario.Architectures;
         list2.SelectOne = true;
         list2.ShowDialog();
         if (list2.IDList.Count > 0)
         {
             this.lastArchitecture = this.Persons[0].Scenario.Architectures.GetGameObject(list2.IDList[0]) as Architecture;
             this.menuRecentLocation.DropDownItems.Add(this.lastArchitecture.Name, null, new EventHandler(this.RecentLocationToolStripMenuItem_Click)).Tag = this.lastArchitecture;
             if (this.menuRecentLocation.DropDownItems.Count > 10)
             {
                 this.menuRecentLocation.DropDownItems.RemoveAt(0);
             }
             foreach (Person person in list)
             {
                 this.ApplyLastArchitecture(person);
             }
             this.dgvPersons.Invalidate();
         }
     }
 }