Esempio n. 1
0
 public ServerConsolePage(LauncherLogic logic)
 {
     InitializeComponent();
     this.logic = logic;
     this.logic.StartServerEvent += OnStartServer;
     PropertyChanged             += PropertyChange;
     CommandText = "";
 }
Esempio n. 2
0
        public ServerPage(LauncherLogic logic)
        {
            InitializeComponent();

            RBIsDocked.IsChecked   = !Settings.Default.IsExternalServer;
            RBIsExternal.IsChecked = Settings.Default.IsExternalServer;

            this.logic = logic;
        }
Esempio n. 3
0
        public ServerPage(LauncherLogic logic)
        {
            InitializeComponent();

            // Change style depending on windows version. Win 10 uses other definition of comboboxes then win 7 so win 10 has its own style
            if (Environment.OSVersion.Version.Major >= 6 && Environment.OSVersion.Version.Minor > 1)
            {
                CBox.Style = (Style)Resources["ComboBoxStyle"];
                CBox.ApplyTemplate();
            }
            this.logic = logic;
        }
Esempio n. 4
0
        private void Application_Startup(object sender, StartupEventArgs e)
        {
            LauncherLogic     = new LauncherLogic();
            LaunchGamePage    = new LaunchGamePage();
            OptionPage        = new OptionPage();
            ServerConsolePage = new ServerConsolePage();
            ServerPage        = new ServerPage();
            MainWindow        = new MainWindow();
            MainWindow.Show();


            Log.Setup();

            // Error if running from a temporary directory because Nitrox Launcher won't be able to write files directly to zip/rar
            // Tools like WinRAR do this to support running EXE files while it's still zipped.
            if (Directory.GetCurrentDirectory().StartsWith(Path.GetTempPath(), StringComparison.OrdinalIgnoreCase))
            {
                MessageBox.Show("Nitrox launcher should not be executed from a temporary directory. Install Nitrox launcher properly by extracting ALL files and moving these to a dedicated location on your PC.",
                                "Invalid working directory",
                                MessageBoxButton.OK,
                                MessageBoxImage.Error);
                Environment.Exit(1);
            }
        }
Esempio n. 5
0
 public ServerPage(LauncherLogic logic)
 {
     InitializeComponent();
     this.logic = logic;
 }
Esempio n. 6
0
 public LaunchGamePage(LauncherLogic logic)
 {
     InitializeComponent();
     this.logic = logic;
 }
Esempio n. 7
0
 public OptionPage(LauncherLogic logic)
 {
     InitializeComponent();
     this.logic       = logic;
     PathToSubnautica = logic.LoadSettings();
 }