コード例 #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
            });
        }
コード例 #2
0
ファイル: CertsNode.cs プロジェクト: hugocurran/OSCA2
        internal CertsNode(CaControl info, CertStatus certStatus)
        {
            caInfo = info;
            status = certStatus;

            this.ImageIndex         = 3;
            this.SelectedImageIndex = 3;

            // Create the CaInfoContext instance for use by the ListView
            CaInfoContext context = new CaInfoContext(info)
            {
                certStatus = status
            };

            // Create a ListView for the node.
            MmcListViewDescription lvd = new MmcListViewDescription();

            lvd.DisplayName = caInfo.CAName;
            lvd.ViewType    = typeof(CertListView);
            lvd.Options     = MmcListViewOptions.ExcludeScopeNodes | MmcListViewOptions.SingleSelect;
            lvd.Tag         = context;

            this.ViewDescriptions.Add(lvd);
            this.ViewDescriptions.DefaultIndex = 0;

            Refresh();
        }
コード例 #3
0
ファイル: LicenseScopeNode.cs プロジェクト: alex765022/IBN
        /// <summary>
        /// Initializes a new instance of the <see cref="LicenseScopeNode"/> class.
        /// </summary>
        /// <param name="configurator">The configurator.</param>
        public LicenseScopeNode(IConfigurator configurator) : base(true)
        {
            this.Configurator = configurator;

            // Init View Params and Tag
            this.DataElementType    = DataElementType.License;
            this.DisplayName        = SnapInResources.ScopeNodeDispayName_License;
            this.Tag                = string.Empty;
            this.ImageIndex         = 20;
            this.SelectedImageIndex = 20;

            // Init Right Panel
            // Create a message view for the root node.
            MmcListViewDescription lvd = new MmcListViewDescription();

            lvd.DisplayName = SnapInResources.ScopeNodeDispayName_License;
            lvd.ViewType    = typeof(LicenseListView);
            //lvd.Options = MmcListViewOptions.ExcludeScopeNodes;

            this.ViewDescriptions.Add(lvd);
            this.ViewDescriptions.DefaultIndex = 0;

            // Init Actions
            this.EnabledStandardVerbs = StandardVerbs.Refresh;
        }
コード例 #4
0
        private void InitConsole()

        {
            this.EnabledStandardVerbs = StandardVerbs.Delete;

            this.ImageIndex = this.SelectedImageIndex = (int)VMDNSTreeImageIndex.Zone;



            this.ActionsPaneItems.Add(new Microsoft.ManagementConsole.Action(VMDNSConstants.ZONE_PROPERTIES,

                                                                             VMDNSConstants.ZONE_PROPERTIES, -1, ACTION_PROPERTIES));

            this.ActionsPaneItems.Add(new Microsoft.ManagementConsole.Action(VMDNSConstants.RECORD_ADD,

                                                                             VMDNSConstants.RECORD_ADD, -1, ACTION_RECORDADD));

            var lvd = new MmcListViewDescription();

            lvd.DisplayName = VMDNSConstants.RECORD_PROPERTIES;

            lvd.ViewType = typeof(DNSRecordListView);

            lvd.Options = MmcListViewOptions.ExcludeScopeNodes | MmcListViewOptions.SingleSelect;



            AddViewDescription(this, lvd);
        }
コード例 #5
0
        public ServicesManagerSnapIn()
        {
            // Load the images for the snap-in.
            // Both the LargeImages and SmallImages collections
            // should be populated with matching sets of images.

            Color transparentColor = Color.FromArgb(0, 255, 0);

            Bitmap bitmap = new Bitmap(typeof(ServicesManagerSnapIn).Assembly.GetManifestResourceStream("Microsoft.ManagementConsole.Samples.Images16.bmp"));

            this.SmallImages.TransparentColor = transparentColor;
            this.SmallImages.AddStrip(bitmap);

            bitmap = new Bitmap(typeof(ServicesManagerSnapIn).Assembly.GetManifestResourceStream("Microsoft.ManagementConsole.Samples.Images32.bmp"));
            this.LargeImages.TransparentColor = transparentColor;
            this.LargeImages.AddStrip(bitmap);

            // Create the root node
            this.RootNode             = new ScopeNode();
            this.RootNode.DisplayName = "- Services Manager Sample";

            // Create an MmcListView for the root node.
            MmcListViewDescription lvd = new MmcListViewDescription();

            lvd.DisplayName = "Services";
            lvd.ViewType    = typeof(ServicesListView);
            lvd.Options     = MmcListViewOptions.SingleSelect;

            RootNode.ViewDescriptions.Add(lvd);
            RootNode.ViewDescriptions.DefaultIndex = 0;
        }
