Example #1
0
 public void updatePerson(CPerson updated)
 {
     if (!this.persons.ContainsKey(updated.getID()))
     {
         throw new System.ArgumentException("Персонажа с таким ID не существует!");
     }
     persons[updated.getID()] = updated;
 }
Example #2
0
 public EditPersonForm(ref CAimManager _aimManager, ref CItemManager _itemManager, ref CPersonManager _personManager)
 {
     InitializeComponent();
     editedPerson = new CPerson();
     aimManager = _aimManager;
     itemManager = _itemManager;
     personManager = _personManager;
     fillUIComponents();
 }
Example #3
0
 public EditPersonForm(CPerson _person, ref CAimManager _aimManager, ref CItemManager _itemManager, ref CPersonManager _personManager)
 {
     InitializeComponent();
     editedPerson = _person;
     aimManager = _aimManager;
     itemManager = _itemManager;
     personManager = _personManager;
     fillUIComponents();
     fillPersonData();
 }
Example #4
0
 public void refreshItemOnPersons(List <int> ownersID, int itemID)
 {
     foreach (int ownerID in ownersID)
     {
         CPerson person = getPerson(ownerID);
         if (!person.itemsId.Contains(itemID))
         {
             persons[ownerID].itemsId.Add(itemID);
         }
     }
     foreach (CPerson person in persons.Values)
     {
         if (person.itemsId.Contains(itemID) && !ownersID.Contains(person.getID()))
         {
             person.itemsId.Remove(itemID);
         }
     }
 }
Example #5
0
 public void refreshAimOnPersons(List <int> followersID, int aimID)
 {
     foreach (int followerID in followersID)
     {
         CPerson person = getPerson(followerID);
         if (!person.aimsId.Contains(aimID))
         {
             persons[followerID].aimsId.Add(aimID);
         }
     }
     foreach (CPerson person in persons.Values)
     {
         if (person.aimsId.Contains(aimID) && !followersID.Contains(person.getID()))
         {
             person.aimsId.Remove(aimID);
         }
     }
 }
Example #6
0
        public void addPerson(CPerson person)
        {
            int newID = calcNewID();

            addPerson(newID, person.getName(), person.sex, person.description, person.unremovable, person.comment, person.itemsId, person.aimsId, person.clan, person.altName);
        }
Example #7
0
 private void ddlPersonChoose_SelectedValueChanged(object sender, EventArgs e)
 {
     chosenPerson = personManager.getPerson((int)ddlPersonChoose.SelectedValue);
     ddlSexChoose.SelectedValue = chosenPerson.sex;
 }
Example #8
0
 public void updatePerson(CPerson updated)
 {
     if (!this.persons.ContainsKey(updated.getID()))
         throw new System.ArgumentException("Персонажа с таким ID не существует!");
     persons[updated.getID()] = updated;
 }
Example #9
0
 public void addPerson(CPerson person)
 {
     int newID = calcNewID();
     addPerson(newID, person.getName(), person.sex, person.description, person.unremovable, person.comment, person.itemsId, person.aimsId, person.clan, person.altName);
 }