private void AddItemButton_Click(object sender, EventArgs e) { if (SellersManager == null || SellersManager.SubGroupsCount == 0) { return; } Thread T = new Thread(delegate() { SplashWindow.CreateSplash(); }); T.Start(); while (!SplashForm.bCreated) { ; } NewSellerForm NewSellerForm = new NewSellerForm(ref SellersManager, -1); TopForm = NewSellerForm; NewSellerForm.ShowDialog(); NewSellerForm.Close(); NewSellerForm.Dispose(); TopForm = null; }
private void EditItemButton_Click(object sender, EventArgs e) { if (SellersDataGrid.SelectedRows.Count > 0) { Thread T = new Thread(delegate() { SplashWindow.CreateSplash(); }); T.Start(); while (!SplashForm.bCreated) { ; } NewSellerForm NewSellerForm = new NewSellerForm(ref SellersManager, 0); TopForm = NewSellerForm; NewSellerForm.ShowDialog(); NewSellerForm.Close(); NewSellerForm.Dispose(); TopForm = null; } }