private void ExecuteExceptCommand() { var numbers = LocalHelper.GetNumber(Open.ChooseFile()); if (numbers.Count <= 0) { return; } numbers = _numberList.Except(numbers).ToList(); _showMessage("导出差集文本成功!路径:" + ExportHelper.ExportRandomName(numbers, "ExceptNumbers")); }
private void _addNumberByOne(string file) { var numbers = LocalHelper.GetNumber(file); var comparer = new NumberItemComparer(); foreach (var number in numbers) { var item = new NumberItem(number); //if (NumberList.ToList().Contains<NumberItem>(item, comparer)) continue; NumberList.Add(item); } Message = $"从{file}成功添加{numbers.Count}条号码!"; }
private void _begin() { foreach (var item in FileList) { if (item.Status == ExecuteStatus.Complete) { item.Message = "跳过"; break; } item.Status = ExecuteStatus.Waiting; _numberList.AddRange(LocalHelper.GetNumber(item.Path)); item.Status = ExecuteStatus.Complete; } _numberList = _numberList.Distinct().ToList(); _showMessage($"总共合并了{_numberList.Count}个号码!请导出!"); }