private void NameEdited(object sender, EditedArgs args) { TreeIter iter; if (store.GetIterFromString(out iter, args.Path)) { if (!string.IsNullOrEmpty(args.NewText) && !constraints.Contains(args.NewText)) { store.SetValue(iter, colNameIndex, args.NewText); EmitContentChanged(); } else { string oldText = store.GetValue(iter, colNameIndex) as string; (sender as CellRendererText).Text = oldText; } } }
protected virtual void AddClicked(object sender, EventArgs e) { CheckConstraintSchema check = schemaProvider.GetNewCheckConstraintSchema("check_new"); int index = 1; while (constraints.Contains(check.Name)) { check.Name = "check_new" + (index++); } constraints.Add(check); AddConstraint(check); EmitContentChanged(); }
protected virtual void AddClicked(object sender, EventArgs e) { ForeignKeyConstraintSchema fk = schemaProvider.GetNewForeignKeyConstraintSchema("fk_new"); int index = 1; while (constraints.Contains(fk.Name)) { fk.Name = "fk_new" + (index++); } constraints.Add(fk); AddConstraint(fk); EmitContentChanged(); }
protected virtual void AddClicked(object sender, EventArgs e) { ForeignKeyConstraintSchema fk = schemaProvider.CreateForeignKeyConstraintSchema(string.Concat(table.Name, "_", "fk_new")); int index = 1; while (constraints.Contains(fk.Name)) { fk.Name = string.Concat(table.Name, "_", "fk_new", (index++).ToString()); } constraints.Add(fk); AddConstraint(fk); EmitContentChanged(); }
protected virtual void AddClicked(object sender, EventArgs e) { CheckConstraintSchema check = schemaProvider.CreateCheckConstraintSchema(string.Concat(table.Name, "_", "check_new")); int index = 1; while (constraints.Contains(check.Name)) { check.Name = string.Concat(table.Name, "_", "check_new", (index++).ToString()); } constraints.Add(check); AddConstraint(check); EmitContentChanged(); }