我希望创建一个工作流程的活动,具有依赖性结构这样

  • 设置
    • 等待期
      • 小时
      • 分钟

在目前的代码下面将显示 设置等待期 作为一个整数,但现在需要展开了3次儿童性 , 小时分钟.

我理解我会有改变 等待期, 但我不知道该如何去关于附加的其他3个属性。

任何帮助,将不胜感激...谢谢。

public static DependencyProperty WaitPeriodProperty = DependencyProperty.Register("WaitPeriod", typeof(int), typeof(CheckActivity));
/// <summary>
/// Dependency property for 'Wait Period'
/// </summary>   
///        
[DescriptionAttribute("The email of the sender")]
[CategoryAttribute("Settings")]        
public int WaitPeriod
{
    get
    {
        return (int)(base.GetValue(CheckActivity.WaitPeriodProperty));
    }
    set
    {
        base.SetValue(CheckActivity.WaitPeriodProperty, value);
    }
}
有帮助吗?

解决方案

首先你肯定应该改变的类型 intTimeSpan.有天、小时、分秒和毫秒。

输入UI可能不是自己的喜好的,虽然它只是一串:d。hh:mm:ss。毫秒

但是我个人会忍,为简单起见,使用了一类特别设计的任务。它也许有可能创建一个自定义的编辑。

许可以下: CC-BY-SA归因
不隶属于 StackOverflow
scroll top