Пример #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)));
                }
            }
Пример #2
0
            /// <summary>
            /// 送信コンテストナンバが正しいか確認 不正ならエラーリストに追加
            /// </summary>
            /// <param name="log">確認元ログデータ</param>
            /// <param name="contestno">通常のコンテストナンバ</param>
            /// <param name="extraCn">周波数特有のコンテストナンバ</param>
            /// <param name="hasPower">空中線電力の表示があるか</param>
            /// <param name="listErr">エラーリスト</param>
            public static void CheckSentCn(LogData log, string contestno, string extraCn, bool hasPower, Dictionary <string, ErrorReason> listErr)
            {
                string chk  = Contestno.GetRstFilteredStr(log)["Sent"];
                var    cn   = contestno;
                var    excn = extraCn;

                if (excn != null)
                {
                    cn = excn;
                }
                if (chk != cn || Contestno.HasPower(log.SentCn) != hasPower)
                {
                    ErrorReason.Set(listErr, Reason.InvalidSentCn.ToString());
                }
            }
Пример #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)));
                }
            }
Пример #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)));
                }
            }