Esempio n. 1
0
        public MainForm()
        {
            InitializeComponent();
            InitializeMenuItems();
            InitializeEvents();

            SlateCore.RegisterForm(this);
        }
Esempio n. 2
0
        public SlateCore()
        {
            instance = this;

            // Get our config
            Config = LoadOrCreateConfig();

            // Show the main form
            var form = new MainForm();

            form.Show();
        }
Esempio n. 3
0
        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}\"");
        }