本文整理汇总了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;
}
示例2: CanAssign
public static bool CanAssign(ModelItem source)
{
Contract.Requires(source != null);
return !CheckIsTask(source) &&
!CompositeService.GetParents(source).Any(m => m.GetTaskActivity() != null);
}
示例3: CanUnassign
public static bool CanUnassign(ModelItem source)
{
Contract.Requires(source != null);
var task = source.GetTaskActivity();
return task.Status != TaskActivityStatus.Editing;
}
示例4: DateTimeDesignerViewModel
public DateTimeDesignerViewModel(ModelItem modelItem)
: base(modelItem)
{
AddTitleBarHelpToggle();
TimeModifierTypes = new List<string>(DateTimeFormatter.TimeModifierTypes);
SelectedTimeModifierType = string.IsNullOrEmpty(TimeModifierType) ? TimeModifierTypes[0] : TimeModifierType;
}
示例5: CommandLineDesignerViewModel
public CommandLineDesignerViewModel(ModelItem modelItem)
: base(modelItem)
{
AddTitleBarLargeToggle();
AddTitleBarHelpToggle();
InitializeCommandPriorities();
}
示例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));
}
示例7: DateTimeDifferenceDesignerViewModel
public DateTimeDifferenceDesignerViewModel(ModelItem modelItem)
: base(modelItem)
{
AddTitleBarHelpToggle();
OutputTypes = new List<string>(DateTimeComparer.OutputFormatTypes);
SelectedOutputType = string.IsNullOrEmpty(OutputType) ? OutputTypes[0] : OutputType;
}
示例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));
}
}
示例9: SortRecordsDesignerViewModel
public SortRecordsDesignerViewModel(ModelItem modelItem)
: base(modelItem)
{
AddTitleBarHelpToggle();
SortOrderTypes = new List<string> { "Forward", "Backwards" };
SelectedSelectedSort = string.IsNullOrEmpty(SelectedSort) ? SortOrderTypes[0] : SelectedSort;
}
示例10: ActivityArgumentBinder
internal ActivityArgumentBinder(ModelItem activityModelItem)
{
Contract.Requires(activityModelItem != null);
this.activityModelItem = activityModelItem;
Init();
}
示例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);
}
示例12: RandomDesignerViewModel
public RandomDesignerViewModel(ModelItem modelItem)
: base(modelItem)
{
AddTitleBarHelpToggle();
RandomTypes = Dev2EnumConverter.ConvertEnumsTypeToStringList<enRandomType>();
SelectedRandomType = Dev2EnumConverter.ConvertEnumValueToString(RandomType);
}
示例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);
}
示例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;
}
示例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;
}
}