BitOrchestra.MainForm._Parse C# (CSharp) Method

_Parse() private method

Tries parsing the contents of this form, displaying the appropriate messages on failure.
private _Parse ( Expression &Expression, SoundOptions &Options ) : bool
Expression Expression
Options SoundOptions
return bool
        private bool _Parse(out Expression Expression, out SoundOptions Options)
        {
            int errorindex;
            if (Parser.Parse(this._Text.Text, out Expression, out Options, out errorindex))
            {
                if (Expression != null)
                {
                    return true;
                }
                else
                {
                    MessageBox.Show("The result variable \"" + Parser.Result + "\" must be defined", MessageBoxCaption, MessageBoxButtons.OK);
                    return false;
                }
            }
            else
            {
                this._Text.Select(errorindex, 0);
                return false;
            }
        }