本文整理汇总了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();
}