本文整理匯總了C#中AppDelegate.BeginInvoke方法的典型用法代碼示例。如果您正苦於以下問題:C# AppDelegate.BeginInvoke方法的具體用法?C# AppDelegate.BeginInvoke怎麽用?C# AppDelegate.BeginInvoke使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類AppDelegate
的用法示例。
在下文中一共展示了AppDelegate.BeginInvoke方法的1個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的C#代碼示例。
示例1: OnDoSortButton
/// <summary>
/// Event handler when the Sort button is clicked.
/// 1. Sets up the state by looking at the radiobutton group.
/// 2. Also copies state of the data type, concurrency index and the comparator size
/// 3. Creates a delegate to process the native sort algorithm asynchnronously
/// </summary>
private void OnDoSortButton(object sender, RoutedEventArgs e)
{
ResetFill();
SetRectBackground();
if (rbParallelSort.IsChecked.Value == true)
sortType = SortSelection.PplParallelSort;
else if (rbParallelBufferedSort.IsChecked.Value == true)
sortType = SortSelection.PplParallelBufferedSort;
else if (rbParallelRadixSort.IsChecked.Value == true)
sortType = SortSelection.PplParallelRadixSort;
else if (rbStdSort.IsChecked.Value == true)
sortType = SortSelection.StdSort;
dataType = (DataTypeSelection)lstDataSetType.SelectedIndex;
concurrency = System.Convert.ToInt32(txtConcurrency.Text);
if (concurrency <= 0)
{
concurrency = 1;
txtConcurrency.Text = "1";
}
comparatorSize = sldComparatorSize.Value;
done = false;
AppDelegate sd = new AppDelegate(ExecuteSort);
sd.BeginInvoke(null, null);
UpdateBackground();
}