private void MenuFilterButton_Click(object sender, EventArgs e) { if (bNeedSplash) { Thread T = new Thread(delegate() { SplashWindow.CreateCoverSplash(InnerDocumentsList.Top + UpdatePanel.Top, InnerDocumentsList.Left + UpdatePanel.Left, InnerDocumentsList.Height, InnerDocumentsList.Width); }); T.Start(); while (!SplashWindow.bSmallCreated) { ; } } if (CategoriesComboBox.GetItemText(CategoriesComboBox.SelectedItem) == "Внутренний документ") { InfiniumDocuments.FillInnerDocuments(GetFilter()); InnerDocumentsList.InitializeItems(); InnerDocumentsList.BringToFront(); } if (CategoriesComboBox.GetItemText(CategoriesComboBox.SelectedItem) == "Входящий документ") { InfiniumDocuments.FillIncomeDocuments(GetFilter()); IncomeDocumentsList.InitializeItems(); IncomeDocumentsList.BringToFront(); } if (CategoriesComboBox.GetItemText(CategoriesComboBox.SelectedItem) == "Исходящий документ") { InfiniumDocuments.FillOuterDocuments(GetFilter()); OuterDocumentsList.InitializeItems(); OuterDocumentsList.BringToFront(); } if (bNeedSplash) { bC = true; } }
private void CreateDocumentButton_Click(object sender, EventArgs e) { if (CategoriesComboBox.GetItemText(CategoriesComboBox.SelectedItem) == "Исходящий документ") { PhantomForm PhantomForm = new PhantomForm(); PhantomForm.Show(); CreateOuterDocumentForm CreateDocumentForm = new CreateOuterDocumentForm(ref TopForm, ref InfiniumDocuments); TopForm = CreateDocumentForm; CreateDocumentForm.ShowDialog(); if (CreateDocumentForm.bCanceled == false) { InfiniumDocuments.FillOuterDocuments(GetFilter()); OuterDocumentsList.InitializeItems(); OuterDocumentsList.BringToFront(); } PhantomForm.Close(); PhantomForm.Dispose(); TopForm = null; } if (CategoriesComboBox.GetItemText(CategoriesComboBox.SelectedItem) == "Внутренний документ") { PhantomForm PhantomForm = new PhantomForm(); PhantomForm.Show(); CreateInnerDocumentForm CreateDocumentForm = new CreateInnerDocumentForm(ref TopForm, ref InfiniumDocuments); TopForm = CreateDocumentForm; CreateDocumentForm.ShowDialog(); if (CreateDocumentForm.bCanceled == false) { InfiniumDocuments.FillInnerDocuments(GetFilter()); InnerDocumentsList.InitializeItems(); InnerDocumentsList.BringToFront(); } PhantomForm.Close(); PhantomForm.Dispose(); TopForm = null; } if (CategoriesComboBox.GetItemText(CategoriesComboBox.SelectedItem) == "Входящий документ") { PhantomForm PhantomForm = new PhantomForm(); PhantomForm.Show(); CreateIncomeDocumentForm CreateDocumentForm = new CreateIncomeDocumentForm(ref TopForm, ref InfiniumDocuments); TopForm = CreateDocumentForm; CreateDocumentForm.ShowDialog(); if (CreateDocumentForm.bCanceled == false) { InfiniumDocuments.FillIncomeDocuments(GetFilter()); IncomeDocumentsList.InitializeItems(); IncomeDocumentsList.BringToFront(); } PhantomForm.Close(); PhantomForm.Dispose(); TopForm = null; } }