示例#1
0
 private void LoadAllSettings()
 {
     laucherSettings      = new LauncherSettings();
     serverSettings       = new ServerSettings(System.IO.Path.Combine(laucherSettings.GetServerLocation(), "data"));
     ProfileSettings      = new ProfileSettings(Path.Combine(laucherSettings.GetServerLocation(), "data/profiles"));
     LoginBackendURL.Text = laucherSettings.GetBackendURL();
     Port.Text            = serverSettings.GetServerPort();
 }
示例#2
0
        private void CheckAllErrors()
        {
            string check_client_file = laucherSettings.GetClientLocation() + @"\" + laucherSettings.GetClientFilename() + ".exe";

            if (!File.Exists(check_client_file))
            {
                ErrorHandler.AddError(111, "Cannot find client at this location.");
            }
            string check_server_file = laucherSettings.GetServerLocation() + @"\" + laucherSettings.GetServerFilename() + ".exe";

            if (!File.Exists(check_server_file))
            {
                ErrorHandler.AddError(112, "Cannot find server at this location.");
            }
            DisplayErrors();
        }
示例#3
0
 private void LoadAllSettings()
 {
     laucherSettings          = new LauncherSettings();
     BackendIP.Text           = laucherSettings.LoadIP();
     Port.Text                = laucherSettings.LoadPort();
     ScreenMode.SelectedIndex = laucherSettings.GetScreenMode();
     //replace names if no error exist for client and server
     if (!ErrorHandler.isError(101))
     {
         clientWatcher.ChangeAppName(laucherSettings.GetClientFilename());
     }
     if (!ErrorHandler.isError(102))
     {
         serverWatcher.ChangeAppName(laucherSettings.GetServerFilename());
         serverSettings  = new ServerSettings(laucherSettings.GetServerLocation() + @"\");
         ProfileSettings = new ProfileSettings(laucherSettings.GetServerLocation() + @"\data\profiles");
     }
 }
示例#4
0
        private void LoadLauncherSettings()
        {
            // reload config files
            LoadAllSettings();

            // load the settings
            //load locations
            ClientLocation.Text = laucherSettings.GetClientLocation();
            ServerLocation.Text = laucherSettings.GetServerLocation();
            //load filenames
            ClientFileName.Text = laucherSettings.GetClientFilename();
            ServerFileName.Text = laucherSettings.GetServerFilename();
        }
示例#5
0
        private void CheckAllErrors()
        {
            string check_client_file = laucherSettings.GetClientLocation() + @"\" + laucherSettings.GetClientFilename() + ".exe";

            if (!File.Exists(check_client_file))
            {
                ErrorHandler.AddError(ErrorType.error_Client_noLocation);
            }
            string check_server_file = laucherSettings.GetServerLocation() + @"\" + laucherSettings.GetServerFilename() + ".exe";

            if (!File.Exists(check_server_file))
            {
                ErrorHandler.AddError(ErrorType.error_Server_noLocation);
            }
            DisplayErrors();
        }
示例#6
0
 private void LoadLauncherSettings()
 {
     GameLocation.Text   = laucherSettings.GetGameLocation();
     ServerLocation.Text = laucherSettings.GetServerLocation();
 }
示例#7
0
 private void LoadAllSettings()
 {
     laucherSettings = new LauncherSettings();
     serverSettings  = new ServerSettings(Path.Combine(laucherSettings.GetServerLocation(), "data"));
     ProfileSettings = new ProfileSettings(Path.Combine(laucherSettings.GetServerLocation(), "data/profiles"));
 }