private void PrintingCompleted(object sender, RunWorkerCompletedEventArgs e) { if (PleaseWaitForm != null) { PleaseWaitForm.Hide(); PleaseWaitForm.Dispose(); PleaseWaitForm = null; } Program.FamilyId = 0; classlist = new List <ClassInfo>(); PrintAll.Text = string.Empty; /* * if (Program.AskLabels) * { * var f = new DidItWork(); * var ret = f.ShowDialog(); * f.Hide(); * f.Dispose(); * if (ret == DialogResult.No) * { * Util.ReportPrinterProblem(); * var fa = new AdminLogin(); * fa.ShowDialog(); * } * } */ this.GoHome(string.Empty); }
private void backgroundWorker1_RunWorkerCompleted(object sender, RunWorkerCompletedEventArgs e) { PleaseWaitForm.Hide(); PleaseWaitForm.Dispose(); PleaseWaitForm = null; buttongo.Enabled = true; var x = e.Result as XDocument; if (x.Document.Root.Name == "Families") { this.Swap(families); families.ShowFamilies(x); } else { var locked = bool.Parse(x.Document.Root.Attribute("waslocked").Value); if (locked) { MessageBox.Show("Family is already being viewed", "Try again", MessageBoxButtons.OK, MessageBoxIcon.Warning); } else { this.Swap(family); family.ShowFamily(x); } } }
private void PrintingCompleted(object sender, RunWorkerCompletedEventArgs e) { if (PleaseWaitForm != null) { PleaseWaitForm.Hide(); PleaseWaitForm.Dispose(); PleaseWaitForm = null; } Program.FamilyId = 0; classlist = new List <ClassInfo>(); PrintAll.Text = string.Empty; this.GoHome(string.Empty); }
private void backgroundWorker1_RunWorkerCompleted(object sender, RunWorkerCompletedEventArgs e) { PleaseWaitForm.Hide(); PleaseWaitForm.Dispose(); PleaseWaitForm = null; buttongo.Enabled = true; var x = e.Result as XDocument; if (x.Document.Root.Name == "Families") { this.Swap(families); families.ShowFamilies(x); } else { this.Swap(family); family.ShowFamily(x); } }