MySql.Data.VisualStudio.TableNode.Save C# (CSharp) Method

Save() protected method

We override Save here because we want to prompt for a new name if this table is new and the user has not changed the default name
protected Save ( ) : bool
return bool
        protected override bool Save()
        {
            if (table.IsNew && table.Name == Name)
            {
                TableNamePromptDialog dlg = new TableNamePromptDialog();
                dlg.TableName = table.Name;
                if (DialogResult.Cancel == dlg.ShowDialog()) return false;
                table.Name = dlg.TableName;
            }
            return base.Save();
        }