object GetObjectKey(ViewShortcut shortcut, Type type, IObjectSpace objectSpace) { var objectKey = GetObjectKey(objectSpace, type, shortcut); if (objectKey != null) { return(objectKey); } return(shortcut.ObjectKey.StartsWith("@") ? ParametersFactory.CreateParameter(shortcut.ObjectKey.Substring(1)).CurrentValue : CriteriaWrapper.ParseCriteriaWithReadOnlyParameters(shortcut.ObjectKey, type)); }
public SourcesParametersPickerViewModel() { Sources = new ObservableCollection <IAbstractDataSource>(SourcesDirector.Instance.AllDataSources); Parameters = new ObservableCollection <AbstractParameter>( ParametersFactory.KnownParameterTypesNames.Select(type => ParametersFactory.CreateParameter(type, 1))); CheckedSources.CollectionChanged += (s, e) => { if (!_sourceListManualAdding) { if (CheckedSources.Count == Sources.Count) { IsAllSourcesChecked = true; // consider CheckedSources may contain only elements of Sources } else { IsAllSourcesChecked = false; } } }; CheckedParameters.CollectionChanged += (s, e) => { if (!_sourceListManualAdding) { if (CheckedParameters.Count == Parameters.Count) { IsAllParametersChecked = true; // consider CheckedParameters may contain only elements of Parameters } else { IsAllParametersChecked = false; } } }; IsAllSourcesChecked = false; IsAllParametersChecked = false; }