public RedisCacheDesignerViewModel(ModelItem modelItem, IServer server, IShellViewModel shellViewModel) : base(modelItem) { VerifyArgument.IsNotNull("environmentModel", server); _server = server; VerifyArgument.IsNotNull("shellViewModel", shellViewModel); _shellViewModel = shellViewModel; AddTitleBarLargeToggle(); ShowLarge = true; var dataFunc = modelItem.Properties["ActivityFunc"]?.ComputedValue as ActivityFunc <string, bool>; ActivityFuncDisplayName = dataFunc?.Handler == null ? "" : dataFunc?.Handler?.DisplayName; var type = dataFunc?.Handler?.GetType(); if (type != null) { ActivityFuncIcon = ModelItemUtils.GetImageSourceForToolFromType(type); } RedisSources = new ObservableCollection <RedisSource>(); LoadRedisSources(); EditRedisSourceCommand = new RelayCommand(o => EditRedisSource(), o => IsRedisSourceSelected); NewRedisSourceCommand = new RelayCommand(o => NewRedisSource()); if (modelItem.Properties["Key"]?.ComputedValue != null) { Key = modelItem.Properties["Key"]?.ComputedValue.ToString(); } if (modelItem.Properties["TTL"]?.ComputedValue != null) { TTL = int.Parse(modelItem.Properties["TTL"]?.ComputedValue.ToString()); } HelpText = Warewolf.Studio.Resources.Languages.HelpText.Tool_Database_RedisCache; }
public ManualResumptionViewModel(ModelItem modelItem) : base(modelItem) { AddTitleBarLargeToggle(); HelpText = Warewolf.Studio.Resources.Languages.HelpText.Tool_Flow_ManualResumption; var overrideDataFunc = modelItem.Properties["OverrideDataFunc"]?.ComputedValue as ActivityFunc <string, bool>; DataFuncDisplayName = overrideDataFunc?.Handler == null ? "" : overrideDataFunc?.Handler?.DisplayName; var type = overrideDataFunc?.Handler?.GetType(); if (type != null) { DataFuncIcon = ModelItemUtils.GetImageSourceForToolFromType(type); } }
public SelectAndApplyDesignerViewModel(ModelItem modelItem) : base(modelItem) { AddTitleBarLargeToggle(); HelpText = Warewolf.Studio.Resources.Languages.HelpText.Tool_LoopConstruct_Select_and_Apply; var dataFunc = modelItem.Properties["ApplyActivityFunc"]?.ComputedValue as ActivityFunc <string, bool>; DataFuncDisplayName = dataFunc?.Handler == null ? "" : dataFunc?.Handler?.DisplayName; var type = dataFunc?.Handler?.GetType(); if (type != null) { DataFuncIcon = ModelItemUtils.GetImageSourceForToolFromType(type); } }
public ForeachDesignerViewModel(ModelItem modelItem) : base(modelItem) { ForeachTypes = Dev2EnumConverter.ConvertEnumsTypeToStringList <enForEachType>(); SelectedForeachType = Dev2EnumConverter.ConvertEnumValueToString(ForEachType); AddTitleBarLargeToggle(); HelpText = Warewolf.Studio.Resources.Languages.HelpText.Tool_LoopConstruct_For_Each; var dataFunc = modelItem.Properties["DataFunc"]?.ComputedValue as ActivityFunc <string, bool>; DataFuncDisplayName = dataFunc?.Handler == null ? "" : dataFunc?.Handler?.DisplayName; var type = dataFunc?.Handler?.GetType(); if (type != null) { DataFuncIcon = ModelItemUtils.GetImageSourceForToolFromType(type); } }
public SuspendExecutionDesignerViewModel(ModelItem modelItem) : base(modelItem) { SuspendOptions = Dev2EnumConverter.ConvertEnumsTypeToStringList <enSuspendOption>(); SelectedSuspendOption = SuspendOption.GetDescription(); AddTitleBarLargeToggle(); HelpText = Warewolf.Studio.Resources.Languages.HelpText.Tool_Flow_SuspendExecution; var saveDataFunc = modelItem.Properties["SaveDataFunc"]?.ComputedValue as ActivityFunc <string, bool>; DataFuncDisplayName = saveDataFunc?.Handler == null ? "" : saveDataFunc?.Handler?.DisplayName; var type = saveDataFunc?.Handler?.GetType(); if (type != null) { DataFuncIcon = ModelItemUtils.GetImageSourceForToolFromType(type); } }