private static void ProcessAppArgs(Hashtable args) { if (args["device"] is string str && !_phase2InitComplete) { char[] chArray = new char[1] { '"' }; SyncControls.Instance.SetCurrentDeviceByCanonicalName(str.Trim(chArray)); } if (args["link"] is string link && !ZuneUI.Shell.IgnoreAppNavigationsArgs) { ZuneUI.Shell.ProcessExternalLink(link); } if (args["ripcd"] is string playCdPath && !ZuneUI.Shell.IgnoreAppNavigationsArgs) { CDAccess.HandleDiskFromAutoplay(playCdPath, CDAction.Rip); } if (args["playcd"] is string ripCdPath && !ZuneUI.Shell.IgnoreAppNavigationsArgs) { CDAccess.HandleDiskFromAutoplay(ripCdPath, CDAction.Play); } if (args["playmedia"] is string initialUrl && !ZuneUI.Shell.IgnoreAppNavigationsArgs) { RegisterNewFileEnumeration(new LaunchFromShellHelper("play", initialUrl)); } if (args["shellhlp_v2"] is string taskName && !ZuneUI.Shell.IgnoreAppNavigationsArgs) { string marshalledDataObject = args["dataobject"] as string; string eventName = args["event"] as string; if (marshalledDataObject != null && eventName != null) { RegisterNewFileEnumeration(new LaunchFromShellHelper(taskName, marshalledDataObject, eventName)); } } if (args.Contains("refreshlicenses")) { ZuneLibrary.MarkAllDRMFilesAsNeedingLicenseRefresh(); } if (args.Contains("update")) { SoftwareUpdates.Instance.InstallUpdates(); } if (args.Contains("shuffleall") && !ZuneUI.Shell.IgnoreAppNavigationsArgs) { SingletonModelItem <TransportControls> .Instance.ShuffleAllRequested = true; } if (args.Contains("resumenowplaying") && !ZuneUI.Shell.IgnoreAppNavigationsArgs) { SingletonModelItem <TransportControls> .Instance.ResumeLastNowPlayingHandler(); } if (args.Contains("refreshcontentandexit")) { if (!_phase2InitComplete) { HRESULT sOk = HRESULT._S_OK; HRESULT hr = ContentRefreshTask.Instance.StartContentRefresh(new AsyncCompleteHandler(OnContentRefreshTaskComplete)); if (hr.IsError) { OnContentRefreshTaskComplete(hr); } } else { ZuneLibrary.MarkAllDRMFilesAsNeedingLicenseRefresh(); } } if (!(args["playpin"] is string pinString) || ZuneUI.Shell.IgnoreAppNavigationsArgs) { return; } JumpListManager.PlayPin(JumpListPin.Parse(pinString)); }