private void bg_DoWork(object sender, DoWorkEventArgs e) { try { Models.DataSource.ConnectionString = Settings.Default.ConnectionString; Console.Write(new UnitOfWork().ObligationsRepo.Fetch().Count()); MachineTime.UpdateTime(); } catch (Exception exception) { Invoke(new Action(() => { ConnectionDialog.ShowDialog(); })); } }
private void btnServerSetup_Click(object sender, EventArgs e) { ConnectionDialog.ShowDialog(); }