Exemple #1
0
		/// <summary>
		/// Brings up the form for entering namespace summaries.
		/// </summary>
		/// <remarks>
		/// Calls XmlDocumenter to build an XML file documenting the assemblies
		/// currently in the project.  This file is used to discover all of the
		/// namespaces currently being documented in case any new ones have been
		/// added.  A <see cref="System.Collections.Hashtable"/> with the namespace
		/// names as keys and any existing summaries as values is passed in to
		/// a form which allows editing of the namespace summaries.  If the ok button
		/// is selected in the form then the Hashtable becomes the main one used by
		/// NDoc and passed into documenters for building documentation.
		/// </remarks>
		/// <param name="sender">The sender (not used).</param>
		/// <param name="e">The event arguments (not used).</param>
		protected void namespaceSummariesButton_Click (object sender, System.EventArgs e)
		{
			NamespaceSummariesForm form;

			this.Cursor = Cursors.WaitCursor;
			try
			{
				ConfigureUIForBuild(true);

				IDocumenter documenter =
					(IDocumenter)project.Documenters[comboBoxDocumenters.SelectedIndex];

				string message = documenter.CanBuild(project, true);
				if (message != null)
				{
					MessageBox.Show(
						this,
						message,
						"NDoc",
						MessageBoxButtons.OK,
						MessageBoxIcon.Stop);

					return;
				}
				this.statusBarTextPanel.Text="refreshing namespace list from assemblies...";
				
				form = new NamespaceSummariesForm(project);
				form.StartPosition = FormStartPosition.CenterParent;

				this.statusBarTextPanel.Text="";
			}
			finally
			{
				ConfigureUIForBuild(false);
				this.Cursor = Cursors.Arrow;
			}

			form.ShowDialog(this);
		}
Exemple #2
0
		private void assemblyListControl_EditNamespaces(object sender, System.EventArgs e)
		{
			Debug.Assert( project.ActiveConfig != null );
			IDocumenter documenter = project.ActiveConfig.CreateDocumenter();

			string message = documenter.CanBuild(project, true);
			if ( message == null )
			{
				this.statusBarTextPanel.Text="refreshing namespace list from assemblies...";				
				using ( NamespaceSummariesForm form = new NamespaceSummariesForm( project ) )
				{
					form.StartPosition = FormStartPosition.CenterParent;
					this.statusBarTextPanel.Text = "";
					form.ShowDialog(this);		
				}
			}	
			else
			{
				MessageBox.Show( this, message, "NDoc", MessageBoxButtons.OK, MessageBoxIcon.Stop );
			}
		}