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; } }
public void InitEncounter(Encounter encounter) { currentEncounter = encounter; table = encounter.InitiativeTable; table.OnListUpdate += Table_OnListUpdate; UpdateLists(); }
partial void OnEndEncounterButtonClicked(NSObject sender) { _encounter.endEncounter(); InitiativeTable.ReloadData(); StartEncounterButton.Enabled = true; EndEncounterButton.Enabled = false; }
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 }); }
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; } }