本文整理汇总了C#中TaskItem类的典型用法代码示例。如果您正苦于以下问题:C# TaskItem类的具体用法?C# TaskItem怎么用?C# TaskItem使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
TaskItem类属于命名空间,在下文中一共展示了TaskItem类的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的C#代码示例。
示例1: refresh
public void refresh(TaskItem item)
{
templateID = item.templateID;
type = item.type;
TaskName.text = item.name;
TaskDes.text = item.decribe;
if(type == (int)GlobalDef.TaskType.T_ONECE)
{
Title.spriteName = "08";
}
else if(type == (int)GlobalDef.TaskType.T_EVERTYDAY)
{
Title.spriteName = "07";
}
// if(item.isFinish())
// {
// Finish.gameObject.SetActive(true);
// }
// else
// {
// Finish.gameObject.SetActive(false);
// }
}
开发者ID:TrojanFighter,项目名称:U3D-DesignerBehaviorTest1,代码行数:25,代码来源:TaskItemInfoUI.cs
示例2: IsTaskReadyToExecute
internal bool IsTaskReadyToExecute(TaskItem task)
{
if (task == null) return false;
var req = task.SystemData as TaskRequest;
if (req == null) return true;
return (req.LastAttempt + AttemptInterval <= DateTime.UtcNow);
}
开发者ID:ridhouan,项目名称:teamlab.v6.5,代码行数:7,代码来源:MultiAttemptTaskQueue.cs
示例3: NeedWaitTask
internal TimeSpan NeedWaitTask(TaskItem task)
{
TimeSpan timespan = TimeSpan.Zero;
if (task == null) return timespan;
var req = task.SystemData as TaskRequest;
if (req == null) return timespan;
return (req.LastAttempt + AttemptInterval) - DateTime.UtcNow;
}
开发者ID:ridhouan,项目名称:teamlab.v6.5,代码行数:8,代码来源:MultiAttemptTaskQueue.cs
示例4: Replace
public void Replace (TaskItem inner)
{
if (inner != Inner)
{
DisposeInner();
Inner = inner;
}
}
开发者ID:tommygnr,项目名称:outlookcaldavsynchronizer,代码行数:8,代码来源:TaskItemWrapper.cs
示例5: createTaskButton_Click
private void createTaskButton_Click(object sender, RoutedEventArgs e)
{
TaskItem newtask = new TaskItem()
{
AlertTime = new TimeSpan(13, 0, 0).ToString(),
DueTime = new TimeSpan(13, 0, 0).ToString(),
EscalationLevel1Time = new TimeSpan(13, 0, 0).ToString(),
AssetCategoryID = 116,
BusinessAreaID = 30,
BypassManagerApproval = false,
ChecklistID = 2,
Comments = "No comments",
Description = "Task2_Description",
DocumentURL = "",
FrequencyID = 7,
FunctionalID = null,
KeyControl = false,
LocationID = 48,
ManagerSelfApproval = false,
RandomFrequencyID = null,
SpecificFrequencyID = null,
TaskName = "Task2",
HolidayCalendar = true
};
List<User> taskassignees = new List<User>() { new User() {
BRID = "E20037236",
UserLoginID = "ghoshnil"
} };
List<User> taskmanagers = new List<User>() { new User() {
BRID = "G47969783",
UserLoginID = "mistryna"
} };
newtask.Assignees = taskassignees;
newtask.Managers = taskmanagers;
var request = new RestRequest("CreateTask", RestSharp.Method.POST) { RequestFormat = DataFormat.Json }.AddBody(newtask);
checcklistadminclient.ExecuteAsync(request, (response) =>
{
if (response.ResponseStatus == ResponseStatus.Error)
{
int i = 1;
}
else
{
var result = JsonConvert.DeserializeObject<List<TaskItem>>(response.Content);
int i = 1;
}
});
}
开发者ID:nilavghosh,项目名称:VChk,代码行数:57,代码来源:MainPage.xaml.cs
示例6: addTask
/// <summary>
/// 添加任务
/// </summary>
public void addTask(TaskItem task)
{
if(taskDict.ContainsKey(task.templateID))
{
Debug.LogError("already has this task!");
return;
}
taskDict.Add(task.templateID, task);
}
开发者ID:TrojanFighter,项目名称:U3D-DesignerBehaviorTest1,代码行数:12,代码来源:TaskStruct.cs
示例7: EditTaskItem
public EditTaskItem(ICollectionView view, TaskItem taskItem)
{
InitializeComponent();
this.DataContext = taskItem;
_view = view;
_taskItem = taskItem;
this.Loaded += OnEditTaskItemLoaded;
this.Closed += OnClosed;
}
开发者ID:axs221,项目名称:TaskDash,代码行数:11,代码来源:EditTaskItem.xaml.cs
示例8: ExecuteTask
internal virtual void ExecuteTask(TaskItem task)
{
if (task == null) return;
try
{
task.Task(task.UserData);
}
catch
{
}
}
开发者ID:ridhouan,项目名称:teamlab.v6.5,代码行数:11,代码来源:TaskQueue.cs
示例9: AddDataItem
public void AddDataItem(TaskItem newDataItem)
{
// Add a to-do item to the data context.
dataDB.Items.InsertOnSubmit(newDataItem);
// Save changes to the database.
dataDB.SubmitChanges();
// Add a to-do item to the "all" observable collection.
AllDataItems.Add(newDataItem);
}
开发者ID:Jasminekiki,项目名称:WinProg,代码行数:12,代码来源:TaskViewModel.cs
示例10: DesignDetailsViewModel
public DesignDetailsViewModel()
: base(null, null)
{
TaskItem = new TaskItem()
{
Title = "Sample Task",
Description = "Description of the Sample Task",
CreatedDate = DateTime.Now,
DueDate = DateTime.Now.AddDays(1),
Priority = Priority.Medium
};
}
开发者ID:brentedwards,项目名称:GettingDirtyWithWP7,代码行数:12,代码来源:DesignDetailsViewModel.cs
示例11: SaveItemButton_Click
private void SaveItemButton_Click(object sender, RoutedEventArgs e)
{
if (!String.IsNullOrEmpty(ItemName.Text) && !String.IsNullOrEmpty(ItemDescription.Text)
&& comboBox.SelectedIndex > -1)
{
TaskItem saveItem = new TaskItem(ItemName.Text, ItemDescription.Text);
saveItem.startTime = ItemStartDate.Date.DateTime + ItemStartTime.Time;
saveItem.endTime = ItemEndDate.Date.DateTime + ItemEndTime.Time;
App.tasksManager.sections[comboBox.SelectedIndex].AddItem(saveItem);
App.tasksManager.saveToFile();
saveItem = null;
this.Frame.Navigate(typeof(TaskItemView), App.tasksManager.sections[comboBox.SelectedIndex]);
}
}
开发者ID:kaliyev,项目名称:resultator,代码行数:14,代码来源:TaskItemCreate.xaml.cs
示例12: DueDate
public void DueDate()
{
PropertiesChanged = new List<String>();
var dueDate = DateTime.Now;
var taskItem = new TaskItem();
taskItem.PropertyChanged += OnPropertyChanged;
taskItem.DueDate = dueDate;
taskItem.PropertyChanged -= OnPropertyChanged;
Assert.AreEqual(dueDate, taskItem.DueDate, "DueDate");
Assert.IsTrue(PropertiesChanged.Contains("DueDate"), "DueDate Property Changed");
}
开发者ID:brentedwards,项目名称:GettingDirtyWithWP7,代码行数:14,代码来源:TaskItemTests.cs
示例13: Description
public void Description()
{
PropertiesChanged = new List<String>();
var description = Guid.NewGuid().ToString();
var taskItem = new TaskItem();
taskItem.PropertyChanged += OnPropertyChanged;
taskItem.Description = description;
taskItem.PropertyChanged -= OnPropertyChanged;
Assert.AreEqual(description, taskItem.Description, "Description");
Assert.IsTrue(PropertiesChanged.Contains("Description"), "Description Property Changed");
}
开发者ID:brentedwards,项目名称:GettingDirtyWithWP7,代码行数:14,代码来源:TaskItemTests.cs
示例14: addTempData
public void addTempData()
{
for(int i = 0; i < 5; i++)
{
TaskItem item = new TaskItem();
item.templateID = 800001 + i;
everyDayTask.addTask(item);
TaskItem item1 = new TaskItem();
item1.templateID = 800001 + i;
mainThreadTask.addTask(item1);
}
}
开发者ID:TrojanFighter,项目名称:U3D-DesignerBehaviorTest1,代码行数:14,代码来源:TaskManager.cs
示例15: DeleteTask
public void DeleteTask()
{
var taskItem = new TaskItem();
var expectedTasks = new ObservableCollection<TaskItem>();
expectedTasks.Add(taskItem);
TaskRepository.Tasks = expectedTasks;
var args = new ExecuteEventArgs() { MethodParameter = taskItem };
ViewModel.DeleteTask(null, args);
var actualTasks = ViewModel.Tasks;
Assert.IsFalse(actualTasks.Contains(taskItem));
}
开发者ID:brentedwards,项目名称:GettingDirtyWithWP7,代码行数:15,代码来源:MainViewModelTests.cs
示例16: SetUp
public void SetUp()
{
_TaskTreeView = new NuGenTaskTreeView();
_InitialCount = _TaskTreeView.Nodes.Count;
_EventSink = new TaskTreeViewEventSink(_TaskTreeView);
_ServiceProvider = new NuGenTaskServiceProvider();
_XmlDoc = new XmlDocument();
_TaskItemDescription = "Description";
_TaskItemMock = new DynamicMock(typeof(TaskItem));
_TaskItemMock.SetValue("Description", _TaskItemDescription);
_TaskItem = (TaskItem)_TaskItemMock.Object;
Assert.IsFalse(_TaskTreeView.LabelEdit);
}
开发者ID:xuchuansheng,项目名称:GenXSource,代码行数:15,代码来源:NuGenTaskTreeViewTests.cs
示例17: CallsExecuteAssemblyOnceForEachAssembly
public static void CallsExecuteAssemblyOnceForEachAssembly()
{
var visitor = new XmlTestExecutionVisitor(null, null);
visitor.Finished.Set();
var assm1 = new TaskItem(@"C:\Full\Path\1");
var assm2 = new TaskItem(@"C:\Full\Path\2", new Dictionary<string, string> { { "ConfigFile", @"C:\Config\File" } });
var xunit = new Testable_xunit { CreateVisitor_Result = visitor };
xunit.Assemblies = new ITaskItem[] { assm1, assm2 };
xunit.Execute();
Assert.Collection(xunit.ExecuteAssembly_Calls,
call => Assert.Equal(@"C:\Full\Path\1, (null)", call),
call => Assert.Equal(@"C:\Full\Path\2, C:\Config\File", call)
);
}
开发者ID:MichalisN,项目名称:xunit,代码行数:16,代码来源:xunitTests.cs
示例18: TestCtor2
public void TestCtor2 ()
{
string itemName = "itemName";
string itemSpec = "a;b;c";
// result of Utilities.Escape (itemSpec)
string escapedInclude = "a%3bb%3bc";
ITaskItem taskItem = new TaskItem (itemSpec);
item = new BuildItem (itemName, taskItem);
Assert.AreEqual (itemSpec, item.FinalItemSpec, "A1");
Assert.AreEqual (escapedInclude, item.Include, "A2");
Assert.AreEqual (String.Empty, item.Exclude, "A3");
Assert.AreEqual (String.Empty, item.Condition, "A4");
Assert.AreEqual (false, item.IsImported, "A5");
Assert.AreEqual (itemName, item.Name, "A6");
}
开发者ID:GirlD,项目名称:mono,代码行数:17,代码来源:BuildItemTest.cs
示例19: ExecuteTask
internal override void ExecuteTask(TaskItem task)
{
var request = task.SystemData as TaskRequest;
if (request == null) throw new ApplicationException("invalid task");
request.CurrentAttempt++;
request.LastAttempt = DateTime.UtcNow;
bool done = false;
try
{
done = task.Task(task.UserData);
}
catch
{
}
if (!done)
{
if (request.CurrentAttempt < AttemptCount)
EnqueueTaskInternal(task);
}
}
开发者ID:ridhouan,项目名称:teamlab.v6.5,代码行数:20,代码来源:MultiAttemptTaskQueue.cs
示例20: onAddTask
public void onAddTask(SocketModel module)
{
TaskMessage.MsgAddNewTaskRep msg = MsgSerializer.Deserialize<TaskMessage.MsgAddNewTaskRep>(module);
int templateID = msg.task.taskId;
int type = StaticMission.Instance().getInt(templateID, "type");
TaskItem item = new TaskItem();
item.parseData(msg.task);
if(type == (int)GlobalDef.TaskType.T_ONECE)
{
MonoInstancePool.getInstance<TaskManager>().getMainthreadTask().addTask(item);
MonoInstancePool.getInstance<TaskManager>().getMainthreadTask().isDirty = true;
}
else if(type == (int)GlobalDef.TaskType.T_EVERTYDAY)
{
MonoInstancePool.getInstance<TaskManager>().getEveryDayTask().addTask(item);
MonoInstancePool.getInstance<TaskManager>().getEveryDayTask().isDirty = true;
}
}
开发者ID:TrojanFighter,项目名称:U3D-DesignerBehaviorTest1,代码行数:20,代码来源:TaskModuleMsg.cs
注:本文中的TaskItem类示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论