Exemplo n.º 1
0
        private void ValidateConfig()
        {
            EditorConfig config = EditorConfig.Get();

            if (!File.Exists(config.ClientExecutablePath))
            {
                throw new FileNotFoundException($"Client executable not found: {config.ClientExecutablePath}");
            }
        }
Exemplo n.º 2
0
        private void previewToolStripMenuItem_Click(object sender, System.EventArgs e)
        {
            EditorConfig config = EditorConfig.Get();

            Process process = new Process
            {
                StartInfo = new ProcessStartInfo
                {
                    FileName  = Path.GetFullPath(config.ClientExecutablePath),
                    Arguments = $"--map \"{Path.GetFullPath(currentMapPath)}\""
                }
            };

            process.Start();
            process.WaitForExit();
        }