public ReportScopeNode() : base() { this.DisplayName = "Reports"; FormViewDescription view = new FormViewDescription(typeof(HostControl)); view.DisplayName = "Reports"; view.ViewType = typeof(SecureDeleteHost); this.ViewDescriptions.Add(view); this.ViewDescriptions.DefaultIndex = 0; }
/// <summary> /// Constructor /// </summary> public SelectionFormViewSnapIn() { // Create the root node this.RootNode = new ScopeNode(); this.RootNode.DisplayName = "Selection (FormView) Sample"; // Create a form view for the root node. FormViewDescription fvd = new FormViewDescription(); fvd.DisplayName = "Users (FormView)"; fvd.ViewType = typeof(SelectionFormView); fvd.ControlType = typeof(SelectionControl); // Attach the view to the root node this.RootNode.ViewDescriptions.Add(fvd); this.RootNode.ViewDescriptions.DefaultIndex = 0; }
/// <summary> /// Initializes a new instance of the <see cref="ServerScopeNode"/> class. /// </summary> public ServerScopeNode(IConfigurator configurator) { this.EnabledStandardVerbs = StandardVerbs.Refresh; this.Configurator = configurator; // Initialize View ViewDescriptions // Create a form view for the root node. FormViewDescription fvd = new FormViewDescription(); fvd.DisplayName = "(localhost) Home"; fvd.ViewType = typeof(ServerFormView); fvd.ControlType = typeof(ServerFeaturesControl); // Attach the view to the root node. this.ViewDescriptions.Add(fvd); this.ViewDescriptions.DefaultIndex = 0; }
public SecureDeleteScopeNode() : base() { this.DisplayName = "SecureDelete"; FormViewDescription view = new FormViewDescription(typeof(SummaryControl)); view.DisplayName = "Wipe"; view.ViewType = typeof(SummaryHost); this.ViewDescriptions.Add(view); this.ViewDescriptions.DefaultIndex = 0; }
/// <summary>Initializes the nodes and the views attached to each node in the SnapIn tree.</summary> private void InitializeNodes() { // Primary Node for the SnapIn. Create it, and then add it to the Parent Node which belongs // to Computer Management _snapInNode = new ScopeNode { DisplayName = "WMI Demo Snap-In", ImageIndex = SnapInShared.WmiDemoImage, SelectedImageIndex = SnapInShared.WmiDemoImage }; PrimaryNode.Children.Add(_snapInNode); // Node which contains a report view of all the tasks that are in the system ScopeNode taskListNode = new ScopeNode { DisplayName = "Tasks", ImageIndex = SnapInShared.TaskImage, SelectedImageIndex = SnapInShared.TaskImage }; _snapInNode.Children.Add(taskListNode); // View Description for the Task List MmcListViewDescription scheduledLvd = new MmcListViewDescription { DisplayName = "Scheduled Task List", ViewType = typeof(Views.TaskListView), Options = MmcListViewOptions.ExcludeScopeNodes }; taskListNode.ViewDescriptions.Add(scheduledLvd); taskListNode.ViewDescriptions.DefaultIndex = 0; // Node for the Web site Link ScopeNode htmlNode = new ScopeNode { DisplayName = "Web Site", ImageIndex = SnapInShared.WebsiteImage, SelectedImageIndex = SnapInShared.WebsiteImage }; _snapInNode.Children.Add(htmlNode); HtmlViewDescription htmlDesc = new HtmlViewDescription { DisplayName = "The Coding Monkey", Url = new Uri("http://www.thecodingmonkey.net") }; // attach the view and set it as the default to show htmlNode.ViewDescriptions.Add(htmlDesc); htmlNode.ViewDescriptions.DefaultIndex = 0; // Node for the "Performance" Pane ScopeNode perfNode = new ScopeNode { DisplayName = "Performance", ImageIndex = SnapInShared.Performance, SelectedImageIndex = SnapInShared.Performance }; _snapInNode.Children.Add(perfNode); FormViewDescription perfFvd = new FormViewDescription { DisplayName = "Performance", ViewType = typeof(Views.PerformanceCounterFormView), ControlType = typeof(Views.PerformanceCounterViewControl) }; perfNode.ViewDescriptions.Add(perfFvd); perfNode.ViewDescriptions.DefaultIndex = 0; }