コード例 #6
0
        public AppScopeNode(string applicationName)
        {
            if (SSOAppSnapIn.HasSecurityRights)
            {
                this.DisplayName = applicationName;

                // create list view
                MmcListViewDescription listViewDescription = new MmcListViewDescription();
                listViewDescription.DisplayName = applicationName;
                listViewDescription.ViewType    = typeof(AppFieldListView);
                listViewDescription.Options     = MmcListViewOptions.SingleSelect;

                // attach it to the node
                this.ViewDescriptions.Add(listViewDescription);
                this.ViewDescriptions.DefaultIndex = 0;

                // enable verbs
                this.EnabledStandardVerbs |= StandardVerbs.Delete;
                this.EnabledStandardVerbs |= StandardVerbs.Properties;
                this.EnabledStandardVerbs |= StandardVerbs.Refresh;
            }
            else
            {
                this.DisplayName = applicationName + " - No Access Rights!";
                MmcListViewDescription listViewDescription = new MmcListViewDescription();
                listViewDescription.DisplayName = applicationName + " - No Access Rights!";
                listViewDescription.Options     = MmcListViewOptions.HideSelection;
                this.ViewDescriptions.Add(listViewDescription);
            }
        }
コード例 #7
0
        void AddChildren()
        {
            var lvd = new MmcListViewDescription();

            lvd.DisplayName = "Certificate details";
            lvd.ViewType    = typeof(CertificateDetailsListView);

            var activeNode = new VMCACertsNode(ServerDTO);

            activeNode.DisplayName = "Active Certificates";
            activeNode.Tag         = CertificateState.Active;
            activeNode.ImageIndex  = activeNode.SelectedImageIndex = (int)VMCAImageIndex.ActiveCertificate;
            AddViewDescription(activeNode, lvd);

            var revokedNode = new VMCACertsNode(ServerDTO);

            revokedNode.DisplayName = "Revoked Certificates";
            revokedNode.Tag         = CertificateState.Revoked;
            revokedNode.ImageIndex  = revokedNode.SelectedImageIndex = (int)VMCAImageIndex.RevokedCertificate;
            AddViewDescription(revokedNode, lvd);

            var expiredNodes = new VMCACertsNode(ServerDTO);

            expiredNodes.DisplayName = "Expired Certificates";
            expiredNodes.Tag         = CertificateState.Expired;
            expiredNodes.ImageIndex  = expiredNodes.SelectedImageIndex = (int)VMCAImageIndex.ExpiredCertificate;
            AddViewDescription(expiredNodes, lvd);

            var personalNodes = new VMCAPersonalNode(ServerDTO);

            personalNodes.DisplayName = "Personal Certificates";
            personalNodes.ImageIndex  = personalNodes.SelectedImageIndex = (int)VMCAImageIndex.Certificate;
            this.Children.Add(personalNodes);
        }
コード例 #8
0
        private void AddViewDescription(ScopeNode node, MmcListViewDescription lvd)

        {
            node.ViewDescriptions.Add(lvd);

            node.ViewDescriptions.DefaultIndex = 0;
        }
