private void Start(bool imported, int ID) { ViewEvidenceM = new ViewEvidenceM(); SelectedPatient = (GlobalVM.StockLayout.headerContent.Content as SelectedPatient); ViewEvidenceM.Imported = imported; ViewEvidenceM.Id = ID; ViewEvidenceM.PatientId = SelectedPatient.SelectedPatientVM.Id(); Loading = new BackgroundWorker(); Loading.DoWork += new DoWorkEventHandler(LoadingModel); Loading.RunWorkerCompleted += new RunWorkerCompletedEventHandler(LoadingModelComplete); }
private async void LoadingModelComplete(object sender, RunWorkerCompletedEventArgs e) { if (workingConn) { ViewEvidenceM.AcceptChanges(); } else { ConnectionMessage(); } await Utilities.Loading.Hide(); }