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


C# TaskStatus.ToString方法代码示例

本文整理汇总了C#中TaskStatus.ToString方法的典型用法代码示例。如果您正苦于以下问题:C# TaskStatus.ToString方法的具体用法?C# TaskStatus.ToString怎么用?C# TaskStatus.ToString使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在TaskStatus的用法示例。


在下文中一共展示了TaskStatus.ToString方法的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。

示例1: GetXpoState

 XpoState GetXpoState(TaskStatus taskStatus, XpoStateMachine stateMachine) {
     var xpoState = ObjectSpace.FindObject<XpoState>(CriteriaOperator.Parse("Caption=?", taskStatus.ToString()))??ObjectSpace.CreateObject<XpoState>();
     xpoState.Caption = taskStatus.ToString();
     xpoState.StateMachine=stateMachine;
     xpoState.MarkerValue = taskStatus.ToString();
     return xpoState;
 }
开发者ID:aries544,项目名称:eXpand,代码行数:7,代码来源:Updater.cs

示例2: CreateTransition

 void CreateTransition(TaskStatus startStatus, TaskStatus endStatus) {
     var caption = startStatus.ToString() + endStatus;
     var transition = ObjectSpace.FindObject<XpoTransition>(CriteriaOperator.Parse("Caption=?", caption)) ?? ObjectSpace.CreateObject<XpoTransition>();
     transition.Caption = caption;
     transition.SourceState = ObjectSpace.FindObject<XpoState>(CriteriaOperator.Parse("Caption=?", startStatus.ToString()));
     transition.TargetState =ObjectSpace.FindObject<XpoState>(CriteriaOperator.Parse("Caption=?", endStatus.ToString()));
 }
开发者ID:aries544,项目名称:eXpand,代码行数:7,代码来源:Updater.cs

示例3: Get

 public IEnumerable<Task> Get(TaskStatus taskStatus)
 {
     var url = String.Format("tasks/{0}.xml", taskStatus.ToString().ToLower());
     var response = _client.Execute<List<Task>>(new RestRequest(url, Method.GET));
     var tasks = response.Data;
     return tasks;
 }
开发者ID:scottschluer,项目名称:highrise-api,代码行数:7,代码来源:TaskRequest.cs

示例4: setTaskStatus

 public void setTaskStatus(TaskStatus taskStatus)
 {
     if (lbTaskStatus.InvokeRequired)
         lbTaskStatus.Invoke(new EventHandler((sender, e) => setTaskStatus(taskStatus)));
     else
     {
         lbTaskStatus.Text = taskStatus.ToString();
         switch (taskStatus)
         {
             case TaskStatus.Completed_OK:
                 setResultText("OK", Color.Green);
                 setProgressBarValue(taskProgressBar.Maximum);
                 break;
             case TaskStatus.Completed_Failed:
                 setResultText("Fail", Color.Red);
                 break;
             default:
                 setResultText("...", Color.Orange);
                 break;
         }
     }
 }
开发者ID:SiGhTfOrbACQ,项目名称:O2.FluentSharp,代码行数:22,代码来源:ascx_Task.cs

示例5: CreateTask

        // If success, use the next argument as the result;
        // if !success, use all the subsequent arguments as the error_info.
        public string CreateTask(TaskStatus status, params string[] result)
        {
            Proxy_Task task = new Proxy_Task();
            task.uuid = String.Format("task{0}", rand.Next());
            task.name_label = task.uuid;
            task.name_description = "";
            task.created = DateTime.Now;
            task.status = status.ToString();

            if (status != TaskStatus.pending)
            {
                task.finished = DateTime.Now;
                task.progress = 100.0;

                if (status == TaskStatus.success)
                {
                    task.result = result[0];
                }
                else
                {
                    task.error_info = result;
                }
            }

            tasks.Add(task.uuid, task);
            return task.uuid;
        }
开发者ID:robhoes,项目名称:xenadmin,代码行数:29,代码来源:DbProxy.cs


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