示例#1
0
 public ResourceList()
 {
     this.root            = (ResourceVirtualizingTreeItem) new ResourceContainerItem();
     this.root.IsExpanded = true;
     this.flattener       = new VirtualizingTreeItemFlattener <ResourceVirtualizingTreeItem>((ITreeViewItemProvider <ResourceVirtualizingTreeItem>) this);
     this.categories      = new Dictionary <string, ResourceTypeItem>();
 }
示例#2
0
 public AssetView()
 {
     this.TreeFlattener       = new VirtualizingTreeItemFlattener <AssetCategory>((ITreeViewItemProvider <AssetCategory>) this);
     this.DataContextChanged += new DependencyPropertyChangedEventHandler(this.AssetView_DataContextChanged);
     this.IsVisibleChanged   += new DependencyPropertyChangedEventHandler(this.AssetView_IsVisibleChanged);
     this.InitializeComponent();
     this.AssetFilter = (IAssetFilter) new DefaultAssetViewFilter();
 }
示例#3
0
 protected ClrObjectDialogBase()
 {
     this.root             = (FilteredTreeItem) new ProjectAssembliesItem();
     this.root.IsExpanded  = true;
     this.flattener        = new VirtualizingTreeItemFlattener <FilteredTreeItem>((ITreeViewItemProvider <FilteredTreeItem>) this);
     this.selectionContext = (Microsoft.Expression.DesignSurface.UserInterface.DataPane.SelectionContext <TypeItem>) new SingleSelectionContext <TypeItem>();
     this.selectionContext.PropertyChanged += new PropertyChangedEventHandler(this.SelectionContextPropertyChanged);
     this.SizeToContent = SizeToContent.Width;
     this.MinHeight     = 600.0;
     this.MinWidth      = 400.0;
     this.Height        = 600.0;
 }
示例#4
0
 public SchemaItem(ISchema schema, DataPanelModel model, SelectionContext <DataModelItemBase> selectionContext)
 {
     this.model = model;
     this.itemSelectionContext = selectionContext ?? (SelectionContext <DataModelItemBase>) new SingleSelectionContext <DataModelItemBase>();
     this.itemSelectionContext.PropertyChanged += new PropertyChangedEventHandler(this.itemSelectionContext_PropertyChanged);
     this.schema    = schema;
     this.flattener = new VirtualizingTreeItemFlattener <DataModelItemBase>((ITreeViewItemProvider <DataModelItemBase>) this);
     if (this.schema.Root != null)
     {
         DataSchemaNodePath nodePath = new DataSchemaNodePath(this.schema, this.schema.Root);
         this.itemSelectionContext.Clear();
         this.ClearSchemaItemTree(this.root);
         this.root = new DataSchemaItem(nodePath, this, this.model, this.itemSelectionContext);
         this.root.EnsureChildrenExpanded();
     }
     this.OnPropertyChanged("Root");
     this.flattener.RebuildList();
 }
示例#5
0
        public ProjectPane(IServiceProvider serviceProvider)
        {
            this.root = new RootHierarchicalNode(this)
            {
                IsExpanded = true
            };
            this.flattener            = new VirtualizingTreeItemFlattener <HierarchicalNode>(this, false);
            this.projectInsertion     = this.root;
            this.filterTimer          = new DispatcherTimer();
            this.filterTimer.Tick    += new EventHandler(this.filterTimer_Tick);
            this.filterTimer.Interval = new TimeSpan(0, 0, 0, 0, 500);
            this.serviceProvider      = serviceProvider;
            ProjectManager projectManager = this.Services.ProjectManager() as ProjectManager;

            if (projectManager != null)
            {
                projectManager.SolutionOpened   += new EventHandler <SolutionEventArgs>(this.ProjectManager_SolutionOpened);
                projectManager.SolutionClosing  += new EventHandler <SolutionEventArgs>(this.ProjectManager_SolutionClosing);
                projectManager.SolutionClosed   += new EventHandler <SolutionEventArgs>(this.ProjectManager_SolutionClosed);
                projectManager.SolutionMigrated += new EventHandler <SolutionEventArgs>(this.ProjectManager_SolutionMigrated);
                projectManager.ItemSelectionSet.SelectionChanged += new EventHandler(this.ItemSelectionSet_SelectionChanged);
            }
            int num = 0;

            IDocumentType[] unknownDocumentType = new IDocumentType[this.Services.DocumentTypes().Count + 1];
            foreach (IDocumentType documentType in this.Services.DocumentTypes())
            {
                int num1 = num;
                num = num1 + 1;
                unknownDocumentType[num1] = documentType;
            }
            unknownDocumentType[num] = this.Services.DocumentTypes().UnknownDocumentType;
            this.dropUtility         = new FileDropUtility(projectManager, this, unknownDocumentType);
            this.Services.ViewService().ActiveViewChanged += new ViewChangedEventHandler(this.ViewService_ActiveViewChanged);
            this.commandTarget = new ProjectPane.ProjectUserInterfaceCommandTarget(this);
            this.Services.CommandService().AddTarget(this.commandTarget);
            SourceControlStatusCache.StatusUpdated += new EventHandler(this.SourceControlStatusCache_StatusUpdated);
        }