コード例 #9
0
        /// <summary>
        /// Initializes a new instance of the <see cref="CompanyScopeNode"/> class.
        /// </summary>
        public CompanyScopeNode(ICompanyInfo companyInfo)
        {
            this.CompanyInfo = companyInfo;

            // Init Data
            LoadCompanyInfo();

            // Init Actions
            this.DataElementType      = DataElementType.Company;
            this.EnabledStandardVerbs = StandardVerbs.Delete | StandardVerbs.Refresh;

            this.StartAction = new SyncAction(SnapInResources.CompanyScopeNode_Action_Start_Name,
                                              SnapInResources.CompanyScopeNode_Action_Start_Description, 10);
            this.StopAction = new SyncAction(SnapInResources.CompanyScopeNode_Action_Stop_Name,
                                             SnapInResources.CompanyScopeNode_Action_Stop_Description, 11);
            this.ChangeDomainAction = new SyncAction(SnapInResources.CompanyScopeNode_Action_UpdateAddress_Name,
                                                     SnapInResources.CompanyScopeNode_Action_ChangeDomain_Description, 12);
            this.UpgradeAction = new SyncAction(SnapInResources.CompanyScopeNode_Action_Upgrade_Name,
                                                SnapInResources.CompanyScopeNode_Action_Upgrade_Description, 6);

            this.BrowseAction = new SyncAction(SnapInResources.CompanyScopeNode_Action_Browse_Name,
                                               SnapInResources.CompanyScopeNode_Action_Browse_Description, 16);

            this.EnableSchedulerServiceAction = new SyncAction(SnapInResources.CompanyScopeNode_Action_EnableSchedulerService_Name,
                                                               SnapInResources.CompanyScopeNode_Action_EnableSchedulerService_Description, 27);
            this.DisableSchedulerServiceAction = new SyncAction(SnapInResources.CompanyScopeNode_Action_DisableSchedulerService_Name,
                                                                SnapInResources.CompanyScopeNode_Action_DisableSchedulerService_Description, 28);

            this.ChangePortalPool = new SyncAction(SnapInResources.CompanyScopeNode_Action_ChangePortalPool_Name,
                                                   SnapInResources.CompanyScopeNode_Action_ChangePortalPool_Description, 29);

            this.ActionsPaneItems.Add(this.BrowseAction);
            this.ActionsPaneItems.Add(new ActionSeparator());
            this.ActionsPaneItems.Add(this.StartAction);
            this.ActionsPaneItems.Add(this.StopAction);
            this.ActionsPaneItems.Add(new ActionSeparator());
            this.ActionsPaneItems.Add(this.ChangeDomainAction);
            this.ActionsPaneItems.Add(this.ChangePortalPool);
            this.ActionsPaneItems.Add(this.UpgradeAction);
            this.ActionsPaneItems.Add(new ActionSeparator());

            // Not Implemented yet
            //this.UpgradeAction.Enabled = false;

            // Init view
            MmcListViewDescription lvd = new MmcListViewDescription();

            lvd.DisplayName = SnapInResources.CompanySettingsListView_DisplayName;
            lvd.ViewType    = typeof(CompanySettingsListView);
            lvd.Options     = MmcListViewOptions.ExcludeScopeNodes;

            // Attach the view to the root node
            this.ViewDescriptions.Add(lvd);
            this.ViewDescriptions.DefaultIndex = 0;

            // disable actions + Images
            RefreshCompanyStatus();
        }
コード例 #10
0
        void AddViewDescription()
        {
            MmcListViewDescription lvd = new MmcListViewDescription();

            lvd.DisplayName = DisplayName;
            lvd.ViewType    = typeof(DirectoryNodeDetailsView);
            lvd.Options     = MmcListViewOptions.ExcludeScopeNodes;

            this.ViewDescriptions.Add(lvd);
            this.ViewDescriptions.DefaultIndex = 0;
        }
コード例 #11
0
        void AddViewDescription()
        {
            var lvd = new MmcListViewDescription
            {
                DisplayName = "Certificate Details",
                ViewType    = typeof(CertificateDetailsListView),
                Options     = MmcListViewOptions.ExcludeScopeNodes
            };

            ViewDescriptions.Add(lvd);
            ViewDescriptions.DefaultIndex = 0;
        }
コード例 #12
0
        void InitNode()
        {
            MmcListViewDescription lvd = new MmcListViewDescription();

            lvd.DisplayName = "keypair details";
            lvd.ViewType    = typeof(KeyPairDetailListView);
            lvd.Options     = MmcListViewOptions.ExcludeScopeNodes;
            ViewDescriptions.Add(lvd);
            ViewDescriptions.DefaultIndex = 0;

            this.ActionsPaneItems.Add(new Microsoft.ManagementConsole.Action("Create Key Pair",
                                                                             "Create Key Pair", -1, ACTION_CREATE_KEY_PAIR));
        }
コード例 #13
0
        void InitNode()
        {
            MmcListViewDescription lvd = new MmcListViewDescription();

            lvd.DisplayName = "Certificate details";
            lvd.ViewType    = typeof(CertificateDetailsListView);
            lvd.Options     = MmcListViewOptions.ExcludeScopeNodes;
            ViewDescriptions.Add(lvd);
            ViewDescriptions.DefaultIndex = 0;

            this.ActionsPaneItems.Add(new Microsoft.ManagementConsole.Action("Create Self Signed Certificate",
                                                                             "Create Self Signed Certificate", -1, ACTION_CREATE_SELF_SIGNED_CERT));
        }
