private void btnExport_Click(object sender, EventArgs e) { if (txtFileName.Text.EndsWith(".csvx") == false) txtFileName.Text += ".csvx"; ExportData(); if (chbRemoveAfterExport.Checked) { if (rbSelected.Checked) ResultDelItems = ResultRemoving.Selected; else if (rbNonSelected.Checked) ResultDelItems = ResultRemoving.Unselected; else ResultDelItems = ResultRemoving.All; } else { ResultDelItems = ResultRemoving.None; } Close(); }
void RemoveMSG(ResultRemoving result) { var ds = GetProductsDS(); if (ds == null) return; while(true) { var found = ds.Where(msg => (result == ResultRemoving.Selected && msg.EquippedInv) || (result == ResultRemoving.Unselected && !msg.EquippedInv) || (result == ResultRemoving.All)).ToList(); if (found.Count == 0) break; Unpair(found[0]); ds.Remove(found[0]); } CheckAllEqipped(); UpdateProductSet(); }