private void ConnectBtn_Click(object sender, EventArgs e) { if (SaveIPCheckbox.Checked == true) { Properties.Settings.Default.saved_ip = IpAdressTxt.Text; // Upon connection to the PS4 it will save the IP. Properties.Settings.Default.Save(); } if (!PS4.ConnectTarget(IpAdressTxt.Text)) //If fails to connect display. { MetroFramework.MetroMessageBox.Show(this, "Could not connect to target (" + IpAdressTxt.Text + ")"); } else // If success. { PS4.Notify(222, "@ShA_ToolBox - Connected"); DisconnectBtn.Enabled = true; SendNotificationBtn.Enabled = true; AttachBtn.Enabled = true; NotifMsgTxt.Enabled = true; materialLabel2.Text = "Please attach."; materialLabel2.ForeColor = Color.Red; } }
private void btnConnect_Click(object sender, EventArgs e) { if (PS4.IsConnected) { return; } btnConnect.ForeColor = PS4.ConnectTarget(txtIp.Text) ? Color.Green : Color.Red; }
private void firefoxButton7_Click(object sender, EventArgs e) { try { PS4.ConnectTarget(textBox1.Text); toolStripStatusLabel2.Text = "Connected !"; toolStripStatusLabel2.ForeColor = Color.Lime; PS4.Notify(222, "PS4 successfully connected !\nPS4 BO3 RTM Tool By MrNiato\nTwitter : @ImMrNiato\nwww.mrniato.com"); } catch { MessageBox.Show("Error while connecting the console !"); } }
private void ConnectPS4(object sender, EventArgs e) { try { PS4.ConnectTarget(ip.Text); PS4.Notify(222, "Connected"); ConnectLabel.Text = "PS4 Connected"; ConnectLabel.TextColor = Color.ForestGreen; DisplayAlert("Information", "The PS4 is connected !", "OK"); } catch { DisplayAlert("Information", "PS4 is not connected !", "OK"); } }
private void btnConnect_Click(object sender, EventArgs e) { if (ps4.IsConnected) { MessageBox.Show("Already Connected"); return; } if (!ps4.ConnectTarget(txtIp.Text)) { MessageBox.Show("Connection field!"); } else { MessageBox.Show("Connected.."); } }
/// <summary> /// Connects to target. /// If platform doesn't require connection, just return true. /// IMPORTANT: /// Since NetCheat connects and attaches a few times after the user does (Constant write thread, searching, ect) /// You must have it automatically use the settings that the user input, instead of asking again /// This can be reset on Disconnect() /// </summary> public bool Connect() { if (PS4.IsConnected) { return(true); } string ip = string.Empty; using (FrmIP frmIp = new FrmIP()) { frmIp.txtIp.Text = Properties.Settings.Default.ip; frmIp.btnConnect.Click += (o, e) => { frmIp.Close(); frmIp.DialogResult = DialogResult.OK; }; frmIp.ShowDialog(); Properties.Settings.Default.ip = frmIp.txtIp.Text; Properties.Settings.Default.Save(); if (frmIp.DialogResult != DialogResult.OK) { return(false); } ip = frmIp.txtIp.Text; } return(PS4.ConnectTarget(ip)); }