public TableEditorDialog(IEditSchemaProvider schemaProvider, bool create, TableEditorSettings settings)
        {
            if (schemaProvider == null)
            {
                throw new ArgumentNullException("schemaProvider");
            }

            this.schemaProvider = schemaProvider;
            this.action         = create ? SchemaActions.Create : SchemaActions.Alter;
            this.settings       = settings;

            this.Build();

            if (create)
            {
                Title = AddinCatalog.GetString("Create Table");
            }
            else
            {
                Title = AddinCatalog.GetString("Alter Table");
            }

            notebook = new Notebook();
            vboxContent.PackStart(notebook, true, true, 0);

            notebook.Sensitive = false;
            ThreadPool.QueueUserWorkItem(new WaitCallback(InitializeThreaded));
            vboxContent.ShowAll();
        }
Esempio n. 2
0
		public bool ShowTableEditorDialog (IEditSchemaProvider schemaProvider, TableSchema table, bool create)
		{
			TableEditorSettings settings = new TableEditorSettings ();
			TableEditorDialog dlg = new TableEditorDialog (schemaProvider, create, settings);
			dlg.Initialize (table);

			return RunDialog (dlg);
		public bool ShowTableEditorDialog (IEditSchemaProvider schemaProvider, TableSchema table, bool create)
		{
			TableEditorSettings settings = new TableEditorSettings ();
			settings.ConstraintSettings.CheckSettings.SupportsColumnConstraints = false;
			TableEditorDialog dlg = new TableEditorDialog (schemaProvider, create, settings);
			dlg.Initialize (table);
			return RunDialog (dlg);
Esempio n. 4
0
		public TableEditorDialog (IEditSchemaProvider schemaProvider, bool create, TableEditorSettings settings)
		{
			if (schemaProvider == null)
				throw new ArgumentNullException ("schemaProvider");
			
			this.schemaProvider = schemaProvider;
			this.action = create ? SchemaActions.Create : SchemaActions.Alter;
			this.settings = settings;
			
			this.Build();
			
			if (create)
				Title = AddinCatalog.GetString ("Create Table");
			else
				Title = AddinCatalog.GetString ("Alter Table");
			
			notebook = new Notebook ();
			vboxContent.PackStart (notebook, true, true, 0);

			notebook.Sensitive = false;
			ThreadPool.QueueUserWorkItem (new WaitCallback (InitializeThreaded));
			vboxContent.ShowAll ();
		}
		public bool ShowTableEditorDialog (IEditSchemaProvider schemaProvider, TableSchema table, bool create)
		{
			TableEditorSettings settings = new TableEditorSettings ();
			// SQLite doesn't support "NO ACTION" on "Foreign Key"
			settings.ConstraintSettings.ForeignKeySettings.SupportsNoAction = false;
			TableEditorDialog dlg = new TableEditorDialog (schemaProvider, create, settings);
			dlg.Initialize (table);

			return RunDialog (dlg);