public void check() { listErr = ErrorReason.GetInitial(); CheckLog(); CheckScn(); CheckRcn(); setErrorStr(); }
public void check() { listErr = ErrorReason.GetInitial(); ErrorReason.Put(listErr, ExtraReason.InvalidSignOfCn.ToString(), new ErrorReason(5, "コンテストナンバー末尾に'N'以外のアルファベットがあります。無効です。")); CheckLog(); CheckScn(); CheckRcn(); setErrorStr(); }
public void check() { listErr = ErrorReason.GetInitial(); ErrorReason.Put(listErr, ExtraReason.NotInKanto.ToString(), new ErrorReason(5, "関東圏の局ではありません。無効です。")); CheckLog(); CheckScn(); CheckRcn(); setErrorStr(); }
private void btExecute_Click(object sender, RoutedEventArgs e) { var listErr = ErrorReason.GetInitial(); ErrorReason.Set(listErr, Reason.Duplicate.ToString()); foreach (var d in Delete) { Log.Remove(d); } foreach (var l in Log) { l.FailedStr.Replace(ErrorReason.GetFailedStr(listErr), ""); } this.Close(); }
private void UpdateData() { if (Work.Log.Count == 0) { return; } int unsearchen = 0; int unfinden = 0; int erroren = 0; int dupen = 0; int dupegrpen = 0; var listErr = ErrorReason.GetInitial(); ErrorReason.Set(listErr, Reason.Duplicate.ToString()); string dup = ErrorReason.GetFailedStr(listErr); foreach (var l in Work.Log) { while (l.FailedStr.Contains(dup)) { int idx = l.FailedStr.IndexOf(dup); if (idx < 0) { break; } l.FailedStr = l.FailedStr.Remove(idx, dup.Length); } } Duplicates = new ObservableCollection <List <LogData> >(); var gb = Work.Log.GroupBy(wl => new { wl.Callsign, wl.Freq }).Where(g => g.Count() > 1).ToList(); dupegrpen = gb.Count; foreach (var g in gb) { var tmp = new List <LogData>(); dupen += g.Count(); for (int i = 0; i < g.Count(); i++) { if (!g.ElementAt(i).FailedStr.Contains(dup)) { g.ElementAt(i).FailedStr += dup; } tmp.Add(g.ElementAt(i)); } Duplicates.Add(tmp); } lbReadenLogNum.Content = Work.Log.Count; Work.Log = new ObservableCollection <LogData>(Work.Log.OrderByDescending(l => l.FailedStr)); dgLog.ItemsSource = Work.Log; if (Work.Config != null) { lbSettingConfigen.Content = ""; } foreach (var l in Work.Log) { if (!l.IsSearched) { unsearchen++; } if (!l.IsFinded) { unfinden++; } if (!l.IsRate0) { erroren++; } } lbUnsearchenLogNum.Content = unsearchen; lbUnavailenLogNum.Content = unfinden; lbErrorenLogNum.Content = erroren; lbDupenLogNum.Content = dupegrpen + "(" + dupen + ")"; }