private void CheckRcn() { if (!Callsign.IsJACallsign(log.Callsign)) { log.Point = 0; ErrorReason.Set(listErr, Reason.OmakuniNonJA.ToString()); return; } if (Contestno.HasPower(log.ReceivedCn) == false) { ErrorReason.Set(listErr, Reason.InvalidReceivedCn.ToString()); } var hasStroke = Callsign.HasStroke(log.Callsign); var areano = Contestno.GetAreano(log); var stationAreano = Areano.GetNoFromStation(station, SubSelecter ? listMainArea : listSubArea); var suggests = Areano.GetSuggestFromStation(station, SubSelecter ? listMainArea : listSubArea); if (!Freq.IsBeen(log.Freq)) { ErrorReason.Set(listErr, Reason.InvalidFreq.ToString()); } if (Contestno.GetRegion(Contestno.GetPrefno(log, SubSelecter ? false : true)) != Callsign.GetRegion(log.Callsign, hasStroke)) { ErrorReason.Set(listErr, Reason.RegionUnmatches.ToString()); } if (!Station.IsMatched(areano, stationAreano) && station != null && !hasStroke) { ErrorReason.Set(listErr, Reason.AddressUnmatches.ToString(), Utils.ConvTostrarrFromList(suggests)); } if (!Areano.IsBeen(SubSelecter ? listMainArea : listSubArea, areano)) { ErrorReason.Set(listErr, Reason.ReceivedCnUnexists.ToString(), Utils.ConvTostrarrFromList(Areano.GetFromList(Station.GetList(station), listMainArea))); } }
private void CheckRcn() { if (!Callsign.IsJACallsign(log.Callsign)) { log.Point = 0; ErrorReason.Set(listErr, Reason.OmakuniNonJA.ToString()); return; } if (Contestno.HasPower(log.ReceivedCn) == true) { ErrorReason.Set(listErr, Reason.InvalidReceivedCn.ToString()); } var prefno = Contestno.GetPrefno(log); if (prefno.Length > 3) { prefno = prefno.Substring(0, 2); } if (config.CategoryCode[0] == 'X' && prefno != "11") { ErrorReason.Set(listErr, ExtraReason.NotInKanagawa.ToString()); log.Point = 0; } var hasStroke = Callsign.HasStroke(log.Callsign); var areano = Contestno.GetAreano(log); var stationAreano = Areano.GetNoFromStation(station, listMainArea); var suggests = Areano.GetSuggestFromStation(station, listMainArea); if (!Freq.IsBeen(log.Freq)) { ErrorReason.Set(listErr, Reason.InvalidFreq.ToString()); } if (Contestno.GetRegion(prefno) != Callsign.GetRegion(log.Callsign, hasStroke)) { ErrorReason.Set(listErr, Reason.RegionUnmatches.ToString()); } if (!Station.IsMatched(areano, stationAreano) && station != null && !hasStroke) { ErrorReason.Set(listErr, Reason.AddressUnmatches.ToString(), Utils.ConvTostrarrFromList(suggests)); } if (!Areano.IsBeen(listMainArea, areano)) { ErrorReason.Set(listErr, Reason.ReceivedCnUnexists.ToString(), Utils.ConvTostrarrFromList(Areano.GetFromList(Station.GetList(station), listMainArea))); } }
private void CheckRcn() { if (!Callsign.IsJACallsign(log.Callsign)) { log.Point = 0; ErrorReason.Set(listErr, Reason.OmakuniNonJA.ToString()); return; } if (Contestno.HasPower(log.ReceivedCn) == true) { ErrorReason.Set(listErr, Reason.InvalidReceivedCn.ToString()); } //59##L var prefno = Contestno.GetPrefno(log, true); if (10 > int.Parse(prefno) || int.Parse(prefno) > 17) { ErrorReason.Set(listErr, ExtraReason.NotInKanto.ToString()); log.Point = 0; } var hasStroke = Callsign.HasStroke(log.Callsign); var areano = Contestno.GetAreano(log); var stationAreano = Areano.GetNoFromStation(station, listMainArea); var suggests = Areano.GetSuggestFromStation(station, listMainArea); if (!Freq.IsBeen(log.Freq)) { ErrorReason.Set(listErr, Reason.InvalidFreq.ToString()); } if (Contestno.GetRegion(prefno) != Callsign.GetRegion(log.Callsign, hasStroke)) { ErrorReason.Set(listErr, Reason.RegionUnmatches.ToString()); } if (!Station.IsMatched(areano, stationAreano) && station != null && !hasStroke) { ErrorReason.Set(listErr, Reason.AddressUnmatches.ToString(), Utils.ConvTostrarrFromList(suggests)); } if (!Areano.IsBeen(listMainArea, areano)) { ErrorReason.Set(listErr, Reason.ReceivedCnUnexists.ToString(), Utils.ConvTostrarrFromList(Areano.GetFromList(Station.GetList(station), listMainArea))); } }