/// <summary> /// Constructor for the page. /// </summary> public ScopePropertyPage(SampleScopeNode parentScopeNode) { // save scope node parent scopeNode = parentScopeNode; // setup property page container stuff this.Title = "Scope Node Property Page"; // setup contained control and hand it a reference to its parent (This propertypage) scopePropertiesControl = new ScopePropertiesControl(this); this.Control = scopePropertiesControl; }
/// <summary> /// Constructor /// </summary> public PropertySheetSnapIn() { // snap-in node ScopeNode scopeNode = new SampleScopeNode(); scopeNode.DisplayName = "Property Sheet Sample"; this.RootNode = scopeNode; this.RootNode.EnabledStandardVerbs = StandardVerbs.Properties; // snap-in result list view 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; }
/// <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; }
/// <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; }