Exemple #1
0
        /// <summary>
        /// The constructor.
        /// </summary>
        public SimpleSnapIn()
        {
            // Update tree pane with a node in the tree
            ScopeNode scopeNode = new SampleScopeNode();

            scopeNode.DisplayName = "Hello World";
            this.RootNode         = scopeNode;
            this.RootNode.EnabledStandardVerbs = StandardVerbs.Properties;

            // Create result list view for the snap-in.
            MmcListViewDescription mmcListViewDescription = new MmcListViewDescription();

            mmcListViewDescription.DisplayName = "User List with Properties";
            mmcListViewDescription.ViewType    = typeof(UserListView);
            mmcListViewDescription.Options     = MmcListViewOptions.SingleSelect;
            scopeNode.ViewDescriptions.Add(mmcListViewDescription);
            scopeNode.ViewDescriptions.DefaultIndex = 0;
            this.RootNode.Children.Add(new SampleScopeNode()
            {
                DisplayName = "Node1", EnabledStandardVerbs = StandardVerbs.Properties
            });
            this.RootNode.Children.Add(new SampleScopeNode()
            {
                DisplayName = "Node2", EnabledStandardVerbs = StandardVerbs.Properties
            });
            this.RootNode.Children.Add(new SampleScopeNode()
            {
                DisplayName = "Node3", EnabledStandardVerbs = StandardVerbs.Properties
            });
            this.RootNode.Children.Add(new SampleScopeNode()
            {
                DisplayName = "Node4", EnabledStandardVerbs = StandardVerbs.Properties
            });
        }
        public ScopePropertyPage(SampleScopeNode parentScopeNode)
        {
            scopeNode = parentScopeNode;

            // Assign a title.
            this.Title = "Scope Node Property Page";

            // Set up the contained control and assign it a reference to its parent.
            scopePropertiesControl = new ScopePropertiesControl(this);
            this.Control           = scopePropertiesControl;
        }
Exemple #3
0
 /// <summary>
 /// Update the node with the controls values
 /// </summary>
 /// <param name="scopeNode">Node being updated by property page</param>
 public void UpdateData(SampleScopeNode scopeNode)
 {
     scopeNode.DisplayName   = this.DisplayName.Text;
     scopePropertyPage.Dirty = false;
 }
Exemple #4
0
 /// <summary>
 /// Populate control values from the SelectionObject (set in UserListView.SelectionOnChanged)
 /// </summary>
 public void RefreshData(SampleScopeNode scopeNode)
 {
     this.DisplayName.Text   = scopeNode.DisplayName;
     scopePropertyPage.Dirty = false;
 }