Ejemplo n.º 1
0
 public Boolean ConnectTarget()
 {
     if (!IsConnected)
     {
         try
         {
             xboxMgr        = new XboxManager();
             xbCon          = xboxMgr.OpenConsole(DeviceIdent);
             dbgXbox        = xbCon.DebugTarget;
             connectioncode = xbCon.OpenConnection(null);
             IsConnected    = true;
         }
         catch
         {
             xbCon   = null;
             xboxMgr = null;
             dbgXbox = null;
             return(false);
         }
         try
         {
             XboxType = xbCon.ConsoleType.ToString();
         }
         catch
         {
             XboxType = "Can't get";
         }
     }
     return(IsConnected);
 }
Ejemplo n.º 2
0
 public AddNeighborhoodDriveForm(MainForm MainForm, NeighborhoodDrives Drives, XboxManager Manager)
 {
     InitializeComponent();
     mainForm = MainForm;
     drives   = Drives;
     manager  = Manager;
 }
Ejemplo n.º 3
0
        /// <summary>
        /// Connect to default xbox console
        /// </summary>
        private void ConnectXBOX()
        {
            try
            {
                var XboxManager = new XboxManager();
                Xbox = XboxManager.OpenConsole(XboxManager.DefaultConsole);
                Xbox.OpenConnection(null);

                IsConsoleConnected = true;
                ConsoleType        = "XBOX";

                SetStatusConsole(Xbox.Name);
                EnableConsoleActions();

                MenuItemConnectPS3.Enabled = false;

                MenuItemXBOXConnect.Visible    = false;
                MenuItemXBOXDisconnect.Visible = true;

                SetStatus("Successfully connected to console.");
                XtraMessageBox.Show(this, "Connected to console.", "Success", MessageBoxButtons.OK, MessageBoxIcon.Information);
            }
            catch (Exception ex)
            {
                SetStatus("Couldn't connect to console - Error: " + ex.Message, ex);
                XtraMessageBox.Show(this, "Unable to connect to console.\n\nError Message:/n: " + ex.Message, "Error", MessageBoxButtons.OK, MessageBoxIcon.Error);
            }
        }
Ejemplo n.º 4
0
        //[DllImport("XSimWrapperDll.dll", CharSet = CharSet.Ansi)]
        //public static extern uint XSimInitialize(UInt32 dwComponentFrameRate);

        public Program()
        {
            manager    = new XboxManager();
            console    = manager.OpenConsole(manager.DefaultConsole);
            automation = console.XboxAutomation;
            gamepad    = new XBOX_AUTOMATION_GAMEPAD();
            result     = false;
            enableMU   = false;
        }
Ejemplo n.º 5
0
        public MainWindow(string Values)
        {
            values = Values;
            InitializeComponent();
            loadingBlock.Visibility = System.Windows.Visibility.Visible;
            XboxManager xmb = new XboxManager();

            rte          = new RealTimeEditing();
            xdkName.Text = xmb.DefaultConsole;
            Elysium.Manager.Apply(Application.Current, Elysium.Theme.Light, Brushes.BlueViolet, Brushes.Black);
        }
Ejemplo n.º 6
0
 public static string CreateExceptionMessage(Exception EX, XboxManager Manager)
 {
     if (EX == null || Manager == null)
     {
         return("(Error in XDKUtilities.CreateExceptionMessage)");
     }
     if (!(EX is COMException))
     {
         return(EX.Message);
     }
     try { return(Manager.TranslateError(((COMException)EX).ErrorCode)); }
     catch (Exception) { return(EX.Message); }
 }
Ejemplo n.º 7
0
        public void Disconnect()
        {
            if (!IsConnected)
            {
                return;
            }

            if (xbCon != null)
            {
                xbCon.CloseConnection(connectioncode);
            }

            xboxMgr     = null;
            dbgXbox     = null;
            xbCon       = null;
            IsConnected = false;
        }
Ejemplo n.º 8
0
 public Boolean Connection()
 {
     if (!activeConnection)
     {
         xboxMgr = new XDevkit.XboxManager();
         xbCon   = xboxMgr.OpenConsole(xboxMgr.DefaultConsole);
         try
         {
             xbConnection = xbCon.OpenConnection(null);
         }
         catch (Exception)
         {
         }
         string text;
         string text2;
         if (xbCon.DebugTarget.IsDebuggerConnected(out text, out text2))
         {
             activeConnection = true;
         }
         xbCon.DebugTarget.ConnectAsDebugger("XboxLib", XboxDebugConnectFlags.Force);
         if (!xbCon.DebugTarget.IsDebuggerConnected(out text, out text2))
         {
         }
         activeConnection = true;
     }
     else
     {
         string text;
         string text2;
         if (xbCon.DebugTarget.IsDebuggerConnected(out text, out text2))
         {
         }
         activeConnection = false;
     }
     return(activeConnection);
 }
Ejemplo n.º 9
0
 public static string CreateExceptionMessage(Exception EX, XboxManager Manager)
 {
     if (EX == null || Manager == null) return "(Error in XDKUtilities.CreateExceptionMessage)";
     if (!(EX is COMException)) return EX.Message;
     try { return Manager.TranslateError(((COMException)EX).ErrorCode); }
     catch (Exception) { return EX.Message; }
 }