Beispiel #1
0
        /// <summary>
        /// Ends the show selector user interface display.
        /// </summary>
        /// <returns>The storage device.</returns>
        /// <param name="result">The result of BeginShowSelector.</param>
        public static StorageDevice EndShowSelector(IAsyncResult result)
        {
            if (!result.IsCompleted)
            {
                // Wait for the WaitHandle to become signaled.
                try
                {
                    result.AsyncWaitHandle.WaitOne();
                }
                finally
                {
                }
            }

            // Retrieve the delegate.
            AsyncResult asyncResult = (AsyncResult)result;

            ShowSelectorAsynchronous del = asyncResult.AsyncDelegate as ShowSelectorAsynchronous;

            if (del != null)
            {
                return(del.EndInvoke(result));
            }

            throw new ArgumentException("result");
        }
Beispiel #2
0
        /// <summary>
        /// Begin process to display the StorageDevice selector UI.
        /// </summary>
        /// <returns>The show selector.</returns>
        /// <param name="sizeInBytes">Size (in bytes) of data to write.</param>
        /// <param name="directoryCount">Number of directories to write.</param>
        /// <param name="callback">Method to invoke when device is selected by player.</param>
        /// <param name="state">Request identifier object for callback (can be null).</param>
        public static IAsyncResult BeginShowSelector(
            int sizeInBytes,
            int directoryCount,
            AsyncCallback callback,
            object state
            )
        {
            ShowSelectorAsynchronous del = new ShowSelectorAsynchronous(Show);

            return(del.BeginInvoke(null, sizeInBytes, directoryCount, callback, state));
        }
Beispiel #3
0
		/// <summary>
		/// Begin process to display the StorageDevice selector UI.
		/// </summary>
		/// <returns>The show selector.</returns>
		/// <param name="player">The PlayerIndex. Only PlayerIndex.One is valid on Windows.</param>
		/// <param name="sizeInBytes">Size (in bytes) of data to write.</param>
		/// <param name="directoryCount">Number of directories to write.</param>
		/// <param name="callback">Method to invoke when device is selected by player.</param>
		/// <param name="state">Request identifier object for callback (can be null).</param>
		public static IAsyncResult BeginShowSelector(
			PlayerIndex player,
			int sizeInBytes,
			int directoryCount,
			AsyncCallback callback,
			object state
		) {
			ShowSelectorAsynchronous del = new ShowSelectorAsynchronous(Show);
			return del.BeginInvoke(player, sizeInBytes, directoryCount, callback, state);
		}