Пример #1
0
 public SigninForm(MainForm MainForm, IEnumerable <ConsoleProfile> LocalProfiles, ConsoleProfilesManager Manager)
 {
     InitializeComponent();
     mainForm               = MainForm;
     profileManager         = Manager;
     SigninTileControl.Text = "Profiles on " + profileManager.Console.Name;
     SigninTileControl.BeginUpdate();
     foreach (var profile in LocalProfiles)
     {
         var xai = XDKUtilities.XamProfileFindAccount((XboxConsole)profile.Console, profile.OfflineXuid.value);
         if (!profile.IsLiveProfile)
         {
             continue;
         }
         var ti = new TileItem {
             Tag = new TileTag {
                 Profile = profile, AccountInfo = xai
             }, Name = profile.Gamertag + "Tile", BackgroundImage = profile.Tier == SubscriptionTier.Silver ? Resources.Signin_Slot_Silver : Resources.Signin_Slot_Gold, BackgroundImageScaleMode = TileItemImageScaleMode.Stretch, Text = string.Format("<Color=\"black\"><b>{0}</b></Color>", profile.Gamertag)
         };
         ti.RightItemClick += ProfileTile_RightItemClick;
         ti.ItemClick      += ProfileTile_ItemClick;
         ti.Elements.Add(new TileItemElement {
             TextLocation = new Point(0, 15), TextAlignment = TileItemContentAlignment.Manual, Text = string.Format("<Color=\"gray\"><b>{0}</b></Color>", profile.Tier)
         });
         ti.Elements.Add(new TileItemElement {
             TextLocation = new Point(0, 30), TextAlignment = TileItemContentAlignment.Manual, Text = string.Format("<Color=\"gray\"><b>{0}</b></Color>", XtraFunctions.ValueToHex(profile.OfflineXuid.value).Remove(0, 2).PadLeft(16, '0'))
         });
         ti.Elements.Add(new TileItemElement {
             TextLocation = new Point(0, 45), TextAlignment = TileItemContentAlignment.Manual, Text = string.Format("<Color=\"gray\"><b>{0}</b></Color>", XtraFunctions.ValueToHex(profile.OnlineXuid.value).Remove(0, 2).PadLeft(16, '0'))
         });
         SigninTileGroup.Items.Add(ti);
     }
     SigninTileControl.EndUpdate();
 }
        /// <summary>
        /// Gets or creates a profile and makes sure it is set to default
        /// </summary>
        /// <param name="manager">manager for the console</param>
        /// <param name="profileNumber">index of the profile to retrieve. a new profile is created if this index is too big. a max of one profile will be created</param>
        /// <returns></returns>
        private ConsoleProfile SafeGetDefaultProfile(ConsoleProfilesManager manager, int profileNumber)
        {
            ConsoleProfile profile = null;

            try
            {
                if (manager.EnumerateConsoleProfiles().Count() > profileNumber)
                {
                    profile = manager.EnumerateConsoleProfiles().ElementAt(profileNumber);
                }
                else
                {
                    profile = manager.CreateConsoleProfile(true);
                }

                manager.SetDefaultProfile(profile);
                profile.SignIn(UserIndex.Zero);
            }
            catch (Exception ex)
            {
                MessageBox.Show("There was a problem getting a profile from " + manager.Console.Name + "\n\nException: " + ex.Message, "Certificaton Assistance Tool");
            }

            return(profile);
        }
Пример #3
0
        /// <summary>
        /// Get alphabetically first existing profile or create a new one if there are none
        /// </summary>
        /// <param name="device">The xbox to get or create a profile on</param>
        /// <param name="wasCreated">Receives a value indicating a profile was created</param>
        /// <returns>Returns the found or created profile</returns>
        private ConsoleProfile GetFirstProfile(IXboxDevice device, out bool wasCreated)
        {
            ConsoleProfile firstProfile = null;
            wasCreated = false;

            try
            {
                ConsoleProfilesManager profilesManager = device.XboxConsole.CreateConsoleProfilesManager();
                IEnumerable<ConsoleProfile> profiles = profilesManager.EnumerateConsoleProfiles();

                if (profiles.Any())
                {
                    profilesManager.SignOutAllUsers();
                    firstProfile = profiles.First();
                }
                else
                {
                    firstProfile = profilesManager.CreateConsoleProfile(true);
                    wasCreated = true;
                }
            }
            catch (Exception e)
            {
                MessageBox.Show(
                    "There was an error getting a profile from console " + this.xboxDevice.Name + "\n\n" + e.Message,
                    "Certification Assistance Tool");
                throw;
            }

            return firstProfile;
        }
