/// <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; }
private void DeleteProfileItem_ItemClick(object sender, ItemClickEventArgs e) { var tile = (TileItem)SigninTileGroup.Tag; var tag = (TileTag)tile.Tag; try { if (XtraMessageBox.Show(string.Format("Are you sure you want to delete {0} AND all associated content?", tag.Profile.Gamertag), string.Format("Delete {0}?", tag.Profile.Gamertag), MessageBoxButtons.YesNo, MessageBoxIcon.Question) != DialogResult.Yes) { return; } profileManager.DeleteConsoleProfile(tag.Profile); SigninTileGroup.Items.Remove(tile); } catch (Exception ex) { XtraMessageBox.Show(string.Format("Failed to delete {0}.{1}{2}", tag.Profile.Gamertag, Environment.NewLine, ex.Message), "DevTool Message", MessageBoxButtons.OK, MessageBoxIcon.Error); } }