Globals.askForName.askForName C# (CSharp) Method

askForName() public method

Initializes a new instance of the askForName class.
public askForName ( string titleText, string labelText, string buttonText, string oldTagName, string newTagName, bool smartChange ) : System
titleText string The text to display on the title bar.
labelText string The text to display on the label.
buttonText string The text to display on the button.
oldTagName string The tag's original name (path included).
newTagName string The new name of the tag (without path)
smartChange bool if set to True, will update the top label as a tag when the bottom label is changed
return System
        public askForName(string titleText, string labelText, string buttonText, string oldTagName, string newTagName, bool smartChange)
        {
            InitializeComponent();
            this.Text = titleText;
            this.label1.Text = labelText;
            this.createButton.Text = buttonText;
            this.tbOldName.Text = oldTagName;
            this.tbNewName.Text = newTagName;
            tag = newTagName;
            this.tbNewName.Left = this.label1.Width + 20;
            this.tbNewName.Width = this.Width - (this.tbNewName.Left + 20);
            if (smartChange)
            {
                tbOldName.Enabled = true;
                tbNewName.TextChanged += new EventHandler(tbNewName_TextChanged);
            }
            this.previousTagName = newTagName;
        }