本文整理汇总了C#中TaskList类的典型用法代码示例。如果您正苦于以下问题:C# TaskList类的具体用法?C# TaskList怎么用?C# TaskList使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
TaskList类属于命名空间,在下文中一共展示了TaskList类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: execute
public Task execute()
{
TaskList tl = new TaskList ();
tl.push (cutTask ());
tl.push (uploadTask ());
return tl;
}
示例2: Scheduler
static Scheduler()
{
var lockStrategy = new LockStrategy(LockRecursionPolicy.SupportsRecursion);
ScheduleQueue = new TaskList<ScheduleHistory>(lockStrategy);
ScheduleInProgress = new TaskList<ScheduleHistory>(lockStrategy);
}
示例3: Insert
///<summary>Inserts one TaskList into the database. Returns the new priKey.</summary>
internal static long Insert(TaskList taskList)
{
if(DataConnection.DBtype==DatabaseType.Oracle) {
taskList.TaskListNum=DbHelper.GetNextOracleKey("tasklist","TaskListNum");
int loopcount=0;
while(loopcount<100){
try {
return Insert(taskList,true);
}
catch(Oracle.DataAccess.Client.OracleException ex){
if(ex.Number==1 && ex.Message.ToLower().Contains("unique constraint") && ex.Message.ToLower().Contains("violated")){
taskList.TaskListNum++;
loopcount++;
}
else{
throw ex;
}
}
}
throw new ApplicationException("Insert failed. Could not generate primary key.");
}
else {
return Insert(taskList,false);
}
}
示例4: TaskForm
public TaskForm(TaskData data, TaskList lists)
{
InitializeComponent();
gTaskData = data;
gTaskList = lists;
foreach (var task in lists)
{
LogPathComboBox.Items.Add(task.LogPath);
ProjectPathComboBox.Items.Add(task.ProjectPath);
}
NameTextBox.Text = data.Name;
LogFolderTextBox.Text = data.LogFolder;
if (data.LogNumber == -1)
{
for (int i = 0; i <= lists.Count; i++)
{
if (lists.Cast<TaskData>().Count(t => t.LogNumber == i) == 0)
{
LogNumericUpDown.Value = i;
break;
}
}
}
else
{
LogNumericUpDown.Value = data.LogNumber;
}
}
示例5: CreateUITasklist
private Expander CreateUITasklist(TaskList list, Google.Apis.Tasks.v1.Data.Tasks tasks)
{
var expander = new Expander();
// Add a bold title.
expander.Header = list.Title;
expander.FontWeight = FontWeights.Bold;
// Add the taskItems (if applicable).
if (tasks.Items != null)
{
var container = new StackPanel();
foreach (CheckBox box in tasks.Items.Select(CreateUITask))
{
container.Children.Add(box);
}
expander.Content = container;
}
else
{
expander.Content = "There are no tasks in this list.";
}
return expander;
}
示例6: Execute
public void Execute(ArgumentList arguments, TaskList tasklist, TagList tags, TagFolder folder)
{
ILister lister = new Lister();
if (arguments.GetParameter(arguments.GetLength() - 1) == "--export")
lister = new HtmlLister();
lister.ListFiltered(tasklist.FilterTasks(arguments.GetParameter(1)), arguments.GetParameter(1));
}
示例7: begin
public override void begin(float length, int chapters, int paragraph)
{
time_ = 0.0f;
this.over_ = false;
GameManager.GetInstance ().road._speed = 0.001f;
TaskList tl = new TaskList ();
for (int i = 0; i < _sentence.Length; ++i) {
tl.push (new TaskPack(talkTask(_sentence[i])));
}
for (int i = 0; i < _talk.Length; ++i) {
if(_close[i]){
tl.push (_talk[i].goOutTask ());
}else{
tl.push (_talk[i].closePopTask ());
}
}
TaskManager.PushBack (tl, delegate {
this.over_ = true;
GameManager.GetInstance ().road._speed = 1.0f;
});
TaskManager.Run (tl);
}
示例8: AddTasksListViewModel
public AddTasksListViewModel(Func<TaskList, AddTasksList> addTasksListsFactory)
{
base.DisplayName = WindowTitle;
_task = new TaskList();
_addTasksListsFactory = addTasksListsFactory;
}
示例9: FixDeleteAction
public FixDeleteAction(TaskManagerNoteAddin addin, TaskList tasklist1, TaskList tasklist2, int line)
: base(addin)
{
Priority = false;
this.tasklist1 = tasklist1;
this.tasklist2 = tasklist2;
this.line = line;
}
示例10: TaskGenerateAsync
public async Task TaskGenerateAsync(int count)
{
var connect = new SQLiteAsyncConnection(DataBaseFile);
var taskList = await connect.Table<TaskTable>().Take(count).ToListAsync();
taskList.Shuffle ();
var categoryList = await connect.Table<CategoryTable>().ToListAsync();
_tasks = new TaskList(taskList, categoryList);
}
示例11: Start
// Use this for initialization
void Start()
{
TaskList tl = new TaskList ();
for(int i = 0;i<_sentence.Length; ++i){
tl.push (_talk.popTask (_sentence[i]));
}
TaskManager.Run (tl);
}
示例12: Main
public static void Main(string[] args)
{
var console = new RealConsole();
var projectRepository = new ProjectRepository();
var taskRepository = new TaskRepository();
var taskList = new TaskList(console, projectRepository, taskRepository);
taskList.Run();
}
示例13: Execute
public void Execute(ArgumentList arguments, TaskList tasklist, TagList tags, TagFolder folder)
{
FileIO loader = new FileIO();
if (tasklist.MarkAsDone(arguments.GetParameter(1)))
loader.SaveTasks(tasklist.GetTasks());
else
Console.WriteLine("No task with that id found to mark as done");
}
示例14: Execute
public void Execute(ArgumentList arguments, TaskList tasks, TagList tags, TagFolder folder)
{
FileIO loader = new FileIO();
TaskTagger tagTasks = new TaskTagger(tasks.GetTasks());
if (tagTasks.Untag(arguments.GetParameter(1), arguments.GetParameter(2)))
loader.SaveTasks(tagTasks.GetTasks());
else
Console.WriteLine("No task with that id found to untag");
}
示例15: SelectMany
public void SelectMany()
{
string tempTaskFile = CreateTempTasksFile();
var tl = new TaskList(tempTaskFile);
IOrderedEnumerable<string> contexts = tl.SelectMany(task => task.Contexts,
(task, context) => context).Distinct().OrderBy(context => context);
Assert.AreEqual(3, contexts.Count());
}