private void toolStripConnectBtn_Click(object sender, EventArgs e) { var frm = new FrmConnector(); if (frm.ShowDialog() == DialogResult.OK) { var strName = frm.ConnectionName; var strConn = frm.ConnectionStr; ProcessingBox.Show(new Func <object[], object>(_connect), new object[] { strName, strConn }, _connectCallback); } }
private void btnNew_Click(object sender, EventArgs e) { var frm = new FrmConnector(); if (frm.ShowDialog() == DialogResult.OK) { var strName = frm.ConnectionName; var strConn = frm.ConnectionStr; _data.Rows.Add(new string[] { strName, strConn }); dvBookmark.DataSource = _data; _writeJson(); } }