コード例 #14
0
ファイル: VMCACSRNode.cs プロジェクト: DhanashreeA/lightwave
        void InitNode()
        {
            var lvd = new MmcListViewDescription();

            lvd.DisplayName = "csr details";
            lvd.ViewType    = typeof(CSRDetailListView);
            lvd.Options     = MmcListViewOptions.ExcludeScopeNodes;
            ViewDescriptions.Add(lvd);
            ViewDescriptions.DefaultIndex = 0;

            this.ActionsPaneItems.Add(new Microsoft.ManagementConsole.Action("Create Signing Request",
                                                                             "Create Signing Request", -1, ACTION_CREATE_SIGNING_REQUEST));
        }
コード例 #15
0
ファイル: RecordsNode.cs プロジェクト: EbramTawfik/MdnsNet
        public RecordsNode(ManagementClient client)
        {
            this.DisplayName = "Records";

            MmcListViewDescription lvd = new MmcListViewDescription();

            lvd.DisplayName = "Records";
            lvd.ViewType    = typeof(RecordMmcListView);
            lvd.Options     = MmcListViewOptions.ExcludeScopeNodes;
            lvd.Tag         = client;

            this.ViewDescriptions.Add(lvd);
            this.ViewDescriptions.DefaultIndex = 0;
        }
コード例 #16
0
        void InitConsole()
        {
            this.ActionsPaneItems.Add(new Microsoft.ManagementConsole.Action(
                                          "Add Secret Key",
                                          "Add Secret Key",
                                          -1,
                                          ACTION_ADD_SECRET_KEY));
            var lvd = new MmcListViewDescription();

            lvd.DisplayName = "Secret key details";
            lvd.ViewType    = typeof(VecsSecretKeysListView);
            lvd.Options     = MmcListViewOptions.ExcludeScopeNodes;

            AddViewDescription(this, lvd);
        }
コード例 #17
0
        public VMCAServerNode(VMCAServerDTO dto) : base(dto)
        {
            this.DisplayName          = dto.Server;
            this.EnabledStandardVerbs = StandardVerbs.Delete | StandardVerbs.Refresh;

            this.ActionsPaneItems.Add(new Microsoft.ManagementConsole.Action("Login",
                                                                             "Login", -1, ACTION_LOGIN));
            ImageIndex = SelectedImageIndex = (int)VMCAImageIndex.Server;
            var lvd = new MmcListViewDescription();

            lvd.DisplayName = "dto.Server";
            lvd.ViewType    = typeof(MmcListView);
            this.ViewDescriptions.Add(lvd);
            this.ViewDescriptions.DefaultIndex = 0;
            PopulateChildren();
        }
コード例 #18
0
        void InitConsole()
        {
            this.ActionsPaneItems.Add(new Microsoft.ManagementConsole.Action(
                                          "Add Certificate",
                                          "Add Certificate",
                                          -1,
                                          ACTION_ADD_CERTIFICATE));

            var lvd = new MmcListViewDescription();

            lvd.DisplayName = "certificate details";
            lvd.ViewType    = typeof(VecsTrustedCertsListView);
            lvd.Options     = MmcListViewOptions.ExcludeScopeNodes;

            AddViewDescription(this, lvd);
        }
コード例 #19
0
        void InitConsole()
        {
            this.ActionsPaneItems.Add(new Microsoft.ManagementConsole.Action(
                                          "Add Private Entity",
                                          "Add Private Entity",
                                          -1,
                                          ACTION_ADD_PRIVATE_KEY));

            var lvd = new MmcListViewDescription();

            lvd.DisplayName = "Private entity details";
            lvd.ViewType    = typeof(VecsPrivateKeysListView);
            lvd.Options     = MmcListViewOptions.ExcludeScopeNodes;

            AddViewDescription(this, lvd);
        }
コード例 #20
0
        private void InitConsole()

        {
            this.ActionsPaneItems.Add(new Microsoft.ManagementConsole.Action(VMDNSConstants.ZONE_ADD_REVERSE, VMDNSConstants.ZONE_ADD_REVERSE, -1, ACTION_ADD_REVERSEZONE));

            this.ImageIndex = this.SelectedImageIndex = (int)VMDNSTreeImageIndex.ForwardReverseZones;

            var lvd = new MmcListViewDescription();

            lvd.DisplayName = VMDNSConstants.ZONES;

            lvd.ViewType = typeof(ZoneDetailsListview);

            lvd.Options = MmcListViewOptions.ExcludeScopeNodes | MmcListViewOptions.SingleSelect;

            AddViewDescription(this, lvd);
        }
