Beispiel #1
0
            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)));
                }
            }
Beispiel #2
0
            private void CheckRcn()
            {
                if (!Callsign.IsJACallsign(log.Callsign))
                {
                    log.Point = 0;
                    ErrorReason.Set(listErr, Reason.OmakuniNonJA.ToString());
                    return;
                }

                var  hasStroke     = Callsign.HasStroke(log.Callsign);
                var  areano        = Contestno.GetAreano(log);
                var  phoneRegion   = Contestno.GetPhoneRegion(areano, listMainArea);
                var  stationAreano = Areano.GetNoFromStation(station, listMainArea);
                var  suggests      = Areano.GetSuggestFromStation(station, listMainArea);
                char lrc           = log.ReceivedCn[log.ReceivedCn.Length - 1];

                if (lrc != 'N' && !('0' <= lrc && lrc <= '9'))
                {
                    ErrorReason.Set(listErr, ExtraReason.InvalidSignOfCn.ToString());
                    log.Point = 0;
                }

                if (!Freq.IsBeen(log.Freq))
                {
                    ErrorReason.Set(listErr, Reason.InvalidFreq.ToString());
                }
                if (phoneRegion == null)
                {
                    switch (areano)
                    {
                    case "050":
                    case "070":
                    case "080":
                    case "090":
                        break;

                    default:
                        ErrorReason.Set(listErr, Reason.ReceivedCnUnexists.ToString(), Utils.ConvTostrarrFromList(Areano.GetFromList(Station.GetList(station), listMainArea)));
                        break;
                    }
                }
                else
                {
                    if (!phoneRegion.Any(x => x == 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));
                    }
                }
            }
Beispiel #3
0
            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)));
                }
            }
Beispiel #4
0
            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)));
                }
            }