Click here to Skip to main content
Click here to Skip to main content
Articles » Languages » C# » General » Downloads
 
Add your own
alternative version

100% Reflective Class Diagram Creation Tool

, 14 Jun 2011
100% Reflective Class Diagram Creation Tool
autodiagramer.zip
AutoDiagramer
AutoDiagramer
AutoDiagramer.csproj.user
AutoDiagramer_TemporaryKey.pfx
bin
Debug
AutoDiagramer.application
AutoDiagramer.exe
AutoDiagramer.exe.manifest
AutoDiagramer.pdb
AutoDiagramer.publish
AutoDiagramer.application
AutoDiagramer_1_7_0_0
AutoDiagramer.exe.deploy
AutoDiagramer.exe.manifest
np.ico.deploy
setup.exe
AutoDiagramer.vshost.application
AutoDiagramer.vshost.exe
AutoDiagramer.vshost.exe.manifest
Controls
Forms
Helpers
images
about16.png
AboutImg.png
BannerImg.png
Collapse9.png
Constructors16.png
Draw16.png
edging.png
Events16.png
Exit16.png
Expand9.png
Fields16.png
help16.gif
HideTree.png
HideTree16.png
Interfaces16.png
MainCollapse13.png
MainExpand13.png
Method16.png
open16.png
print16.png
Prop16.png
Prop33.png
save16.png
SaveImg.png
Setting16.png
SettingImg.png
ShowTree.png
ShowTree16.png
Thumbs.db
TreeCode.png
TreeLeaf.png
TreeRoot.png
View16.png
np.ico
obj
Debug
AutoDiagramer.application
AutoDiagramer.csproj.GenerateResource.Cache
AutoDiagramer.exe
AutoDiagramer.exe.manifest
AutoDiagramer.frmAbout.resources
AutoDiagramer.frmMain.resources
AutoDiagramer.frmSave.resources
AutoDiagramer.frmSettings.resources
AutoDiagramer.frmZoom.resources
AutoDiagramer.InputBoxDialog.resources
AutoDiagramer.pdb
AutoDiagramer.Properties.Resources.resources
AutoDiagramer.Resource1.resources
AutoDiagramer.ucExpander.resources
ClassDiagFromAssembly.csproj.GenerateResource.Cache
Refactor
TempPE
Properties.Resources.Designer.cs.dll
Resource1.Designer.cs.dll
Printing
Properties
Settings.settings
Thumbs.db
autodiagramerdll.zip
autodiagrammer.zip
AutoDiagrammer
AutoDiagramerReflectorAddin
AutoDiagramerReflectorAddin.csproj.user
AutoDiagramer_TemporaryKey.pfx
bin
Debug
AutoDiagramer.dll
AutoDiagramer.pdb
Controls
Forms
Helpers
images
about16.png
AboutImg.png
BannerImg.png
Collapse9.png
Constructors16.png
Draw16.png
edging.png
Events16.png
Exit16.png
Expand9.png
Fields16.png
help16.gif
HideTree.png
HideTree16.png
Interfaces16.png
MainCollapse13.png
MainExpand13.png
Method16.png
open16.png
print16.png
Prop16.png
Prop33.png
save16.png
SaveImg.png
Setting16.png
SettingImg.png
ShowTree.png
ShowTree16.png
Thumbs.db
TreeCode.png
TreeLeaf.png
TreeRoot.png
View16.png
np.ico
Printing
Properties
Settings.settings
Thumbs.db
AutoDiagramerStandAlone
AutoDiagramerStandAlone.csproj.user
AutoDiagramer_TemporaryKey.pfx
bin
Debug
AutoDiagramer.application
AutoDiagramer.exe
AutoDiagramer.exe.manifest
AutoDiagramer.pdb
AutoDiagramer.publish
AutoDiagramer.application
AutoDiagramer_1_12_0_0
AutoDiagramer.exe.deploy
AutoDiagramer.exe.manifest
np.ico.deploy
setup.exe
AutoDiagramer.vshost.application
AutoDiagramer.vshost.exe
AutoDiagramer.vshost.exe.manifest
Controls
Forms
Helpers
images
about16.png
AboutImg.png
BannerImg.png
Collapse9.png
Constructors16.png
Draw16.png
edging.png
Events16.png
Exit16.png
Expand9.png
Fields16.png
help16.gif
HideTree.png
HideTree16.png
Interfaces16.png
MainCollapse13.png
MainExpand13.png
Method16.png
open16.png
print16.png
Prop16.png
Prop33.png
save16.png
SaveImg.png
Setting16.png
SettingImg.png
ShowTree.png
ShowTree16.png
Thumbs.db
TreeCode.png
TreeLeaf.png
TreeRoot.png
View16.png
np.ico
Printing
Properties
Settings.settings
Thumbs.db
autodiagrammer2.zip
AutoDiagramer
AutoDiagramer.csproj.user
AutoDiagramer_TemporaryKey.pfx
bin
Debug
AutoDiagramer.application
AutoDiagramer.exe
AutoDiagramer.exe.manifest
AutoDiagramer.pdb
AutoDiagramer.publish
AutoDiagramer.application
AutoDiagramer_1_9_0_0
AutoDiagramer.exe.deploy
AutoDiagramer.exe.manifest
np.ico.deploy
Reflector.exe.deploy
setup.exe
AutoDiagramer.vshost.exe
Reflector.cfg
Reflector.exe
Controls
Forms
Helpers
images
about16.png
AboutImg.png
BannerImg.png
Collapse9.png
Constructors16.png
Draw16.png
edging.png
Events16.png
Exit16.png
Expand9.png
Fields16.png
help16.gif
HideTree.png
HideTree16.png
Interfaces16.png
MainCollapse13.png
MainExpand13.png
Method16.png
open16.png
print16.png
Prop16.png
Prop33.png
save16.png
SaveImg.png
Setting16.png
SettingImg.png
ShowTree.png
ShowTree16.png
Thumbs.db
TreeCode.png
TreeLeaf.png
TreeRoot.png
View16.png
np.ico
obj
Printing
Properties
Settings.settings
Thumbs.db
Reflector AddIn DLL
AutoDiagramer.dll
using System;
using System.Drawing;
using System.Collections;
using System.ComponentModel;
using System.Windows.Forms;

