Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- using System;
- using System.Collections.Generic;
- using System.ComponentModel;
- using System.Data;
- using System.Drawing;
- using System.Linq;
- using System.Text;
- using System.Windows.Forms;
- namespace PS3Lib
- {
- public partial class IPList : Form
- {
- public IPList()
- {
- InitializeComponent();
- }
- public string consoleipaddress
- {
- set { this.label2.Text = value; }
- get { return this.label2.Text; }
- }
- //FUCK HOLY SHIT THIS TOOK AWHILE :p ~3 Hours for this shit
- /// <summary>
- /// reason: didn't realize it was saving the string array like this:
- /// { "allips and macs here" } //string[] ipmac
- /// instead of being like this: { "one.ip.here + mac", "two.ip.here + mac"... and so on }
- /// </summary>
- CCAPI CC = new CCAPI();
- public string[] ipmac;
- public void clearcombo()
- {
- ipmac = new string[]{ "" };
- comboBox1.Text = "";
- comboBox1.Items.Clear();
- }
- private void IPList_Load(object sender, EventArgs e)
- {
- string[] ipmac2 = ipmac;
- string publicip = "";
- label2.Text = publicip;
- int count = 0;
- string ips = string.Join(",", ipmac2);
- ips = ips.TrimEnd(',');
- // MessageBox.Show(ips);
- char[] splitchar = { ',' };
- ipmac2 = ips.Split(splitchar);
- for (count = 0; count <= ipmac2.Length - 1; count++)
- {
- string iparray = ipmac2[count];
- comboBox1.Items.Add(iparray);
- }
- label1.Text = "PS3Lib " + "Version: " + this.ProductVersion + "\n" + "Modified By: BaSs_HaXoR";
- label1.Left = (label1.Parent.Width - label1.Width) / 2;
- }
- //FUCK HOLY SHIT THIS TOOK AWHILE :p ~3 Hours for this shit
- public string connection = "N/a";
- public string MACaddress = "N/a";
- public string consoleip()
- {
- string[] ipmac2 = ipmac;
- // int count = 0;
- string ips = string.Join(",", ipmac);
- ips = ips.TrimEnd(',');
- // MessageBox.Show(ips);
- char[] splitchar = { ',' };
- ipmac2 = ips.Split(splitchar);
- /* for (count = 0; count <= ipmac.Length - 1; count++)
- {*/
- string iparray = ipmac2[1];
- // }
- //comboBox1.SelectedIndex = 1;
- connection = iparray;// comboBox1.Text;
- // MACaddress = comboBox1.Text;
- connection = connection.Split('-')[0];
- // MACaddress = MACaddress.Substring(MACaddress.LastIndexOf(@"-") + 1);
- connection = connection.Replace(" ", "");
- return connection;
- }
- public void quickconnvoid(int icon, string yourmessage)
- {
- // int count = 0;
- string[] ipmac2 = ipmac;
- string ips = string.Join(",", ipmac2);
- ips = ips.TrimEnd(',');
- // MessageBox.Show(ips);
- char[] splitchar = { ',' };
- ipmac2 = ips.Split(splitchar);
- /* for (count = 0; count <= ipmac.Length - 1; count++)
- {*/
- string iparray;
- try
- {
- iparray = ipmac2[1];
- }
- catch
- {
- iparray = ipmac2[0];
- }
- // }
- //comboBox1.SelectedIndex = 1;
- connection = iparray;// comboBox1.Text;
- // MACaddress = comboBox1.Text;
- connection = connection.Split('-')[0];
- // MACaddress = MACaddress.Substring(MACaddress.LastIndexOf(@"-") + 1);
- connection = connection.Replace(" ", "");
- CC.ConnectTarget(connection);
- CC.RingBuzzer(CCAPI.BuzzerMode.Single);
- CC.Notify(icon, yourmessage);
- //return connection;
- }
- private void comboBox1_SelectedIndexChanged(object sender, EventArgs e)
- {
- connection = comboBox1.Text;
- // MACaddress = comboBox1.Text;
- connection = connection.Split('-')[0];
- // MACaddress = MACaddress.Substring(MACaddress.LastIndexOf(@"-") + 1);
- connection = connection.Replace(" ", "");
- //IPList ipz = new IPList();
- // ConsoleInfo ci = new ConsoleInfo();
- // ci.myip = connection;
- }
- private void label1_Click(object sender, EventArgs e)
- {
- }
- private void btnConnect_Click(object sender, EventArgs e)
- {
- if (comboBox1.SelectedIndex == 0)
- {
- MessageBox.Show("Please Select a Console to connect to!");
- }
- try
- {
- PS3API PS3 = new PS3API();
- PS3.CCAPI.ConnectTarget(connection);
- PS3.CCAPI.RingBuzzer(CCAPI.BuzzerMode.Double);
- PS3.CCAPI.Notify(CCAPI.NotifyIcon.FRIEND, "Connected To: " + consoleip());
- label2.Text = connection;
- CC.CCAPIConnection = true;
- System.Threading.Thread.Sleep(100);
- if (consolecheck.Checked)
- {
- // PS3.CCAPI.ShowConsole();
- }
- else
- {
- //
- }
- }
- catch
- {
- label2.Text = ". . . .";
- CC.CCAPIConnection = false;
- }
- this.Hide();
- }
- private void checkBox1_CheckedChanged(object sender, EventArgs e)
- {
- }
- private void groupConnect_Enter(object sender, EventArgs e)
- {
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement