/*-----------------*/ /*-----Workers-----*/ /*-----------------*/ //BW_connect, Connect to Console in Background private void BW_connect_DoWork(object sender, DoWorkEventArgs e) { BackgroundWorker BW_connect = sender as BackgroundWorker; //Connect CCAPI to PS3 if Button clicked PS3.ConnectTarget(psip); //Check Connection if (PS3.SUCCESS(PS3.ConnectTarget(psip))) { //Status "Connected!" stat_connected(); PS3.RingBuzzer(CCAPI.BuzzerMode.Single); //Start Backgroundworker to get Data BW_psdata.RunWorkerAsync(); //Show Status MessageBox.Show("Connected to: " + psip + "!", "Connected"); } else { //Status "Not Connected!" stat_notconnected(); //Show Status MessageBox.Show("Failed to Connect to: " + psip + "!", "Connection Error"); } }
private void btnConnect_Click(object sender, EventArgs e) { if (PS3.SUCCESS(PS3.ConnectTarget(BoxIP.Text))) { if (!TargetInfo.IsAlive) { threadIsRunning = true; TargetInfo.Start(); } EnableBoxes(true); MessageBox.Show("Connected !", "Success", MessageBoxButtons.OK, MessageBoxIcon.Asterisk); } else { EnableBoxes(false); MessageBox.Show("Impossible to connect", "Error", MessageBoxButtons.OK, MessageBoxIcon.Error); } }
private void button1_Click(object sender, EventArgs e) { Regex regex = new Regex(@"\d*\.\d*\.\d*\.\d*$"); FileStream file = new FileStream("ip.txt", FileMode.OpenOrCreate, FileAccess.ReadWrite); StreamReader reader = new StreamReader(file); //FileStreamのインスタンス StreamWriter writer = new StreamWriter(file); //FileStreamのインスタンス; if (reader.EndOfStream == true) { ip = textBox1.Text; writer.WriteLine(ip); } while (reader.EndOfStream == false) //最後になるまで { string a = reader.ReadLine(); //一行読み込み MatchCollection matchCol = regex.Matches(a); foreach (Match match in matchCol) { Match xxx = match; textBox1.Text = xxx.Value; ip = xxx.Value; } } writer.Close(); int fl = PS3.ConnectTarget(textBox1.Text); if (!PS3.SUCCESS(fl)) { MessageBox.Show("PS3.ConnectTarget失敗"); return; } PS3.AttachProcess(); adores = 0x01A33230; string bytest = "600000004BFFFFB42C0700074081FF88"; byte[] s = stringTobytes(bytest); PS3.Extension.WriteBytes(adores, s); adores = 0x01A33D9C; s = stringTobytes("7CE3232E4E8000208063007C7C6320AE"); PS3.Extension.WriteBytes(adores, s); }
private void connectAndAttach_Click(object sender, EventArgs e) { if (console.ConnectTarget()) { connected = true; console.AttachProcess(); label1.Text = "Status: Connected and Attached to the current process!"; label1.ForeColor = Color.Green; connectAndAttach.Enabled = false; } else { MessageBox.Show("Couldn't connect to your console"); } }
private void button4_Click(object sender, EventArgs e) { int fl = PS3.ConnectTarget(textBox1.Text); if (!PS3.SUCCESS(fl)) { MessageBox.Show("PS3.ConnectTarget失敗"); return; } PS3.AttachProcess(); button1.Enabled = true; button2.Enabled = true; button3.Enabled = true; button5.Enabled = true; button6.Enabled = true; }
static void Main(string[] args) { PS3.ConnectTarget(); }