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


C# Model.ModelItem类代码示例

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


ModelItem类属于System.Activities.Presentation.Model命名空间,在下文中一共展示了ModelItem类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。

示例1: CanMerge

        public static bool CanMerge(ModelItem source)
        {
            Contract.Requires(source != null);

            var task = source.GetTaskActivity();
            return task.Status == TaskActivityStatus.CheckedIn;
        }
开发者ID:barbarossia,项目名称:CWF,代码行数:7,代码来源:MultipleAuthorService.cs

示例2: CanAssign

        public static bool CanAssign(ModelItem source)
        {
            Contract.Requires(source != null);

            return !CheckIsTask(source) &&
                !CompositeService.GetParents(source).Any(m => m.GetTaskActivity() != null);
        }
开发者ID:barbarossia,项目名称:CWF,代码行数:7,代码来源:MultipleAuthorService.cs

示例3: CanUnassign

        public static bool CanUnassign(ModelItem source)
        {
            Contract.Requires(source != null);

            var task = source.GetTaskActivity();
            return task.Status != TaskActivityStatus.Editing;
        }
开发者ID:barbarossia,项目名称:CWF,代码行数:7,代码来源:MultipleAuthorService.cs

示例4: DateTimeDesignerViewModel

 public DateTimeDesignerViewModel(ModelItem modelItem)
     : base(modelItem)
 {
     AddTitleBarHelpToggle();
     TimeModifierTypes = new List<string>(DateTimeFormatter.TimeModifierTypes);
     SelectedTimeModifierType = string.IsNullOrEmpty(TimeModifierType) ? TimeModifierTypes[0] : TimeModifierType;
 }
开发者ID:FerdinandOlivier,项目名称:Warewolf-ESB,代码行数:7,代码来源:DateTimeDesignerViewModel.cs

示例5: CommandLineDesignerViewModel

 public CommandLineDesignerViewModel(ModelItem modelItem)
     : base(modelItem)
 {
     AddTitleBarLargeToggle();
     AddTitleBarHelpToggle();
     InitializeCommandPriorities();
 }
开发者ID:NatashaSchutte,项目名称:Warewolf-ESB,代码行数:7,代码来源:CommandLineDesignerViewModel.cs

示例6: CreateProperty

 ModelProperty CreateProperty(ModelItem parent, PropertyDescriptor propertyDescriptor)
 {
     bool isAttached = propertyDescriptor is AttachedPropertyDescriptor;
     return this.createFakeModelProperties ?
         (ModelProperty)(new FakeModelPropertyImpl((FakeModelItemImpl)parent, propertyDescriptor)) :
         (ModelProperty)(new ModelPropertyImpl(parent, propertyDescriptor, isAttached));
 }
开发者ID:krytht,项目名称:DotNetReferenceSource,代码行数:7,代码来源:ModelPropertyCollectionImpl.cs

示例7: DateTimeDifferenceDesignerViewModel

 public DateTimeDifferenceDesignerViewModel(ModelItem modelItem)
     : base(modelItem)
 {
     AddTitleBarHelpToggle();
     OutputTypes = new List<string>(DateTimeComparer.OutputFormatTypes);
     SelectedOutputType = string.IsNullOrEmpty(OutputType) ? OutputTypes[0] : OutputType;
 }
开发者ID:FerdinandOlivier,项目名称:Warewolf-ESB,代码行数:7,代码来源:DateTimeDifferenceDesignerViewModel.cs

示例8: StoreViewState

 public override void StoreViewState(ModelItem modelItem, string key, object value)
 {
     if (modelItem == null)
     {
         throw FxTrace.Exception.AsError(new ArgumentNullException("modelItem"));
     }
     if (key == null)
     {
         throw FxTrace.Exception.AsError(new ArgumentNullException("key"));
     }
   
     object oldValue = null;
     Dictionary<string, object> viewState = WorkflowViewStateService.GetViewState(modelItem.GetCurrentValue());
     if (viewState == null)
     {
         viewState = new Dictionary<string, object>();
         WorkflowViewStateService.SetViewState(modelItem.GetCurrentValue(), viewState);
     }
     viewState.TryGetValue(key, out oldValue);
     if (value != null)
     {
         viewState[key] = value;
     }
     else
     {
         RemoveViewState(modelItem, key);
     }
     if (this.ViewStateChanged != null && value != oldValue)
     {
         this.ViewStateChanged(this, new ViewStateChangedEventArgs(modelItem, key, value, oldValue));
     }
 }
开发者ID:nlh774,项目名称:DotNetReferenceSource,代码行数:32,代码来源:WorkflowViewStateService.cs

示例9: SortRecordsDesignerViewModel

 public SortRecordsDesignerViewModel(ModelItem modelItem)
     : base(modelItem)
 {
     AddTitleBarHelpToggle();
     SortOrderTypes = new List<string> { "Forward", "Backwards" };
     SelectedSelectedSort = string.IsNullOrEmpty(SelectedSort) ? SortOrderTypes[0] : SelectedSort;
 }
