private void ShowDialogForm(WIN.SCHEDULING_APPLICATION.DOMAIN.Document label) { try { //frm = null; //Thread t = new Thread(() => Sleep(label)); //t.Start(); //if (!t.Join(3000)) //{ // t.Abort(); // XtraMessageBox.Show("Si è verifica un problema nell'apertura del documento riprovare!", "Messaggio", MessageBoxButtons.OK, MessageBoxIcon.Exclamation); // return; //} DocumentForm frm = new DocumentForm(label); frm.CheckSecurityForView(); frm.ShowDialog(); frm.Dispose(); MemoryHelper.ReduceMemory(); //GC.Collect(); //GC.WaitForPendingFinalizers(); } catch (Exception ex) { ErrorHandler.Show(ex); } }
private void Goto(WIN.SCHEDULING_APPLICATION.DOMAIN.Document label) { //Hashtable h = new Hashtable(); //h.Add("Id", label.Id); //h.Add("Task", label); //NavigateTo("Tasks", h); DocumentForm frm = new DocumentForm(label); frm.CheckSecurityForView(); frm.ShowDialog(); frm.Dispose(); }
private static void CreateDocument() { try { DocumentForm frm = new DocumentForm(); frm.CheckSecurityForInsert(); frm.ShowDialog(); frm.Dispose(); MemoryHelper.ReduceMemory(); } catch (Exception ex) { ErrorHandler.Show(ex); } }