示例#6
0
 public CreateProjectDialog(IEnumerable <IProjectTemplate> creatableProjectTemplates, ITemplateManager templateManager, string title, string defaultProjectPath, bool willCreateNewSolution, IServiceProvider services)
 {
     this.InitializeComponent();
     this.services                        = services;
     base.Style                           = (Style)base.Resources["CreateProjectDialogStyle"];
     this.TemplateManager                 = templateManager;
     this.defaultProjectPath              = defaultProjectPath;
     this.projectPath                     = defaultProjectPath;
     this.creatableProjectTemplates       = creatableProjectTemplates;
     base.Activated                      += new EventHandler(this.OnCreateProjectDialogActivated);
     this.willCreateNewSolution           = willCreateNewSolution;
     this.pathValidator                   = new MessageBubbleValidator <string, TextChangedEventArgs>(() => this.PathTextBox.Text, new Func <string, string>(ProjectPathHelper.ValidatePath));
     this.projectPathMessageBubble        = new MessageBubbleHelper(this.PathTextBox, this.pathValidator);
     this.PathTextBox.TextChanged        += new TextChangedEventHandler(this.pathValidator.EventHook);
     this.nameValidator                   = new MessageBubbleValidator <string, TextChangedEventArgs>(() => this.NameTextBox.Text, new Func <string, string>(ProjectPathHelper.ValidateProjectFileName));
     this.projectNameMessageBubble        = new MessageBubbleHelper(this.NameTextBox, this.nameValidator);
     this.NameTextBox.TextChanged        += new TextChangedEventHandler(this.nameValidator.EventHook);
     this.solutionValidator               = new MessageBubbleValidator <string, TextChangedEventArgs>(() => this.SolutionPathFileName, new Func <string, string>(ProjectPathHelper.ValidateNewSolutionPathFileName));
     this.solutionMessageBubble           = new MessageBubbleHelper(this.NameTextBox, this.solutionValidator);
     this.NameTextBox.TextChanged        += new TextChangedEventHandler(this.solutionValidator.EventHook);
     base.Title                           = title;
     base.SizeToContent                   = SizeToContent.Height;
     base.Width                           = 550;
     base.DataContext                     = this;
     this.projectTemplateCategoryTreeRoot = new ProjectTemplateCategoryTreeItem(string.Empty, creatableProjectTemplates, this)
     {
         IsExpanded = true
     };
     this.projectTemplateCategoryFlattener           = new VirtualizingTreeItemFlattener <ProjectTemplateCategoryTreeItem>(this);
     this.projectTemplateCategorySelection           = this.projectTemplateCategoryTreeRoot;
     this.IsCategoryTreeVisible                      = false;
     this.projectTemplateCategoryTreeRoot.IsSelected = true;
     this.UpdateLanguageList();
     this.OnPropertyChanged("LicenseButtonCommand");
     this.OnPropertyChanged("LicenseButtonText");
     this.LicenseStatusBarBorder.Visibility = (this.ProjectTemplate == null || LicensingHelper.ProjectLicense(this.ProjectTemplate, this.services).FullyLicensed ? Visibility.Collapsed : Visibility.Visible);
 }