public void Init(SQLContext sqlContext) { _sqlContext = sqlContext; using (Disposable.Create(() => Cursor = Cursors.Arrow)) { Cursor = Cursors.Wait; _controller.Init(sqlContext); } ButtonProceed.Click += btnGenerateStructure_Click; _subscriptions.Add(Disposable.Create(() => ButtonProceed.Click -= btnGenerateStructure_Click)); ButtonCancel.Click += btnCancelGenerate_Click; _subscriptions.Add(Disposable.Create(() => ButtonCancel.Click -= btnCancelGenerate_Click)); }
public void Init(SQLContext sqlContext) { _sqlContext = sqlContext; using (Disposable.Create(() => Cursor = Cursors.Default)) { Cursor = Cursors.WaitCursor; _controller.Init(sqlContext); } treeDatabaseSchema.Select(); treeDatabaseSchema.KeyDown += treeDatabaseSchema_KeyDown; _subscriptions.Add(Disposable.Create(() => treeDatabaseSchema.KeyDown -= treeDatabaseSchema_KeyDown)); treeDatabaseSchema.Enter += treeDatabaseSchema_GotFocus; _subscriptions.Add(Disposable.Create(() => treeDatabaseSchema.KeyDown -= treeDatabaseSchema_KeyDown)); treeDatabaseSchema.DragOver += treeDatabaseSchema_DragOver; _subscriptions.Add(Disposable.Create(() => treeDatabaseSchema.KeyDown -= treeDatabaseSchema_KeyDown)); treeStructure.KeyDown += treeStructure_KeyDown; _subscriptions.Add(Disposable.Create(() => treeStructure.KeyDown -= treeStructure_KeyDown)); treeStructure.Enter += treeStructure_GotFocus; _subscriptions.Add(Disposable.Create(() => treeStructure.Enter -= treeStructure_GotFocus)); menuSchemaTree.Opening += menuSchemaTree_Opening; _subscriptions.Add(Disposable.Create(() => menuSchemaTree.Opening -= menuSchemaTree_Opening)); menuStructureTree.Opening += MenuStructureTree_Opening; _subscriptions.Add(Disposable.Create(() => menuStructureTree.Opening -= MenuStructureTree_Opening)); btnGenerateStructure.Click += btnGenerateStructure_Click; _subscriptions.Add(Disposable.Create(() => btnGenerateStructure.Click -= btnGenerateStructure_Click)); btnCancelGenerate.Click += btnCancelGenerate_Click; _subscriptions.Add(Disposable.Create(() => btnCancelGenerate.Click -= btnCancelGenerate_Click)); Resize += OnResize; _subscriptions.Add(Disposable.Create(() => Resize -= OnResize)); }