void ReleaseDesignerOutlets()
        {
            if (EndEncounterButton != null)
            {
                EndEncounterButton.Dispose();
                EndEncounterButton = null;
            }

            if (InitiativeTable != null)
            {
                InitiativeTable.Dispose();
                InitiativeTable = null;
            }

            if (MonsterTable != null)
            {
                MonsterTable.Dispose();
                MonsterTable = null;
            }

            if (PartyTable != null)
            {
                PartyTable.Dispose();
                PartyTable = null;
            }

            if (StartEncounterButton != null)
            {
                StartEncounterButton.Dispose();
                StartEncounterButton = null;
            }
        }
예제 #2
0
 public void InitEncounter(Encounter encounter)
 {
     currentEncounter    = encounter;
     table               = encounter.InitiativeTable;
     table.OnListUpdate += Table_OnListUpdate;
     UpdateLists();
 }
예제 #3
0
 partial void OnEndEncounterButtonClicked(NSObject sender)
 {
     _encounter.endEncounter();
     InitiativeTable.ReloadData();
     StartEncounterButton.Enabled = true;
     EndEncounterButton.Enabled   = false;
 }
예제 #4
0
 public override void ViewDidLoad()
 {
     base.ViewDidLoad();
     PartyTable.DataSource      = characterDataSource;
     PartyTable.Delegate        = new CharacterEntriesDelegate(characterDataSource);
     MonsterTable.DataSource    = monsterDataSource;
     MonsterTable.Delegate      = new MonsterEntriesDelegate(monsterDataSource);
     InitiativeTable.DataSource = initiativeOrderDataSource;
     InitiativeTable.Delegate   = new CreatureEntriesDelegate(initiativeOrderDataSource);
     InitiativeTable.RegisterForDraggedTypes(new string[] { DungeonToolsConstants.ECOUNTER_INITIATIVE_DRAG_DROP_TYPE });
 }
예제 #5
0
 partial void OnStartEncounterButtonClicked(NSObject sender)
 {
     _encounter.Party    = characterDataSource.CharacterEntries;
     _encounter.Monsters = monsterDataSource.MonsterEntries;
     if (_encounter.Party.Count > 0 || _encounter.Monsters.Count > 0)
     {
         _encounter.start();
         initiativeOrderDataSource.CreatureEntries = _encounter.InitiativeOrder;
         InitiativeTable.ReloadData();
         StartEncounterButton.Enabled = false;
         EndEncounterButton.Enabled   = true;
     }
 }