示例#1
0
		/// <summary>
		/// 
		/// </summary>
		/// <param name="context"></param>
		public Context( con.ContextDocumentReadWrite context )
		{
			_context = context;

			this.Text = "Context Document";
			this.SelectedImageIndex = 0;
			this.ImageIndex = 0;

			if( _context.Request != null )
			{
				this.Nodes.Add( new Request( _context.Request ) );
			}
			this.ExpandAll();
		}
示例#2
0
        /// <summary>
        ///
        /// </summary>
        /// <param name="context"></param>
        public Context(con.ContextDocumentReadWrite context)
        {
            _context = context;

            this.Text = "Context Document";
            this.SelectedImageIndex = 0;
            this.ImageIndex         = 0;

            if (_context.Request != null)
            {
                this.Nodes.Add(new Request(_context.Request));
            }
            this.ExpandAll();
        }
示例#3
0
		/// <summary>
		/// Creates a new context document
		/// </summary>
		/// <param name="sender">The mainTree control.</param>
		/// <param name="args">THe arguements for the event.</param>
		private void CreateContextDocument( object sender, EventArgs args )
		{
			// Create a new policydocument
			con.ContextDocumentReadWrite newContext = new con.ContextDocumentReadWrite( ); //TODO: check version

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