コード例 #1
0
        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;
            }
        }
コード例 #2
0
 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 !");
     }
 }
コード例 #3
0
 private void Button_Clicked(object sender, EventArgs e)
 {
     try
     {
         PS4.ConnectTarget(PS4IP.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");
     }
 }
コード例 #4
0
 private void mButton1_Click(object sender, EventArgs e)
 {
     if (iptxt.Text == "")//Aqui se puede poner la IP de public static string IP "192.168.178.30"
     {
         MessageBox.Show("Enter PS4 IP");
     }
     else
     {
         PS4.Notify(222, "PS4 Connected :)");
         bool result = Connect2PS4(iptxt.Text, puertotxt.Text);
         lblestado.Text       = "Connected";
         lblestado.ForeColor  = Color.LimeGreen;
         btconectar.ForeColor = Color.LimeGreen;
         if (!result)
         {
             lblestado.Text      = "Failed!";
             lblestado.ForeColor = Color.Red;
             MessageBox.Show("Error\n" + Exception);
         }
     }
 }
コード例 #5
0
ファイル: FrmMain.cs プロジェクト: gatekeeper1122/PS4Lib
 private void btnNotify_Click(object sender, EventArgs e)
 {
     ps4.Notify(cmbNotifyType.SelectedIndex, txtNotify.Text);
 }