public static void LaunchModule(XboxConsole Console, uint ConsoleConnection, string ModulePath) { var tmpString = ModulePath.Replace('\\', '~').Split('~'); var directory = ModulePath.Substring(0, (ModulePath.Length - tmpString[tmpString.Length - 1].Length) - 1); string outsts; string command; if (directory.Contains("\\")) { command = string.Format("magicboot title=\"{0}\"" + " directory=\"{1}\"", ModulePath, directory); } else { //We can only launch from the FLASH root. if (string.CompareOrdinal(directory, "FLASH:") == 0) { command = string.Format("magicboot title=\"{0}\"", ModulePath); } else { throw new Exception("XDKUtilities.LaunchModule: You can only launch modules from the FLASH root, not any others."); } } Console.SendTextCommand(ConsoleConnection, command, out outsts); }
public string SendStringCommand(string command) { if (!ConnectTarget()) { return(null); } string response; xbCon.SendTextCommand(connectioncode, command, out response); return(response); }
public string SendTextCommand(string command) { try { string response; console.SendTextCommand(consoleConnection, command, out response); return(response); } catch (Exception ex) { throw new Exception("XboxDevConsole: Command error. Either the connection to the console was lost, or the command doesn't exist.\n"); } }
public static void LaunchModule(XboxConsole Console, uint ConsoleConnection, string ModulePath) { var tmpString = ModulePath.Replace('\\', '~').Split('~'); var directory = ModulePath.Substring(0, (ModulePath.Length - tmpString[tmpString.Length - 1].Length) - 1); string outsts; string command; if (directory.Contains("\\")) command = string.Format("magicboot title=\"{0}\"" + " directory=\"{1}\"", ModulePath, directory); else { //We can only launch from the FLASH root. if (string.CompareOrdinal(directory, "FLASH:") == 0) command = string.Format("magicboot title=\"{0}\"", ModulePath); else throw new Exception("XDKUtilities.LaunchModule: You can only launch modules from the FLASH root, not any others."); } Console.SendTextCommand(ConsoleConnection, command, out outsts); }