本文整理汇总了C#中TaskEventArgs类的典型用法代码示例。如果您正苦于以下问题:C# TaskEventArgs类的具体用法?C# TaskEventArgs怎么用?C# TaskEventArgs使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
TaskEventArgs类属于命名空间,在下文中一共展示了TaskEventArgs类的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的C#代码示例。
示例1: saveRingtoneTask_Completed
void saveRingtoneTask_Completed(object sender, TaskEventArgs e)
{
//string chooserResult = "";
if (e.Error != null)
chooserResult.Text = e.Error.Message;
else if (e.TaskResult == TaskResult.Cancel)
chooserResult.Text = "user canceled";
else if (e.TaskResult == TaskResult.None)
chooserResult.Text = "no result";
else if (e.TaskResult == TaskResult.OK)
chooserResult.Text = "ok";
System.Diagnostics.Debug.WriteLine(chooserResult.Text);
}
开发者ID:amrzagloul,项目名称:Windows-Phone-8-In-Action,代码行数:13,代码来源:MainPage.xaml.cs
示例2: taskTree_OpenTaskConfigFileEvent
void taskTree_OpenTaskConfigFileEvent(object sender, TaskEventArgs e)
{
try
{
//get the top form
MainForm mainform = this.TopLevelControl as MainForm;
if (mainform != null)
mainform.OpenTaskConfigFile(e.Task);
}
catch (Exception ex)
{
Program.ShowMessageBox("FrmTaskManager", ex);
}
}
开发者ID:jojozhuang,项目名称:Projects,代码行数:14,代码来源:FrmTaskManager.cs
示例3: HandleErrorListPadTaskToggled
void HandleErrorListPadTaskToggled (object sender, TaskEventArgs e)
{
this.TextEditor.QueueDraw ();
}
开发者ID:nocache,项目名称:monodevelop,代码行数:4,代码来源:SourceEditorView.cs
示例4: OnTaskEdited
private void OnTaskEdited(object sender, TaskEventArgs e)
{
lock (tasksLock)
for (int i = 0; i != scheduledTasks.Count; ++i)
for (int j = 0; j < scheduledTasks.Values[i].Count; )
{
Task currentTask = scheduledTasks.Values[i][j];
if (currentTask == e.Task)
scheduledTasks.Values[i].RemoveAt(j);
else
j++;
}
if (e.Task.Schedule is RecurringSchedule)
ScheduleTask(e.Task);
}
开发者ID:RoDaniel,项目名称:featurehouse,代码行数:15,代码来源:DirectExecutor.cs
示例5: OnTaskAdded
private void OnTaskAdded(object sender, TaskEventArgs e)
{
e.Task.TaskEdited += OnTaskEdited;
}
开发者ID:RoDaniel,项目名称:featurehouse,代码行数:4,代码来源:DirectExecutor.cs
示例6: TaskAdded
void TaskAdded (object sender, TaskEventArgs e)
{
AddTasks (e.Tasks);
}
开发者ID:segaman,项目名称:monodevelop,代码行数:4,代码来源:ErrorListPad.cs
示例7: GeneratedTaskRemoved
void GeneratedTaskRemoved (object sender, TaskEventArgs e)
{
foreach (Task t in e.Tasks)
RemoveGeneratedTask (t);
}
开发者ID:Tak,项目名称:monodevelop-novell,代码行数:5,代码来源:CommentTasksView.cs
示例8: FireTaskToggleEvent
public static void FireTaskToggleEvent (object sender, TaskEventArgs e)
{
var handler = TaskToggled;
if (handler != null)
handler (sender, e);
}
开发者ID:head-thrash,项目名称:monodevelop,代码行数:6,代码来源:TaskService.cs
示例9: OnTaskToggled
protected virtual void OnTaskToggled (TaskEventArgs e)
{
EventHandler<TaskEventArgs> handler = this.TaskToggled;
if (handler != null)
handler (this, e);
}
开发者ID:JamesChan,项目名称:monodevelop,代码行数:6,代码来源:ErrorListPad.cs
示例10: value_OnStatusChange
void value_OnStatusChange(object sender, TaskEventArgs e)
{
UpdatedTask.Raise(sender, e);
}
开发者ID:perploug,项目名称:PackageBootstrap,代码行数:4,代码来源:TaskManagerBase.cs
示例11: saveEmailTask_Completed
private void saveEmailTask_Completed(object sender, TaskEventArgs e)
{
if (e.TaskResult == TaskResult.OK)
{
saveEmailButton.Visibility = Visibility.Collapsed;
}
}
开发者ID:bikila,项目名称:MobiPicasa,代码行数:7,代码来源:HelpPage.xaml.cs
示例12: TaskDeleted
private void TaskDeleted(object sender, TaskEventArgs e)
{
if (InvokeRequired)
{
Invoke((EventHandler<TaskEventArgs>)TaskDeleted, sender, e);
return;
}
foreach (ListViewItem item in scheduler.Items)
if (((Task)item.Tag) == e.Task)
{
scheduler.Items.Remove(item);
break;
}
PositionProgressBar();
}
开发者ID:RoDaniel,项目名称:featurehouse,代码行数:15,代码来源:SchedulerPanel.cs
示例13: TaskAdded
private void TaskAdded(object sender, TaskEventArgs e)
{
if (InvokeRequired)
{
Invoke((EventHandler<TaskEventArgs>)TaskAdded, sender, e);
return;
}
MainForm parent = (MainForm)FindForm();
if (parent != null && (parent.WindowState == FormWindowState.Minimized || !parent.Visible))
{
parent.ShowNotificationBalloon(S._("New task added"), S._("{0} " +
"has just been added to the list of tasks.", e.Task.UIText),
ToolTipIcon.Info);
}
DisplayTask(e.Task);
}
开发者ID:RoDaniel,项目名称:featurehouse,代码行数:16,代码来源:SchedulerPanel.cs
示例14: UserTasksChanged
void UserTasksChanged (object sender, TaskEventArgs e)
{
if (updating)
return;
if (view.IsRealized)
view.ScrollToPoint (0, 0);
store.Clear ();
foreach (TaskListEntry task in TaskService.UserTasks) {
store.AppendValues (GettextCatalog.GetString (Enum.GetName (typeof (TaskPriority), task.Priority)), task.Completed, task.Description, task, GetColorByPriority (task.Priority), task.Completed ? (int)Pango.Weight.Light : (int)Pango.Weight.Bold);
}
ValidateButtons ();
}
开发者ID:vvarshne,项目名称:monodevelop,代码行数:14,代码来源:UserTasksView.cs
示例15: TaskStoppedHandler
private void TaskStoppedHandler(object sender,
TaskEventArgs<HttpFileDownloadTask> e)
{
lock (SyncRoot) {
if (e.Task.IsCompleted) {
tasks.Remove (e.Task);
}
}
}
开发者ID:knocte,项目名称:banshee,代码行数:9,代码来源:DownloadManager.cs
示例16: saveRingtoneChooser_Completed
private void saveRingtoneChooser_Completed(object sender, TaskEventArgs e)
{
switch (e.TaskResult)
{
//Logic for when the ringtone was saved successfully
case TaskResult.OK:
// MessageBox.Show("Ringtone saved.");
break;
//Logic for when the task was cancelled by the user
case TaskResult.Cancel:
// MessageBox.Show("Save cancelled.");
break;
//Logic for when the ringtone could not be saved
case TaskResult.None:
MessageBox.Show("Ringtone could not be saved.");
break;
}
}
开发者ID:huucp,项目名称:XmasRingtones,代码行数:20,代码来源:RingtoneItem.xaml.cs
示例17: UpdateTasks
void UpdateTasks (object sender, TaskEventArgs e)
{
TaskListEntry [] tasks = TaskService.Errors.GetFileTasks (ContentName);
if (tasks == null)
return;
DisposeErrorMarkers (); // disposes messageBubbleCache as well.
if (IdeApp.Preferences.ShowMessageBubbles == ShowMessageBubbles.Never)
return;
messageBubbleCache = new MessageBubbleCache (widget.TextEditor);
CancelMessageBubbleUpdate ();
var token = messageBubbleUpdateSource;
Task.Run (delegate {
var errorMarkers = new List<MessageBubbleTextMarker> ();
foreach (TaskListEntry task in tasks) {
if (token.IsCancellationRequested)
return null;
if (task.Severity == TaskSeverity.Error || task.Severity == TaskSeverity.Warning) {
if (IdeApp.Preferences.ShowMessageBubbles == ShowMessageBubbles.ForErrors && task.Severity == TaskSeverity.Warning)
continue;
var errorTextMarker = new MessageBubbleTextMarker (messageBubbleCache, task, task.Severity == TaskSeverity.Error, task.Description);
errorMarkers.Add (errorTextMarker);
errorTextMarker.IsVisible = !IdeApp.Preferences.DefaultHideMessageBubbles;
}
}
return errorMarkers;
}).ContinueWith (t => {
if (token.IsCancellationRequested)
return;
Application.Invoke (delegate {
if (token.IsCancellationRequested)
return;
var newErrorMarkers = new List<MessageBubbleTextMarker> ();
foreach (var marker in t.Result) {
if (token.IsCancellationRequested)
return;
var lineSegment = widget.Document.GetLine (marker.Task.Line);
if (lineSegment == null)
continue;
var oldMarker = lineSegment.Markers.OfType<MessageBubbleTextMarker> ().FirstOrDefault ();
if (oldMarker != null) {
oldMarker.AddError (marker.Task, marker.Task.Severity == TaskSeverity.Error, marker.Task.Description);
} else {
marker.LineSegment = lineSegment;
widget.Document.AddMarker (lineSegment, marker, false);
newErrorMarkers.Add (marker);
}
}
this.currentErrorMarkers = newErrorMarkers;
});
});
}
开发者ID:stephenoakman,项目名称:monodevelop,代码行数:53,代码来源:SourceEditorView.cs
示例18: UpdateTasks
void UpdateTasks (object sender, TaskEventArgs e)
{
Task[] tasks = TaskService.Errors.GetFileTasks (ContentName);
if (tasks == null)
return;
DisposeErrorMarkers ();
if (IdeApp.Preferences.ShowMessageBubbles == ShowMessageBubbles.Never)
return;
widget.Document.BeginAtomicUndo ();
foreach (Task task in tasks) {
if (task.Severity == TaskSeverity.Error || task.Severity == TaskSeverity.Warning) {
if (IdeApp.Preferences.ShowMessageBubbles == ShowMessageBubbles.ForErrors && task.Severity == TaskSeverity.Warning)
continue;
LineSegment lineSegment = widget.Document.GetLine (task.Line - 1);
if (lineSegment == null)
continue;
var marker = currentErrorMarkers.FirstOrDefault (m => m.LineSegment == lineSegment);
if (marker != null) {
marker.AddError (task.Severity == TaskSeverity.Error, task.Description);
continue;
}
MessageBubbleTextMarker errorTextMarker = new MessageBubbleTextMarker (widget.TextEditor, task, lineSegment, task.Severity == TaskSeverity.Error, task.Description);
currentErrorMarkers.Add (errorTextMarker);
errorTextMarker.IsExpanded = !IdeApp.Preferences.DefaultHideMessageBubbles;
widget.Document.AddMarker (lineSegment, errorTextMarker, false);
}
}
widget.Document.EndAtomicUndo ();
widget.TextEditor.QueueDraw ();
}
开发者ID:transformersprimeabcxyz,项目名称:monodevelop-1,代码行数:32,代码来源:SourceEditorView.cs
示例19: GeneratedTaskAdded
void GeneratedTaskAdded (object sender, TaskEventArgs e)
{
foreach (Task t in e.Tasks)
AddGeneratedTask (t);
}
开发者ID:Tak,项目名称:monodevelop-novell,代码行数:5,代码来源:CommentTasksView.cs
示例20: TaskServiceAdded
void TaskServiceAdded(object sender, TaskEventArgs e)
{
if (e.Task.TaskType == TaskType.Comment) {
AddItem(e.Task);
}
}
开发者ID:Paccc,项目名称:SharpDevelop,代码行数:6,代码来源:TaskListPad.cs
注:本文中的TaskEventArgs类示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论