コード例 #1
0
ファイル: SchemaItem.cs プロジェクト: radtek/Shopdrawing
 public void ClearDataSchemaItemFilter()
 {
     if (this.root != null)
     {
         this.ClearDataSchemaItemFilter(this.root);
     }
     this.lastFilter = (DataSchemaItemFilter)null;
 }
コード例 #2
0
ファイル: SchemaItem.cs プロジェクト: radtek/Shopdrawing
 public void SetDataSchemaItemFilter(DataSchemaItemFilter filter)
 {
     this.lastFilter = filter;
     if (this.root == null)
     {
         return;
     }
     this.SetDataSchemaItemFilter(this.root);
 }
コード例 #3
0
 public DataSourceBindingSourceModel(DataPanelModel model, DataSchemaItemFilter dataSchemaFilter)
 {
     this.model = model;
     this.Model.PropertyChanged          += new PropertyChangedEventHandler(this.Model_PropertyChanged);
     this.dataSchemaFilter                = dataSchemaFilter;
     this.dataSources                     = new ObservableCollection <DataSourceItem>();
     this.dataSourcesView                 = CollectionViewSource.GetDefaultView((object)this.dataSources);
     this.dataSourcesView.CurrentChanged += new EventHandler(this.DataSourcesView_CurrentChanged);
     this.RefreshDataSources();
 }
コード例 #4
0
        public ElementPropertyBindingSourceModel(SceneNode targetElement, DataSchemaItemFilter dataSchemaFilter)
        {
            this.selectionContext = (SelectionContext <ElementNode>) new SingleSelectionContext <ElementNode>();
            this.selectionContext.PropertyChanged += new PropertyChangedEventHandler(this.selectionContext_PropertyChanged);
            this.root             = this.BuildTree((SceneElement)targetElement.ViewModel.ActiveEditingContainer, targetElement.ViewModel.BindingEditor);
            this.root.IsExpanded  = true;
            this.dataSchemaFilter = dataSchemaFilter;
            ElementNode elementNode = this.root.FindDescendantSceneNode(targetElement) ?? (ElementNode)this.root;

            if (!elementNode.IsSelectable)
            {
                return;
            }
            elementNode.ExpandAncestors();
            this.selectionContext.SetSelection(elementNode);
        }
コード例 #5
0
 public void SetFilter(DataSchemaItemFilter filter)
 {
     this.filter = filter;
     this.RefreshFilter();
 }
コード例 #6
0
        internal ExplicitDataContextBindingSourceModel(SceneNode targetElement, ReferenceStep targetProperty, DataSchemaItemFilter dataSchemaFilter)
        {
            this.schema     = SchemaManager.GetSchemaForDataSourceInfo(new DataContextEvaluator().Evaluate(targetElement, (IPropertyId)targetProperty, true).DataSource);
            this.schemaItem = new SchemaItem(this.schema);
            DataSchemaNodePath nodePathFromPath = this.schema.GetNodePathFromPath((string)null);

            if (nodePathFromPath != null && nodePathFromPath.Node != null)
            {
                this.schemaItem.SelectedItem = this.schemaItem.FindDataSchemaItemForNode(nodePathFromPath);
            }
            this.schemaItem.SetDataSchemaItemFilter(dataSchemaFilter);
            this.schemaItem.PropertyChanged += new PropertyChangedEventHandler(this.schemaItem_PropertyChanged);
            if (this.schema is EmptySchema || this.schemaItem.Root == null)
            {
                return;
            }
            this.schemaItem.Root.IsExpanded = true;
        }