Inheritance: System.Windows.Forms.Form
 /// <summary>
 /// 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
 /// </summary>
 /// <returns></returns>
 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();
 }
Beispiel #2
0
 /// <summary>
 /// 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
 /// </summary>
 /// <returns></returns>
 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;
   }
   try
   {
     return base.Save();
   }
   catch ( MySql.Data.MySqlClient.MySqlException ex)
   {
     // Undo name edited
     table.Name = Name;
     throw;
   }
 }