本文整理汇总了C#中TaskEventArgs类的典型用法代码示例。如果您正苦于以下问题:C# TaskEventArgs类的具体用法?C# TaskEventArgs怎么用?C# TaskEventArgs使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
TaskEventArgs类属于命名空间,在下文中一共展示了TaskEventArgs类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的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);
}
示例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);
}
}
示例3: HandleErrorListPadTaskToggled
void HandleErrorListPadTaskToggled (object sender, TaskEventArgs e)
{
this.TextEditor.QueueDraw ();
}
示例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);
}
示例5: OnTaskAdded
private void OnTaskAdded(object sender, TaskEventArgs e)
{
e.Task.TaskEdited += OnTaskEdited;
}
示例6: TaskAdded
void TaskAdded (object sender, TaskEventArgs e)
{
AddTasks (e.Tasks);
}
示例7: GeneratedTaskRemoved
void GeneratedTaskRemoved (object sender, TaskEventArgs e)
{
foreach (Task t in e.Tasks)
RemoveGeneratedTask (t);
}
示例8: FireTaskToggleEvent
public static void FireTaskToggleEvent (object sender, TaskEventArgs e)
{
var handler = TaskToggled;
if (handler != null)
handler (sender, e);
}
示例9: OnTaskToggled
protected virtual void OnTaskToggled (TaskEventArgs e)
{
EventHandler<TaskEventArgs> handler = this.TaskToggled;
if (handler != null)
handler (this, e);
}
示例10: value_OnStatusChange
void value_OnStatusChange(object sender, TaskEventArgs e)
{
UpdatedTask.Raise(sender, e);
}
示例11: saveEmailTask_Completed
private void saveEmailTask_Completed(object sender, TaskEventArgs e)
{
if (e.TaskResult == TaskResult.OK)
{
saveEmailButton.Visibility = Visibility.Collapsed;
}
}
示例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();
}
示例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);
}
示例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 ();
}
示例15: TaskStoppedHandler
private void TaskStoppedHandler(object sender,
TaskEventArgs<HttpFileDownloadTask> e)
{
lock (SyncRoot) {
if (e.Task.IsCompleted) {
tasks.Remove (e.Task);
}
}
}