Esempio n. 1
0
        static void Main()
        {
            List<string> commandLine = new List<string>(Environment.GetCommandLineArgs());
            commandLine.RemoveAt(0); // Remove program name

            SSCore.Initialize(commandLine, false);

            Client client = null;
            try
            {
                client = new Client();
                client.Run();
            }
            catch (Exception e)
            {
                Debug.Log(LogLevel.Fatal, "A runtime exception was caught and was unhandled.");
                Debug.LogException(e);
                bool ok = Debug.ShowErrorBox("Unhandled Exception", "\"" + e.Message + "\"\n" + e.StackTrace.Replace("\n", "\n\t"));
                Debug.Log("User pressed " + (ok ? "OK" : "CANCEL") + " for the error window.");
            }
            finally
            {
                client.Dispose();
            }

            SSCore.Shutdown();
        }
Esempio n. 2
0
        public Client()
            : base()
        {
            _theClient = this;

            Graphics = new GraphicsDeviceManager(this);
            Graphics.PreferredBackBufferWidth = 1600;
            Graphics.PreferredBackBufferHeight = 900;
            Window.Position = new Point(160, 90);
            Window.Title = "Space Station X1";
            Graphics.ApplyChanges();
            this.IsMouseVisible = true;
        }