public static NameWithSchema Run(IEnumerable <string> schemata, bool enabledSchema, NameWithSchema defvalue) { NameWithSchemaForm win = new NameWithSchemaForm(); if (schemata != null) { foreach (var sch in schemata) { win.cbxSchema.Items.Add(sch); } } if (defvalue != null) { if (defvalue.Schema != null) { win.cbxSchema.Text = defvalue.Schema; } if (defvalue.Name != null) { win.tbxName.Text = defvalue.Name; } } win.cbxSchema.Enabled = enabledSchema; if (win.ShowDialogEx() == DialogResult.OK) { return(new NameWithSchema(win.cbxSchema.Text == "" ? null : win.cbxSchema.Text, win.tbxName.Text)); } return(null); }
public override bool SaveAs() { NameWithSchema name = NameWithSchemaForm.Run( m_conn.InvokeLoadSchemata(), m_conn.DatabaseCaps.MultipleSchema, new NameWithSchema(m_conn.DefaultSchema, "new_domain")); if (name != null) { m_domain.FullName = name; return(Save()); } return(false); }