示例#1
0
        /// <summary>
        ///
        /// </summary>
        /// <param name="policyDocument"></param>
        public PolicyDocument(pol.PolicyDocumentReadWrite policyDocument)
        {
            _policyDocument = policyDocument;

            this.Text = "Policy Document";

            if (_policyDocument.Policy != null)
            {
                this.Nodes.Add(new Policy(_policyDocument.Policy));
            }
            else if (_policyDocument.PolicySet != null)
            {
                this.Nodes.Add(new PolicySet(_policyDocument.PolicySet));
            }
            this.Expand();
        }
示例#2
0
		/// <summary>
		/// 
		/// </summary>
		/// <param name="policyDocument"></param>
		public PolicyDocument( pol.PolicyDocumentReadWrite policyDocument )
		{
			_policyDocument = policyDocument;

			this.Text = "Policy Document";

			if( _policyDocument.Policy != null )
			{
				this.Nodes.Add( new Policy( _policyDocument.Policy ) );
			}
			else if( _policyDocument.PolicySet != null )
			{
				this.Nodes.Add( new PolicySet( _policyDocument.PolicySet ) );
			}
			this.Expand();
		}
示例#3
0
		/// <summary>
		/// Creates a new policy document
		/// </summary>
		/// <param name="sender">The mainTree control.</param>
		/// <param name="args">The arguements for the event.</param>
		private void CreatePolicyDocument( object sender, EventArgs args )
		{
			// Create a new policydocument
			pol.PolicyDocumentReadWrite newPolicyDoc = new pol.PolicyDocumentReadWrite(XacmlVersion.Version11 ); //TODO: check version

			newPolicyDoc.Namespaces.Add(string.Empty, Namespaces.Policy);
			newPolicyDoc.Namespaces.Add("xsi", Namespaces.Xsi);
			PolicyDocument newNode = new PolicyDocument(newPolicyDoc);
			mainTree.Nodes.Add(newNode);
			docType = DocumentType.Policy;
			
			newNode.NodeFont = new Font( mainTree.Font, FontStyle.Bold );
			menuItem2.Enabled = false;
			menuItem5.Enabled = false;
			menuItem3.Enabled = true;
			menuItem9.Enabled = true;
			menuItem8.Enabled = true;
			menuItem7.Enabled = false;
		}