Ejemplo n.º 1
0
        private void GetEnginePath()
        {
            var myGameEnginePath = Environment.GetEnvironmentVariable("MYGAME_ENGINE", EnvironmentVariableTarget.User);

            if (myGameEnginePath == null || !Directory.Exists(Path.Combine(myGameEnginePath, @"Engine\Engine\EngineAPI")))
            {
                var dlg = new EnginePathDialog();
                if (dlg.ShowDialog() == true)
                {
                    MyGameEnginePath = dlg.MyGameEnginePath;
                    Environment.SetEnvironmentVariable("MYGAME_ENGINE", MyGameEnginePath.ToUpper(), EnvironmentVariableTarget.User);
                }
            }
            else
            {
                MyGameEnginePath = myGameEnginePath;
            }
        }
Ejemplo n.º 2
0
        private void GetEnginePath()
        {
            var primalPath = Environment.GetEnvironmentVariable("PRIMAL_ENGINE", EnvironmentVariableTarget.User);

            if (primalPath == null || !Directory.Exists(Path.Combine(primalPath, @"Engine\EngineAPI")))
            {
                var dlg = new EnginePathDialog();
                if (dlg.ShowDialog() == true)
                {
                    PrimalPath = dlg.PrimalPath;
                    Environment.SetEnvironmentVariable("PRIMAL_ENGINE", PrimalPath.ToUpper(), EnvironmentVariableTarget.User);
                }
                else
                {
                    Application.Current.Shutdown();
                }
            }
            else
            {
                PrimalPath = primalPath;
            }
        }