public void initialize() { string str; string str2; if (!this.activeConnection) { this.xboxMgr = (XDevkit.XboxManager) Activator.CreateInstance(Type.GetTypeFromCLSID(new Guid("A5EB45D8-F3B6-49B9-984A-0D313AB60342"))); this.xbCon = this.xboxMgr.OpenConsole(this.xboxMgr.DefaultConsole); try { this.xbConnection = this.xbCon.OpenConnection(null); } catch (Exception) { return; } if (this.xbCon.DebugTarget.IsDebuggerConnected(out str, out str2)) { this.activeConnection = true; } else { this.xbCon.DebugTarget.ConnectAsDebugger("XRPC", XDevkit.XboxDebugConnectFlags.Force); if (this.xbCon.DebugTarget.IsDebuggerConnected(out str, out str2)) { this.activeConnection = true; } } } else if (!this.xbCon.DebugTarget.IsDebuggerConnected(out str, out str2)) { this.activeConnection = false; this.Connect(); } }
public static bool Connect(string XboxName = null) { if (!Xbox_Console.isConnected()) { Xbox_Manager = (XDevkit.XboxManager)Activator.CreateInstance(Type.GetTypeFromCLSID(new Guid("A5EB45D8-F3B6-49B9-984A-0D313AB60342"))); if (string.IsNullOrEmpty(XboxName)) { Xbox_Console = Xbox_Manager.OpenConsole(Xbox_Manager.DefaultConsole); } else { Xbox_Console = Xbox_Manager.OpenConsole(XboxName); } try { Connection_Code = Xbox_Console.OpenConnection(null); if (!Xbox_Console.isConnected()) { Xbox_Console.DebugTarget.ConnectAsDebugger("XDevkitExt", XDevkit.XboxDebugConnectFlags.Force); } return(Xbox_Console.isConnected()); } catch { return(false); } } return(true); }
public static bool Connect(string XboxName = null) { if (!Xbox_Console.isConnected()) { Xbox_Manager = (XDevkit.XboxManager) Activator.CreateInstance(Type.GetTypeFromCLSID(new Guid("A5EB45D8-F3B6-49B9-984A-0D313AB60342"))); if (string.IsNullOrEmpty(XboxName)) { Xbox_Console = Xbox_Manager.OpenConsole(Xbox_Manager.DefaultConsole); } else { Xbox_Console = Xbox_Manager.OpenConsole(XboxName); } try { Connection_Code = Xbox_Console.OpenConnection(null); if (!Xbox_Console.isConnected()) { Xbox_Console.DebugTarget.ConnectAsDebugger("XDevkitExt", XDevkit.XboxDebugConnectFlags.Force); } return Xbox_Console.isConnected(); } catch { return false; } } return true; }
public void initialize() { string str; string str2; if (!this.activeConnection) { this.xboxMgr = (XDevkit.XboxManager)Activator.CreateInstance(Type.GetTypeFromCLSID(new Guid("A5EB45D8-F3B6-49B9-984A-0D313AB60342"))); this.xbCon = this.xboxMgr.OpenConsole(this.xboxMgr.DefaultConsole); try { this.xbConnection = this.xbCon.OpenConnection(null); } catch (Exception) { return; } if (this.xbCon.DebugTarget.IsDebuggerConnected(out str, out str2)) { this.activeConnection = true; } else { this.xbCon.DebugTarget.ConnectAsDebugger("XRPC", XDevkit.XboxDebugConnectFlags.Force); if (this.xbCon.DebugTarget.IsDebuggerConnected(out str, out str2)) { this.activeConnection = true; } } } else if (!this.xbCon.DebugTarget.IsDebuggerConnected(out str, out str2)) { this.activeConnection = false; this.Connect(); } }