public ICommand CreateCommand()
        {
            ICommand ret = null;
            // string name;
            string title;
            // bool add = false;
            // add = true;
            title = "Add Vegetation";

            using (TextPromptDialog dlg = new TextPromptDialog(title, "Name", anchor, "&Add"))
            {

                if (dlg.ShowDialog() == DialogResult.OK)
                {
                    ret = new AddGrassCommand(app, (Boundary) bound, dlg.TextBoxText);
                    this.name = dlg.TextBoxText;
                }
            }
            return ret;
        }
Пример #2
0
        public ICommand CreateCommand()
        {
            ICommand ret = null;
            // string name;
            string title;

            // bool add = false;
            // add = true;
            title = "Add Vegetation";

            using (TextPromptDialog dlg = new TextPromptDialog(title, "Name", anchor, "&Add"))
            {
                if (dlg.ShowDialog() == DialogResult.OK)
                {
                    ret       = new AddGrassCommand(app, (Boundary)bound, dlg.TextBoxText);
                    this.name = dlg.TextBoxText;
                }
            }
            return(ret);
        }