예제 #1
0
 private void CheckIfFinished(object state)
 {
     if (GlobalVars.ReadyToLaunch == false)
     {
         System.Threading.Timer timer = new System.Threading.Timer(new TimerCallback(CheckIfFinished), null, 1, 0);
     }
     else
     {
         string   ExtractedArg = GlobalVars.SharedArgs.Replace("rbxlegacy://", "").Replace("rbxlegacy", "").Replace(":", "").Replace("/", "").Replace("?", "");
         string   ConvertedArg = SecurityFuncs.Base64Decode(ExtractedArg);
         string[] SplitArg     = ConvertedArg.Split('|');
         string   ip           = SecurityFuncs.Base64Decode(SplitArg[0]);
         string   port         = SecurityFuncs.Base64Decode(SplitArg[1]);
         string   client       = SecurityFuncs.Base64Decode(SplitArg[2]);
         label1.Text = "Launching " + client + " game...";
         LauncherFuncs.ReadClientValues(client);
         if (GlobalVars.HasRocky == true)
         {
             Process sudp = new Process();
             sudp.StartInfo.FileName        = Path.GetDirectoryName(Assembly.GetExecutingAssembly().Location) + "\\udppipe.exe";
             sudp.StartInfo.Arguments       = "-p " + ip + " " + port + " " + port;
             sudp.StartInfo.UseShellExecute = false;
             sudp.StartInfo.CreateNoWindow  = true;
             sudp.Start();
         }
         StartGame();
     }
 }
예제 #2
0
        void ReadClientValues(string ClientName)
        {
            string clientpath = Path.GetDirectoryName(Assembly.GetExecutingAssembly().Location) + "\\clients\\" + ClientName + "\\clientinfo.txt";

            if (!File.Exists(clientpath))
            {
                MessageBox.Show("No clientinfo.txt detected with the client you chose. The client either cannot be loaded, or it is not available.", "RBXLegacy Launcher - Error while loading client", MessageBoxButtons.OK, MessageBoxIcon.Error);
                GlobalVars.SelectedClient = "2008";
            }

            LauncherFuncs.ReadClientValues(clientpath);
        }
예제 #3
0
		void ReadClientValues(string ClientName)
		{
			string clientpath = GlobalVars.ClientDir + @"\\" + ClientName + @"\\clientinfo.txt";
			
			if (!File.Exists(clientpath))
			{
				ConsolePrint("ERROR 1 - No clientinfo.txt detected with the client you chose. The client either cannot be loaded, or it is not available.", 2);
				MessageBox.Show("No clientinfo.txt detected with the client you chose. The client either cannot be loaded, or it is not available.","RBXLegacy Launcher - Error while loading client", MessageBoxButtons.OK, MessageBoxIcon.Error);
				GlobalVars.SelectedClient = "2008";
			}
			
			LauncherFuncs.ReadClientValues(clientpath);
			
			if (GlobalVars.UsesPlayerName == true)
			{
				textBox2.Enabled = true;
			}
			else if (GlobalVars.UsesPlayerName == false)
			{
				textBox2.Enabled = false;
			}
			
			if (GlobalVars.UsesID == true)
			{
				textBox5.Enabled = true;
				button4.Enabled = true;
				if (GlobalVars.IP.Equals("localhost"))
				{
					checkBox3.Enabled = true;
				}
			}
			else if (GlobalVars.UsesID == false)
			{
				textBox5.Enabled = false;
				button4.Enabled = false;
				checkBox3.Enabled = false;
				GlobalVars.LocalPlayMode = false;
			}
					
			// use clientinfo desc rather than labels
			
			textBox6.Text = GlobalVars.SelectedClientDesc;
			label26.Text = GlobalVars.SelectedClient;
			ConsolePrint("Client '" + GlobalVars.SelectedClient + "' successfully loaded.", 3);
		}