Esempio n. 1
0
        static PS3API ConnectAndAttach(SelectAPI api)
        {
            PS3API PS3 = new PS3API(api);

            try {
                if (!PS3.ConnectTarget())
                {
                    PrintWithColor("[ERROR] Could not connect and attach.", ConsoleColor.Red);
                    return(null);
                }
                if (!PS3.AttachProcess())
                {
                    PrintWithColor("[ERROR] Could not attach to process.", ConsoleColor.Red);
                    return(null);
                }
                string message = string.Format("[INFO] Connected and attached to {0}.", PS3.GetConsoleName());
                PrintWithColor(message, ConsoleColor.Blue);

                return(PS3);
            }
            catch {
                PrintWithColor("[ERROR] Could not connect or attach. Check internet connection.", ConsoleColor.Red);

                return(null);
            }
        }