コード例 #21
0
        /// <summary>
        /// Constructor
        /// </summary>
        public StandardVerbsSnapIn()
        {
            // Create the root node
            this.RootNode             = new ScopeNode();
            this.RootNode.DisplayName = "StandardVerbs Samples";

            // Create a message view for the root node.
            MmcListViewDescription lvd = new MmcListViewDescription();

            lvd.DisplayName = "Users (MmcListView)";
            lvd.ViewType    = typeof(StandardVerbsListView);
            lvd.Options     = MmcListViewOptions.ExcludeScopeNodes;

            // Attach the view to the root node
            this.RootNode.ViewDescriptions.Add(lvd);
            this.RootNode.ViewDescriptions.DefaultIndex = 0;
        }
コード例 #22
0
        private void InitConsole()

        {
            this.ActionsPaneItems.Add(new Microsoft.ManagementConsole.Action(VMDirSchemaConstants.VMDIRSCHEMA_PROPERTIES, VMDirSchemaConstants.VMDIRSCHEMA_PROPERTIES, -1, ACTION_SCHEMAPROPERTIES));

            this.ImageIndex = this.SelectedImageIndex = (int)VMDirSchemaTreeImageIndex.ObjectClass;

            var lvd = new MmcListViewDescription();

            lvd.DisplayName = VMDirSchemaConstants.VMDIRSCHEMA_CLASSES;

            lvd.ViewType = typeof(ClassAttributesListView);

            lvd.Options = MmcListViewOptions.ExcludeScopeNodes | MmcListViewOptions.SingleSelect;

            AddViewDescription(this, lvd);
        }
コード例 #23
0
        private void InitConsole()

        {
            this.ActionsPaneItems.Add(new Microsoft.ManagementConsole.Action(VMDirSchemaConstants.VMDIRSCHEMA_ADDATTRIBUTE, VMDirSchemaConstants.VMDIRSCHEMA_ADDATTRIBUTE, -1, ACTION_SCHEMA_ADDATTRIBUTE));

            this.ImageIndex = this.SelectedImageIndex = (int)VMDirSchemaTreeImageIndex.Attribute;

            var lvd = new MmcListViewDescription();

            lvd.DisplayName = "Attributes";

            lvd.ViewType = typeof(AttributesListView);

            lvd.Options = MmcListViewOptions.ExcludeScopeNodes | MmcListViewOptions.SingleSelect;

            AddViewDescription(this, lvd);
        }
コード例 #24
0
        /// <summary>
        /// Constructor for snapin
        /// </summary>
        public ActionsSnapIn()
        {
            // Create the root node
            this.RootNode             = new ActionScopeNode();
            this.RootNode.DisplayName = "Actions Sample";
            this.RootNode.ImageIndex  = 0;

            // Create a message view for the root node.
            MmcListViewDescription lvd = new MmcListViewDescription();

            lvd.DisplayName = "Users (MmcListView)";
            lvd.ViewType    = typeof(ActionListView);
            lvd.Options     = MmcListViewOptions.ExcludeScopeNodes | MmcListViewOptions.AllowUserInitiatedModeChanges;

            // Attach the view to the root node
            this.RootNode.ViewDescriptions.Add(lvd);
            this.RootNode.ViewDescriptions.DefaultIndex = 0;
        }
コード例 #25
0
        /// <summary>
        /// Constructot
        /// </summary>
        public DragDropSnapIn()
        {
            // Create the root node
            this.RootNode             = new ScopeNode();
            this.RootNode.DisplayName = "DragDrop Sample";
            this.RootNode.ImageIndex  = 0;

            // Create a message view for the root node.
            MmcListViewDescription lvd = new MmcListViewDescription();

            lvd.DisplayName = "Users (MmcListView)";
            lvd.ViewType    = typeof(DragDropListView);
            lvd.Options     = MmcListViewOptions.ExcludeScopeNodes;

            // Attach the view to the root node
            this.RootNode.ViewDescriptions.Add(lvd);
            this.RootNode.ViewDescriptions.DefaultIndex = 0;
        }
コード例 #26
0
        /// <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;
        }
