示例#1
0
        Boolean Connection(SelectAPI API = SelectAPI.TargetManager)
        {
            PS3.ChangeAPI(API);
            bool state = false;

            switch (API)
            {
            case SelectAPI.ControlConsole:
                state = PS3.ConnectTarget();
                if (state)
                {
                    PS3.CCAPI.GetProcessList(out PID);
                    PS3.CCAPI.AttachProcess(PID[0]);
                    state = PS3.ConnectionStatus();
                }
                else
                {
                    state = false;
                }
                break;

            case SelectAPI.TargetManager:
                state = PS3.ConnectTarget();
                if (state)
                {
                    state = PS3.AttachProcess();
                }
                else
                {
                    state = false;
                }
                break;

            case SelectAPI.XboxNeighborhood:
                state = PS3.ConnectTarget();
                break;

            case SelectAPI.PCAPI:
                state = PS3.ConnectTarget();
                break;

            default:
                PS3.ChangeAPI(SelectAPI.TargetManager);
                state = PS3.ConnectTarget();
                if (state)
                {
                    state = PS3.AttachProcess();
                }
                else
                {
                    state = false;
                }
                break;
            }
            IsConnected = state;
            return(state);
        }
示例#2
0
 private void Connect_Click(object sender, EventArgs e)
 {
     PS3.ChangeAPI(tmapi.Checked ? SelectAPI.TargetManager : SelectAPI.ControlConsole);
     try
     {
         bool state = PS3.ConnectTarget();
         label4.Text      = state ? "Connected" : "Not Connected";
         label4.ForeColor = state ? Color.DodgerBlue : Color.Red;
         if (state)
         {
             PS3.CCAPI.Notify(CCAPI.NotifyIcon.FRIEND, "Fallout 3 Tool - Cain532 + GamePwnzer");
         }
         state             = PS3.AttachProcess();
         label2.Text       = state ? "Attached" : "Not Attached";
         label2.ForeColor  = state ? Color.DodgerBlue : Color.Red;
         Connect.ForeColor = state ? Color.DodgerBlue : Color.Red;
         if (state)
         {
             PS3.CCAPI.Notify(CCAPI.NotifyIcon.GRAB, "Fallout 3 - Attached");
         }
     }
     catch (Exception)
     {
         MessageBox.Show("Something Went Wrong! Notify your Vault Technician", "Error", MessageBoxButtons.OK, MessageBoxIcon.Error);
     }
 }