namespace AutoDiagramer
{
    #region InputBoxDialog CLASS
    /// <summary>
    /// Provides a generic modal text input box, for use with
    /// any other form
    /// </summary>
    public class InputBoxDialog : System.Windows.Forms.Form
    {
        #region Instance Fields
        //instance fields
        string formCaption = string.Empty;
        string formPrompt = string.Empty;
        string inputResponse = string.Empty;
        string defaultValue = string.Empty;
        private System.Windows.Forms.Label lblPrompt;
        private System.Windows.Forms.Button btnOK;
        private System.Windows.Forms.Button btnCancel;
        private System.Windows.Forms.TextBox txtInput;
        private System.ComponentModel.Container components = null;
        #endregion
        #region Constructor
        /// <summary>
        /// Constructs a new InputBoxDialog object
        /// </summary>
        public InputBoxDialog()
        {
            InitializeComponent();
        }
        #endregion
        #region Windows Form Designer generated code
        /// <summary>
        /// Required method for Designer support - do not modify
        /// the contents of this method with the code editor.
        /// 
        private void InitializeComponent()
        {
            this.lblPrompt = new System.Windows.Forms.Label();
            this.btnOK = new System.Windows.Forms.Button();
            this.btnCancel = new System.Windows.Forms.Button();
            this.txtInput = new System.Windows.Forms.TextBox();
            this.SuspendLayout();
            // 
            // lblPrompt
            // 
            this.lblPrompt.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom)
                        | System.Windows.Forms.AnchorStyles.Left)
                        | System.Windows.Forms.AnchorStyles.Right)));
            this.lblPrompt.BackColor = System.Drawing.SystemColors.Control;
            this.lblPrompt.Font = new System.Drawing.Font("Microsoft Sans Serif", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
            this.lblPrompt.Location = new System.Drawing.Point(9, 35);
            this.lblPrompt.Name = "lblPrompt";
            this.lblPrompt.Size = new System.Drawing.Size(302, 22);
            this.lblPrompt.TabIndex = 3;
            // 
            // btnOK
            // 
            this.btnOK.DialogResult = System.Windows.Forms.DialogResult.OK;
            this.btnOK.Location = new System.Drawing.Point(265, 59);
            this.btnOK.Name = "btnOK";
            this.btnOK.Size = new System.Drawing.Size(60, 20);
            this.btnOK.TabIndex = 1;
            this.btnOK.Text = "Ok";
            this.btnOK.Click += new System.EventHandler(this.btnOK_Click);
            // 
            // btnCancel
            // 
            this.btnCancel.DialogResult = System.Windows.Forms.DialogResult.Cancel;
            this.btnCancel.Location = new System.Drawing.Point(331, 59);
            this.btnCancel.Name = "btnCancel";
            this.btnCancel.Size = new System.Drawing.Size(60, 20);
            this.btnCancel.TabIndex = 2;
            this.btnCancel.Text = "Cancel";
            this.btnCancel.Click += new System.EventHandler(this.btnCancel_Click);
            // 
            // txtInput
            // 
            this.txtInput.Location = new System.Drawing.Point(8, 59);
            this.txtInput.MaxLength = 40;
            this.txtInput.Name = "txtInput";
            this.txtInput.Size = new System.Drawing.Size(251, 20);
            this.txtInput.TabIndex = 0;
            // 
            // InputBoxDialog
            // 
            this.AutoScaleBaseSize = new System.Drawing.Size(5, 13);
            this.ClientSize = new System.Drawing.Size(398, 103);
            this.Controls.Add(this.txtInput);
            this.Controls.Add(this.btnCancel);
            this.Controls.Add(this.btnOK);
            this.Controls.Add(this.lblPrompt);
            this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedDialog;
            this.KeyPreview = true;
            this.MaximizeBox = false;
            this.MinimizeBox = false;
            this.Name = "InputBoxDialog";
            this.StartPosition = System.Windows.Forms.FormStartPosition.CenterScreen;
            this.Text = "InputBox";
            this.KeyDown += new System.Windows.Forms.KeyEventHandler(this.InputBoxDialog_KeyDown);
            this.Load += new System.EventHandler(this.InputBox_Load);
            this.ResumeLayout(false);
            this.PerformLayout();

        }

        #region Dispose
        /// <summary>
        /// Clean up any resources being used.
        /// 
        protected override void Dispose(bool disposing)
        {
            if (disposing)
            {
                if (components != null)
                {
                    components.Dispose();
                }
            }
            base.Dispose(disposing);
        }

        #endregion
        #endregion
        #region Public Properties
        // property FormCaption
        public string FormCaption
        {
            get { return formCaption; }
            set { formCaption = value; }
        }
        // property FormPrompt
        public string FormPrompt
        {
            get { return formPrompt; }
            set { formPrompt = value; }
        }
        // property InputResponse
        public string InputResponse
        {
            get { return inputResponse; }
            set { inputResponse = value; }
        }
        // property DefaultValue
        public string DefaultValue
        {
            get { return defaultValue; }
            set { defaultValue = value; }
        } 

        #endregion
        #region Form and Control Events
        /// <summary>
        /// The InputBoxDialog form load event, sets focus to the
        /// txtInput control
        /// </summary>
        /// <param name="sender">The InputBoxDialog</param>
        /// <param name="e">The event arguments</param>
        private void InputBox_Load(object sender, System.EventArgs e)
        {
            this.txtInput.Text = defaultValue;
            this.lblPrompt.Text = formPrompt;
            this.Text = formCaption;
            this.txtInput.SelectionStart = 0;
            this.txtInput.SelectionLength = this.txtInput.Text.Length;
            this.txtInput.Focus();
        }

        /// <summary>
        /// The btnOk click event, sets the InputResponse=txtInput
        /// and then closes the form
        /// </summary>
        /// <param name="sender">The btnOK</param>
        /// <param name="e">The event arguments</param>
        private void btnOK_Click(object sender, System.EventArgs e)
        {
            InputResponse = this.txtInput.Text;
            this.Close();
        }

        /// <summary>
        /// The btnCancel click event, closes the form
        /// </summary>
        /// <param name="sender">The btnCancel</param>
        /// <param name="e">The event arguments</param>
        private void btnCancel_Click(object sender, System.EventArgs e)
        {
            this.Close();
        }

        /// <summary>
        /// The InputBoxDialog key down event, if the key == Enter, sets the
        /// InputResponse=txtInput and then closes the form
        /// </summary>
        /// <param name="sender">The InputBoxDialog</param>
        /// <param name="e">The event arguments</param>
        private void InputBoxDialog_KeyDown(object sender, KeyEventArgs e)
        {
            if (e.KeyCode == Keys.Enter)
            {
                InputResponse = this.txtInput.Text;
                this.Close();
            }
        }
        #endregion
    }
    #endregion
}