Пример #4
0
        /// <summary>
        /// QueryProfileList - get all profiles on the Xbox
        /// </summary>
        /// <returns>list of profiles found on the Xbox</returns>
        private ObservableCollection <ConsoleProfileViewItem> QueryProfileList()
        {
            // create an empty list
            this.AllProfiles = new ObservableCollection <ConsoleProfileViewItem>();

            // get a profile manager for the console
            try
            {
                this.profilesManager = this.xboxDevice.XboxConsole.CreateConsoleProfilesManager();
            }
            catch
            {
                // If something goes wrong, return the empty list
                return(this.AllProfiles);
            }

            // Get profiles from the selected console
            IEnumerable <ConsoleProfile> profiles = this.profilesManager.EnumerateConsoleProfiles();

            if (!profiles.Any())
            {
                // If there are no profiles, return the empty list
                return(this.AllProfiles);
            }

            // Store the profiles we found
            foreach (ConsoleProfile profile in profiles)
            {
                this.AllProfiles.Add(new ConsoleProfileViewItem(profile));
            }

            this.NotifyPropertyChanged("AllProfiles");

            return(this.AllProfiles);
        }
Пример #5
0
        /// <summary>
        /// Stop - called when the module is done or aborted
        /// </summary>
        public void Stop()
        {
            if (!this.moduleContext.IsModal)
            {
                return;
            }

            Mouse.OverrideCursor = Cursors.Wait;

            try
            {
                // sign-out users
                ConsoleProfilesManager profilesManager = this.xboxDevice.XboxConsole.CreateConsoleProfilesManager();
                profilesManager.SignOutAllUsers();

                // remove created profiles
                if (this.profile1IsNew)
                {
                    profilesManager.DeleteConsoleProfile(this.profile1);
                }

                if (this.profile2IsNew)
                {
                    profilesManager.DeleteConsoleProfile(this.profile2);
                }

                // stop game
                this.xboxDevice.LaunchDevDashboard();

                // restore multiplayer privilege to pre-existing profiles
                if (!this.profile1IsNew)
                {
                    if (MessageBoxResult.Yes == MessageBox.Show(
                        "Re-enable multiplayer capability for profile " + this.profile1.Gamertag + "?",
                        "Certification Assistance Tool",
                        MessageBoxButton.YesNo))
                    {
                        this.xboxDevice.RunIXBoxAutomationScript(@"Scripts\Enable_Xbox_Live_Game_Play_Privileges.xboxautomation");
                    }
                }

                this.moduleContext.Log("*************************************************************\r\n");
                this.moduleContext.Log("RESULT: " + this.passedOrFailed + "\r\n");
                this.moduleContext.Log("*************************************************************\r\n");
            }
            catch (Exception)
            {
            }

            Mouse.OverrideCursor = null;
        }
        public bool Setup1()
        {
            bool aborted        = false;
            bool friendingError = false;

            Mouse.OverrideCursor = Cursors.Wait;

            // assign xboxes
            foreach (IXboxDevice dev in this.moduleContext.SelectedDevices)
            {
                if (dev.IsDefault)
                {
                    xboxDevice1 = dev;
                }
            }

            foreach (IXboxDevice dev in this.moduleContext.SelectedDevices)
            {
                if (xboxDevice1 == null)
                {
                    xboxDevice1 = dev;
                    NotifyPropertyChanged("Console1Name");
                }
                else if (xboxDevice2 == null && xboxDevice1 != dev)
                {
                    xboxDevice2 = dev;
                    NotifyPropertyChanged("Console2Name");
                }
                else if (xboxDevice3 == null && xboxDevice1 != dev)
                {
                    xboxDevice3 = dev;
                    NotifyPropertyChanged("Console3Name");
                }
            }

            // get a profile manager for each console
            ReadyMessage  = "Getting three profiles...";
            SetupProgress = 5;
            UpdateSetup();

            try
            {
                this.profileManager1 = xboxDevice1.XboxConsole.CreateConsoleProfilesManager();
                this.profileManager2 = xboxDevice2.XboxConsole.CreateConsoleProfilesManager();
                this.profileManager3 = xboxDevice3.XboxConsole.CreateConsoleProfilesManager();
            }
            catch
            {
            }

            // sign out all profiles
            profileManager1.SignOutAllUsers();
            profileManager2.SignOutAllUsers();
            profileManager3.SignOutAllUsers();

            // select or create and sign in a default profile on each console
            profileA = SafeGetDefaultProfile(profileManager1, 0);
            profileB = SafeGetDefaultProfile(profileManager2, 0);
            profileC = SafeGetDefaultProfile(profileManager3, 0);

            // make sure profiles are not the same one
            if (profileB.Gamertag == profileA.Gamertag)
            {
                profileB = SafeGetDefaultProfile(profileManager2, 1);
            }

            if (profileC.Gamertag == profileB.Gamertag || profileC.Gamertag == profileA.Gamertag)
            {
                profileC = SafeGetDefaultProfile(profileManager3, 1);
            }

            if (profileC.Gamertag == profileB.Gamertag || profileC.Gamertag == profileA.Gamertag)
            {
                profileC = SafeGetDefaultProfile(profileManager3, 2);
            }

            // set Play Through Speakers on all three consoles
            ReadyMessage   = "Setting voice output to speakers only...";
            SetupProgress += 15;
            UpdateSetup();

            Thread th1 = new Thread(new ParameterizedThreadStart(delegate
            {
                xboxDevice1.RunCatScript("Voice_Output_Set_Speakers");
                SetupProgress += 10;
            }));

            th1.Start();
            Thread th2 = new Thread(new ParameterizedThreadStart(delegate
            {
                xboxDevice2.RunCatScript("Voice_Output_Set_Speakers");
                SetupProgress += 10;
            }));

            th2.Start();
            Thread th3 = new Thread(new ParameterizedThreadStart(delegate
            {
                xboxDevice3.RunCatScript("Voice_Output_Set_Speakers");
                SetupProgress += 10;
            }));

            th3.Start();

            th1.Join();
            th2.Join();
            th3.Join();

            ReadyMessage = "Friending profiles...";
            UpdateSetup();

            try
            {
                // Friend profiles A and B
                if (!AreFriended(profileA, profileB))
                {
                    profileB.Friends.SendFriendRequest(profileA);
                    profileA.Friends.AcceptFriendRequest(profileB);
                }
                ProfileAFriended = "Friended";
                ProfileBFriended = "Friended";
                SetupProgress   += 10;
            }
            catch (Exception ex)
            {
                friendingError = true;
                moduleContext.Log("There was an exception friending profile " + ProfileAName + " with " + ProfileBName + ". Exception: " + ex.Message);
            }

            // enable communications for profiles B and c
            ReadyMessage = "Setting Communication Options...";
            UpdateSetup();
            th2 = new Thread(new ParameterizedThreadStart(delegate
            {
                xboxDevice2.RunCatScript("Communications_Set_Everyone");
                ProfileBCommunications = "Everyone";
                SetupProgress         += 10;
            }));
            th2.Start();
            th3 = new Thread(new ParameterizedThreadStart(delegate
            {
                xboxDevice3.RunCatScript("Communications_Set_Everyone");
                ProfileCCommunications = "Everyone";
                SetupProgress         += 10;
            }));
            th3.Start();

            // if friending failed, unblock profile A and friend again. then block profile A
            if (friendingError)
            {
                th1 = new Thread(new ParameterizedThreadStart(delegate
                {
                    xboxDevice1.RunCatScript("Communications_Set_Everyone");
                }));
                th1.Start();
                th2.Join();
                th1.Join();
                try
                {
                    // Friend profiles A and B
                    if (!AreFriended(profileA, profileB))
                    {
                        profileB.Friends.SendFriendRequest(profileB);
                        profileA.Friends.AcceptFriendRequest(profileA);
                    }
                    ProfileAFriended = "Friended";
                    ProfileBFriended = "Friended";
                    SetupProgress   += 10;
                }
                catch (Exception ex)
                {
                    moduleContext.Log("There was an exception friending profile " + ProfileAName + " with " + ProfileBName + ". Exception: " + ex.Message);
                    MessageBox.Show("Unable to friend profiles " + ProfileAName + " and " + ProfileBName + ". Aborting test", "Certificaton Assistance Tool");
                    ProfileAFriended = "Error Friending";
                    ProfileBFriended = "Error Friending";
                    ReadyMessage     = "Aborted";
                    aborted          = true;
                }
            }

            UpdateSetup();
            if (aborted)
            {
                return(false);
            }

            // block profile A
            th1 = new Thread(new ParameterizedThreadStart(delegate
            {
                xboxDevice1.RunCatScript("Communications_Set_Blocked");
                ProfileACommunications = "Blocked";
                SetupProgress         += 10;
            }));
            th1.Start();
            th2.Join();
            th3.Join();
            th1.Join();

            // Install and Launch the game on all three consoles
            ReadyMessage = "Installing and launching " + this.moduleContext.XboxTitle.Name + "...";
            UpdateSetup();
            if (xboxDevice1.IsTitleInstalled)
            {
                ProfileALaunched = "Launching...";
            }
            else
            {
                ProfileALaunched = "Installing...";
            }
            if (xboxDevice2.IsTitleInstalled)
            {
                ProfileBLaunched = "Launching...";
            }
            else
            {
                ProfileBLaunched = "Installing...";
            }
            if (xboxDevice3.IsTitleInstalled)
            {
                ProfileCLaunched = "Launching...";
            }
            else
            {
                ProfileCLaunched = "Installing...";
            }
            UpdateSetup();

            th1 = new Thread(new ParameterizedThreadStart(delegate
            {
                if (!xboxDevice1.IsTitleInstalled)
                {
                    xboxDevice1.InstallTitle(xboxDevice1.PreferredInstallDrive());
                }

                ProfileALaunched = "Launching...";
                xboxDevice1.LaunchTitle();
                ProfileALaunched = "Launched";
                SetupProgress   += 10;
            }));
            th1.Start();
            th2 = new Thread(new ParameterizedThreadStart(delegate
            {
                if (!xboxDevice2.IsTitleInstalled)
                {
                    xboxDevice2.InstallTitle(xboxDevice2.PreferredInstallDrive());
                }

                ProfileBLaunched = "Launching...";
                xboxDevice2.LaunchTitle();
                ProfileBLaunched = "Launched";
                SetupProgress   += 10;
            }));
            th2.Start();
            th3 = new Thread(new ParameterizedThreadStart(delegate
            {
                if (!xboxDevice3.IsTitleInstalled)
                {
                    xboxDevice3.InstallTitle(xboxDevice3.PreferredInstallDrive());
                }

                ProfileCLaunched = "Launching...";
                xboxDevice3.LaunchTitle();
                ProfileCLaunched = "Launched";
                SetupProgress   += 10;
            }));
            th3.Start();
            th1.Join();
            th2.Join();
            th3.Join();
            ReadyMessage = "Ready";
            Setup1Done   = true;
            LogSetup();
            UpdateSetup();
            Mouse.OverrideCursor = null;
            return(true);
        }
