本文整理汇总了C#中TaskFailedEventArgs类的典型用法代码示例。如果您正苦于以下问题:C# TaskFailedEventArgs类的具体用法?C# TaskFailedEventArgs怎么用?C# TaskFailedEventArgs使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
TaskFailedEventArgs类属于命名空间,在下文中一共展示了TaskFailedEventArgs类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: MyRouteTask_Failed
private void MyRouteTask_Failed(object sender, TaskFailedEventArgs e)
{
string errorMessage = "Routing error: ";
errorMessage += e.Error.Message;
foreach (string detail in (e.Error as ServiceException).Details)
errorMessage += "," + detail;
MessageBox.Show(errorMessage);
stopsGraphicsLayer.Graphics.RemoveAt(stopsGraphicsLayer.Graphics.Count - 1);
}
示例2: task_Fault
private void task_Fault(object sender, TaskFailedEventArgs args)
{
base.OnProgress(100);
InitializationFailure = args.Error;
base.Initialize();
}
示例3: GeometryService_Failed
private void GeometryService_Failed(object sender, TaskFailedEventArgs e)
{
MessageBox.Show("Geometry Service error: " + e.Error);
}
示例4: QueryTask_Failed
/// <summary>
/// Handles failed QueryTask by displaying an error message.
/// </summary>
private void QueryTask_Failed(object sender, TaskFailedEventArgs e)
{
// Unhook the queryTask.Failed even
queryTask.Failed -= QueryTask_Failed;
// Show failure error message
TextBlock failureText = new TextBlock()
{
Margin = new Thickness(10),
Text = e.Error.Message
};
string windowTitle = string.Format("{0}", "Error");
MapApplication.Current.ShowWindow(windowTitle, failureText, true);
}
示例5: FeatureLayer_UpdateFailed
private void FeatureLayer_UpdateFailed(object sender, TaskFailedEventArgs e)
{
}
示例6: task_Failed
private void task_Failed(object sender, TaskFailedEventArgs e)
{
string errorMessage = "Routing error: ";
errorMessage += e.Error.Message;
foreach (string detail in (e.Error as ServiceException).Details)
errorMessage += "," + detail;
MessageBox.Show(errorMessage);
}
示例7: featureLayer_UpdateFailed
void featureLayer_UpdateFailed(object sender, TaskFailedEventArgs e)
{
MessageBox.Show(e.Error.Message,
"FeatureLayer update failed", MessageBoxButton.OK);
}
示例8: Locator_Failed
// Raised when the locator search fails
private void Locator_Failed(object sender, TaskFailedEventArgs e)
{
IsSearching = false; // Reset busy state
OnSearchFailed(e.Error); // Raise failed event
}
示例9: GeoprocessorTask_Failed
private void GeoprocessorTask_Failed(object sender, TaskFailedEventArgs e)
{
InformationText.Text = descText;
jobid = null;
MessageBox.Show("Geoprocessing service failed: " + e.Error);
}
示例10: QueryTask_Failed
private void QueryTask_Failed(object sender, TaskFailedEventArgs args)
{
MessageBox.Show("Query failed: " + args.Error);
MyDrawObject.IsEnabled = true;
}
示例11: LocatorTask_Failed
private void LocatorTask_Failed(object sender, TaskFailedEventArgs e)
{
MessageBox.Show("Locator service failed: " + e.Error);
}
示例12: QueryTaskFailed
private void QueryTaskFailed(object sender, TaskFailedEventArgs args)
{
QueryCompleted(0, (QueryType) args.UserState);
}
示例13: gpAircraftRouteGen_Failed
void gpAircraftRouteGen_Failed(object sender, TaskFailedEventArgs e)
{
System.Diagnostics.Debug.WriteLine(e.Error.ToString());
}
示例14: FindTask_Failed
private void FindTask_Failed(object sender, TaskFailedEventArgs args)
{
MessageBox.Show("Find failed: " + args.Error);
}
示例15: LocationToAddressLocatorTask_Failed
private void LocationToAddressLocatorTask_Failed(object sender, TaskFailedEventArgs e)
{
MessageBox.Show("Unable to determine an address. Try selecting a location closer to a street.");
}