By viewing downloads associated with this article you agree to the Terms of Service and the article's licence.

If a file you wish to view isn't highlighted, and is a text file (not binary), please let us know and we'll add colourisation support for it.

License

This article, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

Share

About the Author

Sacha Barber
Software Developer (Senior)
United Kingdom United Kingdom
I currently hold the following qualifications (amongst others, I also studied Music Technology and Electronics, for my sins)
 
- MSc (Passed with distinctions), in Information Technology for E-Commerce
- BSc Hons (1st class) in Computer Science & Artificial Intelligence
 
Both of these at Sussex University UK.
 
Award(s)

I am lucky enough to have won a few awards for Zany Crazy code articles over the years

  • Microsoft C# MVP 2014
  • Codeproject MVP 2014
  • Microsoft C# MVP 2013
  • Codeproject MVP 2013
  • Microsoft C# MVP 2012
  • Codeproject MVP 2012
  • Microsoft C# MVP 2011
  • Codeproject MVP 2011
  • Microsoft C# MVP 2010
  • Codeproject MVP 2010
  • Microsoft C# MVP 2009
  • Codeproject MVP 2009
  • Microsoft C# MVP 2008
  • Codeproject MVP 2008
  • And numerous codeproject awards which you can see over at my blog

| Advertise | Privacy | Mobile
Web02 | 2.8.140827.1 | Last Updated 14 Jun 2011
Article Copyright 2007 by Sacha Barber
Everything else Copyright © CodeProject, 1999-2014
Terms of Service
Layout: fixed | fluid