private void OK_Click(object sender, EventArgs e) { SqlTransactionContext context = new SqlTransactionContext(); context.Connection = CreateSQLConnection(); bool isNewIstallation = radioButton1.Checked; if (isNewIstallation) { //TODO:remove //connection.ConnectionString = "Data Source=TORAX;Initial Catalog=ASH;User ID=sa;Password=1"; ProgressForm progressForm = new ProgressForm(); progressForm.Show(); SaveConnectionInfo(); try { KernelPlugInstaller kernelInstaller = new KernelPlugInstaller(); kernelInstaller.InitialDir = @"c:\temp"; kernelInstaller.RegisterPlug(context); AbstractUIPlugInstaller abstractUIInstaller = new AbstractUIPlugInstaller(); abstractUIInstaller.RegisterPlug(context); AbstractUIContextInstaller abstrContextInstaller = new AbstractUIContextInstaller(); abstrContextInstaller.RegisterPlug(context); AbstractUIPanelInstaller abstrPanelInstaller = new AbstractUIPanelInstaller(); abstrPanelInstaller.RegisterPlug(context); AbstractUITreeViewInstaller abstrTreeViewInstaller = new AbstractUITreeViewInstaller(); abstrTreeViewInstaller.RegisterPlug(context); //Add ProgressForm here to see } catch (Exception ex) { Console.WriteLine(ex.ToString()); } progressForm.TopMost = true; progressForm.Hide(); progressForm.ShowDialog(); } //context.Connection = connection; try { PlugListForm plugListForm = new PlugListForm(); plugListForm.ShowPlugins(context); this.Hide(); plugListForm.ShowDialog(); this.Show(); } catch (Exception ex) { MessageBox.Show(ex.ToString(), "Error", MessageBoxButtons.OK, MessageBoxIcon.Error); } }
private void button1_Click(object sender, EventArgs e) { PlugListForm form = new PlugListForm(); form.Show(); }