private void OnCheckIDs(object o, EventArgs args) { if (application.CurrentTilemap == null) { return; } List <int> invalidtiles = QACheck.CheckIds(application.CurrentTilemap, application.CurrentLevel.Tileset); MessageType msgtype; System.Text.StringBuilder sb = new System.Text.StringBuilder(); if (invalidtiles.Count == 0) { msgtype = MessageType.Info; sb.Append("All tile ids are valid"); } else { msgtype = MessageType.Warning; sb.Append("This tilemap contains tiles with these nonexistent IDs:"); foreach (int id in invalidtiles) { sb.Append(" " + id.ToString()); } } MessageDialog md = new MessageDialog(null, DialogFlags.DestroyWithParent, msgtype, ButtonsType.Close, sb.ToString()); md.Run(); md.Destroy(); }
protected void OnQACheck(object o, EventArgs args) { if (level == null) { return; } QACheck.CheckObjectDirections(level); foreach (Sector sector in level.Sectors) { QACheck.CheckIds(this, sector, false); } QACheck.CheckLicense(level); }
protected void OnCheckIDs(object o, EventArgs args) { QACheck.CheckIds(application, sector, true); }