Exemple #1
0
        void ShowProperties()

        {
            var frm = new AttributeTypeWindow(this.Entries[(int)this.SelectedNodes[0].Tag].attrType);

            if (SnapIn.Console.ShowDialog(frm) == DialogResult.OK)

            {
                UIErrorHelper.CheckedExec(delegate()

                {
                    (this.ScopeNode as VMDirSchemaAttributeBaseNode).ServerNode.ServerDTO.Connection.ModifyAttributeType(frm.AttributeModDTO);

                    (this.ScopeNode as VMDirSchemaAttributeBaseNode).ServerNode.ServerDTO.Connection.SchemaManager.RefreshSchema();

                    (this.ScopeNode as VMDirSchemaAttributeBaseNode).RefreshNode();

                    this.Refresh();

                    MMCDlgHelper.ShowMessage(VMDirSchemaConstants.ATTR_MODIFY_MESSAGE);
                });
            }
        }
Exemple #2
0
        public void AddNewAttribute()

        {
            var frm = new AttributeTypeWindow();

            if (MMCDlgHelper.ShowForm(frm))

            {
                UIErrorHelper.CheckedExec(delegate()

                {
                    this.ServerNode.ServerDTO.Connection.AddAttributeType(frm.AttributeDTO);

                    this.ServerNode.ServerDTO.Connection.SchemaManager.RefreshSchema();

                    this.RefreshNode();

                    this.ListView.Refresh();

                    MMCDlgHelper.ShowMessage(VMDirSchemaConstants.ATTR_ADD_MESSAGE);
                });
            }
        }