private void ConnectDB(bool isSqlite) { MyTrees.InitTreeDB(isSqlite); if (isSqlite) { SelectDB(); } else { UserAdmin.InitDB(MyTrees.treeDB); connectView = new ConnDBView(new InvokeDelegate(SelectDB), MyTrees.treeDB); mainGrid.Children.Remove(loginView); mainGrid.Children.Add(connectView); } }