コード例 #27
0
        public AppRootScopeNode()
        {
            this.DisplayName = Properties.Resources.EnterpriseSSO;

            // create the list view for the node
            MmcListViewDescription listViewDescription = new MmcListViewDescription();

            listViewDescription.DisplayName = "Enterprise Single Sign-On Config Store";
            listViewDescription.ViewType    = typeof(AppListView);
            listViewDescription.Options     = MmcListViewOptions.ExcludeScopeNodes;

            // attach the view to the node
            this.ViewDescriptions.Add(listViewDescription);
            this.ViewDescriptions.DefaultIndex = 0;

            // attach to view events
            SSOListView.ListViewChanged += SSOListView_ListViewChanged;

            // enable verbs
            this.EnabledStandardVerbs |= StandardVerbs.Refresh;
        }
コード例 #28
0
        /// <summary>
        /// Constructor
        /// </summary>
        public SelectionListviewSnapIn()
        {
            // Create the root node
            this.RootNode             = new ScopeNode();
            this.RootNode.DisplayName = "Selection (MmcListView) Sample";

            // Create a message view for the root node.
            MmcListViewDescription lvd = new MmcListViewDescription();

            lvd.DisplayName = "Users (MmcListView)";
            lvd.ViewType    = typeof(SelectionListView);
            lvd.Options     = MmcListViewOptions.ExcludeScopeNodes;

            // Attach the view to the root node
            this.RootNode.ViewDescriptions.Add(lvd);
            this.RootNode.ViewDescriptions.DefaultIndex = 0;

            this.RootNode.Children.Add(new ScopeNode());
            this.RootNode.Children.Add(new ScopeNode());
            this.RootNode.Children.Add(new ScopeNode());
            this.RootNode.Children.Add(new ScopeNode());
        }
コード例 #29
0
        public ProfilesNode(CaControl info)
        {
            caInfo                    = info;
            this.ImageIndex           = 6;
            this.SelectedImageIndex   = 6;
            this.EnabledStandardVerbs = StandardVerbs.Refresh;

            // Create a list view for the node.
            this.ViewDescriptions.Clear();
            lvd = null;

            // Create a list view for the node.
            lvd             = new MmcListViewDescription();
            lvd.DisplayName = caInfo.CAName;
            lvd.ViewType    = typeof(ProfilesListView);
            lvd.Options     = MmcListViewOptions.ExcludeScopeNodes | MmcListViewOptions.SingleSelect;
            lvd.Tag         = caInfo;


            // Attach the view to the node
            this.ViewDescriptions.Add(lvd);
            this.ViewDescriptions.DefaultIndex = 0;
        }
コード例 #30
0
ファイル: CompaniesScopeNode.cs プロジェクト: alex765022/IBN
        /// <summary>
        /// Initializes a new instance of the <see cref="CompaniesScopeNode"/> class.
        /// </summary>
        public CompaniesScopeNode(IConfigurator configurator)
        {
            this.Configurator = configurator;

            // Init View Params and Tag
            this.DataElementType    = DataElementType.Companies;
            this.DisplayName        = SnapInResources.ScopeNodeDispayName_Companies;
            this.Tag                = string.Empty;
            this.ImageIndex         = 3;
            this.SelectedImageIndex = 3;

            // Init Right Panel
            // Create a message view for the root node.
            MmcListViewDescription lvd = new MmcListViewDescription();

            lvd.DisplayName = SnapInResources.ScopeNodeDispayName_Companies;
            lvd.ViewType    = typeof(CompanyListView);
            //lvd.Options = MmcListViewOptions.SingleSelect;

            this.ViewDescriptions.Add(lvd);
            this.ViewDescriptions.DefaultIndex = 0;

            // Init Actions
            this.EnabledStandardVerbs = StandardVerbs.Refresh;

            this.CreateNewCompany = new SyncAction(SnapInResources.CompaniesScopeNode_Action_Create_Name,
                                                   SnapInResources.CompaniesScopeNode_Action_Create_Description, 8);
            this.CreateNewCompanyForDatabase = new SyncAction(SnapInResources.CompaniesScopeNode_Action_CreateForDatabase_Name,
                                                              SnapInResources.CompaniesScopeNode_Action_CreateForDatabase_Description, 31);


            this.ActionsPaneItems.Add(this.CreateNewCompany);
            this.ActionsPaneItems.Add(this.CreateNewCompanyForDatabase);

            // Read Copmpanies From Config
            Refresh();
        }