コード例 #1
0
        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;
                }
            }
        }
コード例 #2
0
        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();
        }
コード例 #3
0
        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();
        }
コード例 #4
0
        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();
        }
コード例 #5
0
        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();
        }