Пример #7
0
        /// <summary>
        /// install title to the consoles
        /// </summary>
        private void Setup()
        {
            System.Windows.Input.Mouse.OverrideCursor = System.Windows.Input.Cursors.Wait;

            ConsoleProfilesManager       profilesManager = this.xboxDevice.XboxConsole.CreateConsoleProfilesManager();
            IEnumerable <ConsoleProfile> profiles        = profilesManager.EnumerateConsoleProfiles();

            if (profiles.Count() == 0)
            {
                ConsoleProfile profile = profilesManager.CreateConsoleProfile(true);
                profile.SignIn(UserIndex.Zero);
            }
            else
            {
                profilesManager.SignOutAllUsers();
                ConsoleProfile firstProfile = profiles.First();
                firstProfile.SignIn(UserIndex.Zero);
            }

            System.Windows.Input.Mouse.OverrideCursor = null;

            if (this.xboxDevice.IsTitleInstalled)
            {
                MessageBoxResult messageBoxResult = MessageBox.Show("Launch " + this.moduleContext.XboxTitle.Name + "?", "Certification Assistance Tool", MessageBoxButton.YesNo);
                if (messageBoxResult == MessageBoxResult.Yes)
                {
                    this.xboxDevice.LaunchTitle();
                }
            }
            else
            {
                if (this.xboxDevice.CanInstallTitle)
                {
                    MessageBoxResult messageBoxResult = MessageBox.Show("Install and launch " + this.moduleContext.XboxTitle.Name + "?", "Certification Assistance Tool", MessageBoxButton.YesNo);
                    if (messageBoxResult == MessageBoxResult.Yes)
                    {
                        this.xboxDevice.InstallTitle(this.GetBestAvailableDrive(this.xboxDevice), this.moduleContext.OpenProgressBarWindow("Installing " + this.moduleContext.XboxTitle.Name + "..."));
                        this.xboxDevice.LaunchTitle();
                    }
                }
            }

            this.xboxDevice.XboxConsole.XboxAutomation.BindController(0, 10);
            this.xboxDevice.XboxConsole.XboxAutomation.BindController(1, 10);
            this.xboxDevice.XboxConsole.XboxAutomation.BindController(2, 10);
            this.xboxDevice.XboxConsole.XboxAutomation.BindController(3, 10);
            this.controllersBound = true;

            this.xboxDevice.XboxConsole.XboxAutomation.ClearGamepadQueue(0);
            this.xboxDevice.XboxConsole.XboxAutomation.ClearGamepadQueue(1);
            this.xboxDevice.XboxConsole.XboxAutomation.ClearGamepadQueue(2);
            this.xboxDevice.XboxConsole.XboxAutomation.ClearGamepadQueue(3);

            this.xboxDevice.XboxConsole.XboxAutomation.ConnectController(0);
            this.xboxDevice.XboxConsole.XboxAutomation.ConnectController(1);
            this.xboxDevice.XboxConsole.XboxAutomation.ConnectController(2);
            this.xboxDevice.XboxConsole.XboxAutomation.ConnectController(3);

            this.Quadrant1Connected  = true;
            this.Quadrant2Connected  = true;
            this.Quadrant3Connected  = true;
            this.Quadrant4Connected  = true;
            this.Quadrant1Controlled = true;

            this.VirtualControllerVisibility = Visibility.Visible;
        }
        public void setup()
        {
            // get a profile manager for each console
            try
            {
                this.profileManager1 = xboxDevice1.XboxConsole.CreateConsoleProfilesManager();
                this.profileManager2 = xboxDevice2.XboxConsole.CreateConsoleProfilesManager();
                this.profileManager3 = xboxDevice3.XboxConsole.CreateConsoleProfilesManager();
            }
            catch
            {
            }

            // sign out all profiles
            profileManager1.SignOutAllUsers();
            profileManager2.SignOutAllUsers();
            profileManager3.SignOutAllUsers();

            // select and sign in a profile on each console
            if (profileManager1.EnumerateConsoleProfiles().Any())
            {
                profileA = profileManager1.GetDefaultProfile();
                if (profileA == null)
                {
                    profileA = profileManager1.EnumerateConsoleProfiles().First();
                    profileManager1.SetDefaultProfile(profileA);
                }
            }
            else
            {
                profileA = profileManager1.CreateConsoleProfile(true);
            }
            profileA.SignIn(UserIndex.Zero);

            if (profileManager2.EnumerateConsoleProfiles().Any())
            {
                profileB = profileManager2.GetDefaultProfile();
                if (profileB == null)
                {
                    profileB = profileManager2.EnumerateConsoleProfiles().First();
                    profileManager2.SetDefaultProfile(profileB);
                }
            }
            else
            {
                profileB = profileManager2.CreateConsoleProfile(true);
            }
            profileB.SignIn(UserIndex.Zero);

            if (profileManager3.EnumerateConsoleProfiles().Any())
            {
                profileC = profileManager3.GetDefaultProfile();
                if (profileC == null)
                {
                    profileC = profileManager3.EnumerateConsoleProfiles().First();
                    profileManager3.SetDefaultProfile(profileC);
                }
            }
            else
            {
                profileC = profileManager3.CreateConsoleProfile(true);
            }
            profileC.SignIn(UserIndex.Zero);

            // set Play Through Speakers on all three consoles
            xboxDevice1.RunCatScript("Voice_Output_Set_Speakers");
            xboxDevice2.RunCatScript("Voice_Output_Set_Speakers");
            xboxDevice3.RunCatScript("Voice_Output_Set_Speakers");

            // Set privacy settings to voice/text/video to Friends Only profile A
            xboxDevice1.RunCatScript("Communications_Set_Friends_Only");

            // Set privace settings to voice/text/video enabled for Everyone on profile B and C
            xboxDevice2.RunCatScript("Communications_Set_Everyone");
            xboxDevice3.RunCatScript("Communications_Set_Everyone");

            // Friend profiles A and B
            profileA.Friends.SendFriendRequest(profileB);
            profileB.Friends.AcceptFriendRequest(profileA);

            // Launch the game on all three consoles
            xboxDevice1.LaunchTitle();
            xboxDevice2.LaunchTitle();
            xboxDevice3.LaunchTitle();
        }
        /// <summary>
        /// Perform setup
        /// </summary>
        private void Setup()
        {
            Mouse.OverrideCursor = Cursors.Wait;

            // get a profile from each console
            this.ReadyMessage = "Getting profiles...";
            this.UpdateSetup();

            try
            {
                this.profileManager1 = this.xboxDevice1.XboxConsole.CreateConsoleProfilesManager();
                this.profileManager2 = this.xboxDevice2.XboxConsole.CreateConsoleProfilesManager();
            }
            catch
            {
            }

            // sign out all profiles
            this.profileManager1.SignOutAllUsers();
            this.profileManager2.SignOutAllUsers();

            // select or create and sign in a profile on each console
            this.profileA = this.GetAProfile(this.profileManager1, 0);
            this.profileB = this.GetAProfile(this.profileManager2, 0);
            this.profileC = this.GetAProfile(this.profileManager2, 1);

            // make sure profiles are not the same one
            if (this.profileB.Gamertag == this.profileA.Gamertag)
            {
                this.profileB = this.GetAProfile(this.profileManager2, 2);
            }
            else if (this.profileC.Gamertag == this.profileA.Gamertag)
            {
                this.profileC = this.GetAProfile(this.profileManager2, 2);
            }

            // sign in profiles A and B. And C, just long enough to accept friend request
            this.profileA.SignIn(UserIndex.Zero);
            this.profileB.SignIn(UserIndex.Zero);
            this.profileC.SignIn(UserIndex.One);

            this.ReadyMessage = "Friending profiles...";
            this.UpdateSetup();

            try
            {
                // Friend profiles A and B
                if (!this.AreFriended(this.profileA, this.profileB))
                {
                    this.profileA.Friends.SendFriendRequest(this.profileB);
                    this.profileB.Friends.AcceptFriendRequest(this.profileA);
                }

                // Friend profiles A and C
                if (!this.AreFriended(this.profileA, this.profileC))
                {
                    this.profileA.Friends.SendFriendRequest(this.profileC);
                    this.profileC.Friends.AcceptFriendRequest(this.profileA);
                }
            }
            catch (Exception ex)
            {
                this.moduleContext.Log("There was an exception friending profiles. Exception: " + ex.Message);
            }

            // verify friending worked
            try
            {
                // Friend profiles A and B
                if (!this.AreFriended(this.profileA, this.profileB))
                {
                    this.profileA.Friends.SendFriendRequest(this.profileB);
                    this.profileB.Friends.AcceptFriendRequest(this.profileA);
                }

                // Friend profiles A and C
                if (!this.AreFriended(this.profileA, this.profileC))
                {
                    this.profileA.Friends.SendFriendRequest(this.profileC);
                    this.profileC.Friends.AcceptFriendRequest(this.profileA);
                }

                // sign out profile C
                this.profileC.SignOut();
            }
            catch (Exception ex)
            {
                this.moduleContext.Log("There was an exception friending profiles. Exception: " + ex.Message);
            }

            // Install and Launch the game on both consoles (unless game is emulated)
            this.ReadyMessage = "Installing and launching " + this.moduleContext.XboxTitle.Name + "...";
            this.UpdateSetup();
            if (this.IsTitleInstalledOnRightDrive(this.xboxDevice1))
            {
                this.ProfileAInstalled = this.moduleContext.XboxTitle.Name + " Installed";
                this.ProfileALaunched  = this.moduleContext.XboxTitle.Name + " Launching...";
            }
            else
            {
                this.ProfileAInstalled = this.moduleContext.XboxTitle.Name + " Installing...";
            }

            if (this.IsTitleInstalledOnRightDrive(this.xboxDevice2))
            {
                this.ProfileBInstalled = this.moduleContext.XboxTitle.Name + " Installed";
                this.ProfileCInstalled = this.moduleContext.XboxTitle.Name + " Installed";
                this.ProfileBLaunched  = this.moduleContext.XboxTitle.Name + " Launching...";
            }
            else
            {
                this.ProfileBInstalled = this.moduleContext.XboxTitle.Name + " Installing...";
            }

            this.UpdateSetup();

            IXboxDevice deviceWithProgressBar;
            IXboxDevice deviceWithoutProgressBar;

            if (this.IsTitleInstalledOnRightDrive(this.xboxDevice1) && !this.IsTitleInstalledOnRightDrive(this.xboxDevice2))
            {
                deviceWithProgressBar    = this.xboxDevice2;
                deviceWithoutProgressBar = this.xboxDevice1;
            }
            else
            {
                deviceWithProgressBar    = this.xboxDevice1;
                deviceWithoutProgressBar = this.xboxDevice2;
            }

            Thread th1 = new Thread(new ParameterizedThreadStart(delegate
            {
                if (!this.IsTitleInstalledOnRightDrive(deviceWithoutProgressBar))
                {
                    deviceWithoutProgressBar.LaunchDevDashboard();
                    if (deviceWithoutProgressBar == this.xboxDevice1)
                    {
                        deviceWithoutProgressBar.InstallTitle(this.installDrive1);
                    }
                    else
                    {
                        deviceWithoutProgressBar.InstallTitle(this.installDrive2);
                    }
                }

                if (deviceWithoutProgressBar == this.xboxDevice1)
                {
                    this.ProfileAInstalled = this.moduleContext.XboxTitle.Name + " Installed";
                    this.ProfileALaunched  = this.moduleContext.XboxTitle.Name + " Launching...";
                    deviceWithoutProgressBar.LaunchTitle(this.installDrive1);
                    this.ProfileALaunched = this.moduleContext.XboxTitle.Name + " Launched";
                }
                else
                {
                    this.ProfileBInstalled = this.moduleContext.XboxTitle.Name + " Installed";
                    this.ProfileBLaunched  = this.moduleContext.XboxTitle.Name + " Launching...";
                    deviceWithoutProgressBar.LaunchTitle(this.installDrive2);
                    this.ProfileBLaunched = this.moduleContext.XboxTitle.Name + " Launched";
                }
            }));

            th1.Start();
            if (!this.IsTitleInstalledOnRightDrive(deviceWithProgressBar))
            {
                deviceWithProgressBar.LaunchDevDashboard();
                if (deviceWithProgressBar == this.xboxDevice1)
                {
                    deviceWithProgressBar.InstallTitle(this.installDrive1, this.moduleContext.OpenProgressBarWindow("Installing " + this.moduleContext.XboxTitle.Name + "..."));
                    this.ProfileAInstalled = this.moduleContext.XboxTitle.Name + " Installed";
                }
                else
                {
                    deviceWithProgressBar.InstallTitle(this.installDrive2, this.moduleContext.OpenProgressBarWindow("Installing " + this.moduleContext.XboxTitle.Name + "..."));
                    this.ProfileBInstalled = this.moduleContext.XboxTitle.Name + " Installed";
                }
            }

            if (this.moduleContext.XboxTitle.GameInstallType == "Disc Emulation")
            {
                this.ProfileBLaunched = "This is a disc emulation title. Please walk over to console " + this.xboxDevice2.Name + " and start game emulation";
            }
            else
            {
                if (deviceWithProgressBar == this.xboxDevice2)
                {
                    deviceWithProgressBar.LaunchTitle(this.installDrive2);
                    this.ProfileBLaunched = this.moduleContext.XboxTitle.Name + " Launched";
                }
                else
                {
                    deviceWithProgressBar.LaunchTitle(this.installDrive1);
                    this.ProfileALaunched = this.moduleContext.XboxTitle.Name + " Launched";
                }
            }

            th1.Join();

            this.ReadyMessage = "Ready";
            this.UpdateSetup();
            this.moduleContext.Log("Setup test on " + this.xboxDevice1.Name + " with profile " + this.ProfileAName);
            this.moduleContext.Log("          and " + this.xboxDevice2.Name + " with profiles " + this.ProfileBName + " and " + this.ProfileCName);

            Mouse.OverrideCursor = null;
        }