public MainForm() { InitializeComponent(); InitializeMenuItems(); InitializeEvents(); SlateCore.RegisterForm(this); }
public SlateCore() { instance = this; // Get our config Config = LoadOrCreateConfig(); // Show the main form var form = new MainForm(); form.Show(); }
private void OpenGameTab(string worldName, string characterName) { var world = SlateCore.Config.GetWorld(worldName); if (world == null) { var message = $"Cannot find world \"{worldName}\""; SlateCore.Log(message, SlateCore.LogLevel.Error); MessageBox.Show(message, "Error loading world", MessageBoxButtons.OK, MessageBoxIcon.Error); return; } var character = world.GetCharacter(characterName); if (character == null) { var message = $"Cannot find character \"{characterName}\" in world \"{worldName}\""; SlateCore.Log(message, SlateCore.LogLevel.Error); MessageBox.Show(message, "Error loading world", MessageBoxButtons.OK, MessageBoxIcon.Error); return; } MessageBox.Show($"Open \"{world.Name}\", \"{character.Name}\""); }