StonehearthEditor.ManifestView.NewAliasCallback.OnAccept C# (CSharp) Method

OnAccept() public method

public OnAccept ( string inputMessage ) : bool
inputMessage string
return bool
            public bool OnAccept(string inputMessage)
            {
                // Do the cloning
                string newAliasName = inputMessage.Trim();
                if (newAliasName.Length <= 1)
                {
                    MessageBox.Show("You must enter a name longer than 1 character for the new alias!");
                    return false;
                }

                if (mModule.GetAliasFile(newAliasName) != null)
                {
                    MessageBox.Show("An alias already exists with that name!");
                    return false;
                }

                mModule.AddToManifest(newAliasName, "file(" + mFilePath + ")");
                mModule.WriteManifestToFile();
                mOwner.Reload();
                return true;
            }
ManifestView.NewAliasCallback