开发者ID:Robin--,项目名称:Warewolf,代码行数:7,代码来源:SortRecordsDesignerViewModel.cs

示例10: ActivityArgumentBinder

        internal ActivityArgumentBinder(ModelItem activityModelItem)
        {
            Contract.Requires(activityModelItem != null);

            this.activityModelItem = activityModelItem;
            Init();
        }
开发者ID:nagyistoce,项目名称:Neuroflow,代码行数:7,代码来源:ActivityArgumentBinder.cs

示例11: SharepointListReadDesignerViewModel

 public SharepointListReadDesignerViewModel(ModelItem modelItem)
     : base(modelItem, new AsyncWorker(), EnvironmentRepository.Instance.ActiveEnvironment, EventPublishers.Aggregator,false)
 {
     WhereOptions = new ObservableCollection<string>(SharepointSearchOptions.SearchOptions());
     dynamic mi = ModelItem;
     InitializeItems(mi.FilterCriteria);
 }
开发者ID:FerdinandOlivier,项目名称:Warewolf-ESB,代码行数:7,代码来源:SharepointListReadDesignerViewModel.cs

示例12: RandomDesignerViewModel

 public RandomDesignerViewModel(ModelItem modelItem)
     : base(modelItem)
 {
     AddTitleBarHelpToggle();
     RandomTypes = Dev2EnumConverter.ConvertEnumsTypeToStringList<enRandomType>();
     SelectedRandomType = Dev2EnumConverter.ConvertEnumValueToString(RandomType);
 }
开发者ID:Robin--,项目名称:Warewolf,代码行数:7,代码来源:RandomDesignerViewModel.cs

示例13: Find

        public static IEnumerable<ModelItem> Find(ModelItem startingItem, Predicate<Type> matcher)
        {
            Contract.Requires(startingItem != null);
            Contract.Requires(matcher != null);

            return ModelItemService.FindCore(startingItem, matcher);
        }
开发者ID:barbarossia,项目名称:CWF,代码行数:7,代码来源:ModelItemService.cs

示例14: ActivityDelegateItem

        public ActivityDelegateItem(ModelItem modelItem, ActivityDelegateMetadataAttribute metadata = null)
        {
            Contract.Requires(modelItem != null);
            ModelItem = modelItem;

            if (metadata == null)
            {
                var pmi = modelItem.Parent.Properties.Where(p => p.Value == modelItem).First();
                metadata = pmi.Attributes[typeof(ActivityDelegateMetadataAttribute)] as ActivityDelegateMetadataAttribute;
            }

            if (metadata != null)
            {
                ObjectName = metadata.ObjectName;
                ResultName = metadata.ResultName;
                Argument1Name = metadata.Argument1Name;
                Argument2Name = metadata.Argument2Name;
                Argument3Name = metadata.Argument3Name;
                Argument4Name = metadata.Argument4Name;
                Argument5Name = metadata.Argument5Name;
                Argument6Name = metadata.Argument6Name;
                Argument7Name = metadata.Argument7Name;
                Argument8Name = metadata.Argument8Name;
            }
            if (string.IsNullOrWhiteSpace(ObjectName)) ObjectName = ModelItem.ItemType.GetGenericArguments()[0].Name;
        }
开发者ID:nagyistoce,项目名称:Neuroflow,代码行数:26,代码来源:ActivityDelegateItem.cs

示例15: ModelItemDictionaryImpl

        public ModelItemDictionaryImpl(ModelTreeManager modelTreeManager, Type itemType, Object instance, ModelItem parent)
        {
            Fx.Assert(modelTreeManager != null, "modelTreeManager cannot be null");
            Fx.Assert(itemType != null, "item type cannot be null");
            Fx.Assert(instance != null, "instance cannot be null");
            this.itemType = itemType;
            this.instance = new DictionaryWrapper(instance);
            this.modelTreeManager = modelTreeManager;
            this.parents = new List<ModelItem>(1);
            this.sources = new List<ModelProperty>(1);
            this.helper = new ModelTreeItemHelper();
            if (parent != null)
            {
                this.manuallySetParent = parent;
            }
            this.modelPropertyStore = new Dictionary<string, ModelItem>();
            this.subTreeNodesThatNeedBackLinkPatching = new List<ModelItem>();
            this.modelItems = new NullableKeyDictionary<ModelItem, ModelItem>();
            UpdateInstance();


            if (ItemsCollectionObject != null)
            {
                ItemsCollectionModelItemCollection.CollectionChanged += new NotifyCollectionChangedEventHandler(itemsCollection_CollectionChanged);
                this.ItemsCollectionObject.ModelDictionary = this;
            }
        }
开发者ID:nlh774,项目名称:DotNetReferenceSource,代码行数:27,代码来源:ModelItemDictionaryImpl.cs


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