当前位置: 首页>>代码示例>>C#>>正文


C# TaskItem类代码示例

本文整理汇总了C#中TaskItem的典型用法代码示例。如果您正苦于以下问题:C# TaskItem类的具体用法?C# TaskItem怎么用?C# TaskItem使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。


TaskItem类属于命名空间,在下文中一共展示了TaskItem类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的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


注:本文中的TaskItem类示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。