コード例 #1
0
        public void Test_FourthGridSquareCharacter_Negative()
        {
            decimal latRemainder   = -2.0m;
            short   latDirection   = -1;
            string  expectedResult = "7";

            string actualResult = GridSquareHelper.GetFourthGridsquareCharacter(latRemainder, latDirection);

            Assert.AreEqual(expectedResult, actualResult);
        }
コード例 #2
0
        public void Test_SixthGridSquareCharacter()
        {
            short   latDirection        = 1;
            decimal nearestEvenMultiple = 5.0m;
            var     gsh            = new GridSquareHelper();
            var     expectedResult = "B";

            string actualResult = gsh.GetSixthGridsquareCharacter(latDirection, nearestEvenMultiple);

            Assert.AreEqual(expectedResult.ToUpper(), actualResult.ToUpper());
        }
コード例 #3
0
        public void Test_FifthGridSquareCharacter_Negative()
        {
            short   lonDirection        = -1;
            decimal nearestEvenMultiple = -35.0m;
            var     gsh            = new GridSquareHelper();
            var     expectedResult = "Q";

            string actualResult = gsh.GetFifthGridsquareCharacter(lonDirection, nearestEvenMultiple);

            Assert.AreEqual(expectedResult.ToUpper(), actualResult.ToUpper());
        }
コード例 #4
0
        public void Test_ValidateGridsquareInput_Spaces_Pass()
        {
            var    gsh                   = new GridSquareHelper();
            string gridsquare            = "  CN87ut  ";
            bool   expectedResult        = true;
            string expectedValidatedGrid = "CN87UT";

            bool actualResult = gsh.ValidateGridsquareInput(gridsquare, out string actualValidatedGrid);

            Assert.AreEqual(expectedResult, actualResult);
            Assert.AreEqual(expectedValidatedGrid, actualValidatedGrid);
        }
コード例 #5
0
        public void Test_ThirdGridSquareCharacter()
        {
            decimal remainingLonDegrees = 3m;
            short   lonDirection        = 1;

            decimal expectedOut    = 60m;
            string  expectedResult = "1";

            string actualResult = GridSquareHelper.GetThirdGridsquareCharacter(remainingLonDegrees, lonDirection, out decimal actualOut);

            Assert.AreEqual(expectedOut, actualOut);
            Assert.AreEqual(expectedResult, actualResult);
        }
コード例 #6
0
        public void TestFirstGridSquareCharacter_Negative()
        {
            decimal lonDegrees           = -122.0m;
            short   lonDirection         = -1;
            string  expectedResult       = "C";
            decimal expectedOutRemainder = -2m;

            var    gsh          = new GridSquareHelper();
            string actualResult = gsh.GetFirstGridsquareCharacter(lonDegrees, lonDirection, out decimal actualOutRemainder);

            Assert.AreEqual(expectedOutRemainder, actualOutRemainder);
            Assert.AreEqual(expectedResult, actualResult);
        }
コード例 #7
0
        public void Test_SecondGridSquareCharacter_Negative()
        {
            decimal latDegrees   = -47.0m;
            short   latDirection = -1;

            string  expectedResult = "E";
            decimal expectedOut    = -7.0m;

            var    gsh          = new GridSquareHelper();
            string actualResult = gsh.GetSecondGridsquareCharacter(latDegrees, latDirection, out decimal actualOut);

            Assert.AreEqual(expectedOut, actualOut);
            Assert.AreEqual(expectedResult, actualResult);
        }
コード例 #8
0
        /// <summary>
        /// Takes a DDMCoordinate objects and processes it using ConversionHelper an GridSquareHelper to return a Gridsquare string.
        /// If solution cannot be found a string with encoded error condition is returned and should be handled by the caller.
        /// </summary>
        /// <param name="ddmCoordinates"></param>
        /// <returns></returns>
        public string ConvertDDMtoGridsquare(DDMCoordinate ddmCoordinates)
        {
            if (ddmCoordinates == null)
            {
                return("BadInp");
            }

            if (false == LookuptablesHelper.GenerateTableLookups())
            {
                return("NoTbls");
            }

            var GridsquareResult = new StringBuilder();

            decimal DDMlatDegrees = ddmCoordinates.GetShortDegreesLat();
            decimal DDMlonDegrees = ddmCoordinates.GetShortDegreesLon();
            decimal DDMlatMinutes = ddmCoordinates.MinutesLattitude;
            decimal DDMlonMinutes = ddmCoordinates.MinutesLongitude;

            short LatDirection = ConversionHelper.ExtractPolarityNS(ddmCoordinates.ToString());
            short LonDirection = ConversionHelper.ExtractPolarityEW(ddmCoordinates.ToString());

            GridsquareResult.Append(GridsquareHelper.GetFirstGridsquareCharacter(DDMlonDegrees, LonDirection, out decimal remainderLon));
            GridsquareResult.Append(GridsquareHelper.GetSecondGridsquareCharacter(DDMlatDegrees, LatDirection, out decimal remainderLat));

            GridsquareResult.Append(GridSquareHelper.GetThirdGridsquareCharacter(remainderLon, LonDirection, out decimal minsRemainderLon));
            GridsquareResult.Append(GridSquareHelper.GetFourthGridsquareCharacter(remainderLat, LatDirection));

            decimal ddmLonMinsWithRemainder = LonDirection * (minsRemainderLon + DDMlonMinutes);
            decimal nearestEvenMultipleLon  = ConversionHelper.GetNearestEvenMultiple(ddmLonMinsWithRemainder, 2);

            GridsquareResult.Append(GridsquareHelper.GetFifthGridsquareCharacter(LonDirection, nearestEvenMultipleLon));

            decimal ddmLatMinsWithRemainder = LatDirection * DDMlatMinutes;
            decimal nearestEvenMultipleLat  = ConversionHelper.GetNearestEvenMultiple(ddmLatMinsWithRemainder, 1);

            GridsquareResult.Append(GridsquareHelper.GetSixthGridsquareCharacter(LatDirection, nearestEvenMultipleLat));

            if (GridsquareResult.Length != 6)
            {
                return("NoCalc");
            }

            return(GridsquareResult.ToString());
        }
コード例 #9
0
        public void Test_GridSquareHelper()
        {
            var gsh = new GridSquareHelper();

            Assert.IsTrue(gsh.GetType().Name == "GridSquareHelper");
        }
コード例 #10
0
 public GridDdmExpert()
 {
     GridsquareHelper   = new GridSquareHelper();
     LookuptablesHelper = new LookupTablesHelper();
 }
コード例 #11
0
        static void Main(string[] args)
        {
            //var items = typeof(Via).GetValues().ToArray();
            //var optionValues = OptionValue.FromType(typeof(Mode), false, false);

            //var myname = new MyNameTag();
            //myname.SetValue("Alex Jennings");

            //var qsoDate = new QsoDateTag();
            //qsoDate.SetValue(DateTime.Now);

            //var mynametext = myname.Build();
            //var qsodatetext = qsoDate.Build();

            //var g = new ADIF.NET.Helpers.GridSquareHelper();
            //var ersu = g.GetGridSquare("3205 W. Avondale Dr, Denver, CO", ADIF.NET.Helpers.GridSquareHelper.LookupType.Address);

            var cg = new CreditGrantedTag();

            cg.AddValue("WAS", "CARD");
            cg.AddValue("SOTA");
            cg.AddValue("IOTA", "LOTW");
            cg.AddValue("IOTA", "CARD");
            cg.AddValue("IOTA", "BUR");
            Console.WriteLine(cg.TextValue);

            var credits = Values.Credits;

            ADIFCreditList.Parse("IOTA,WAS:LOTW&CARD,DXCC:CARD");

            var p = new Parser();

            p.LoadFile(@"C:\Users\S017138\Desktop\wsjtx_log - Copy.adi");
            var result = p.Parse();


            return;


            var listTag = new List <Dictionary <string, string> >();

            listTag.Add(new Dictionary <string, string>()
            {
                { "Band", "20m" }, { "Call", "K5GHM" }, { "TIME_ON", "2025" }, { "QSO_DATE", "2022-01-15" },
                { "My_Sig_Info", "K-9615" }, { "Mode", "USB" }, { "Operator", "K0UOG" }
            });
            listTag.Add(new Dictionary <string, string>()
            {
                { "Band", "20m" }, { "Call", "KA7TXS" }, { "TIME_ON", "2026" }, { "QSO_DATE", "2022-01-15" },
                { "My_Sig_Info", "K-9615" }, { "Mode", "USB" }, { "Operator", "K0UOG" }
            });
            listTag.Add(new Dictionary <string, string>()
            {
                { "Band", "20m" }, { "Call", "W6SPK" }, { "TIME_ON", "2028" }, { "QSO_DATE", "2022-01-15" },
                { "My_Sig_Info", "K-9615" }, { "Mode", "USB" }, { "Operator", "K0UOG" }
            });
            listTag.Add(new Dictionary <string, string>()
            {
                { "Band", "20m" }, { "Call", "KC5AKB" }, { "TIME_ON", "2029" }, { "QSO_DATE", "2022-01-15" },
                { "My_Sig_Info", "K-9615" }, { "Mode", "USB" }, { "Operator", "K0UOG" }
            });
            listTag.Add(new Dictionary <string, string>()
            {
                { "Band", "20m" }, { "Call", "KC5NX" }, { "TIME_ON", "2030" }, { "QSO_DATE", "2022-01-15" },
                { "My_Sig_Info", "K-9615" }, { "Mode", "USB" }, { "Operator", "K0UOG" }
            });
            listTag.Add(new Dictionary <string, string>()
            {
                { "Band", "20m" }, { "Call", "KB5ZYC" }, { "TIME_ON", "2033" }, { "QSO_DATE", "2022-01-15" },
                { "My_Sig_Info", "K-9615" }, { "Mode", "USB" }, { "Operator", "K0UOG" }, { "SIG_INFO", "K-1127" }
            });
            listTag.Add(new Dictionary <string, string>()
            {
                { "Band", "20m" }, { "Call", "KD9KSR" }, { "TIME_ON", "2035" }, { "QSO_DATE", "2022-01-15" },
                { "My_Sig_Info", "K-9615" }, { "Mode", "USB" }, { "Operator", "K0UOG" }
            });
            listTag.Add(new Dictionary <string, string>()
            {
                { "Band", "20m" }, { "Call", "AD0WN" }, { "TIME_ON", "2036" }, { "QSO_DATE", "2022-01-15" },
                { "My_Sig_Info", "K-9615" }, { "Mode", "USB" }, { "Operator", "K0UOG" }
            });
            listTag.Add(new Dictionary <string, string>()
            {
                { "Band", "20m" }, { "Call", "W5NXK" }, { "TIME_ON", "2037" }, { "QSO_DATE", "2022-01-15" },
                { "My_Sig_Info", "K-9615" }, { "Mode", "USB" }, { "Operator", "K0UOG" }
            });
            listTag.Add(new Dictionary <string, string>()
            {
                { "Band", "20m" }, { "Call", "W6VIP" }, { "TIME_ON", "2037" }, { "QSO_DATE", "2022-01-15" },
                { "My_Sig_Info", "K-9615" }, { "Mode", "USB" }, { "Operator", "K0UOG" }, { "SIG_INFO", "K-8325" }
            });
            listTag.Add(new Dictionary <string, string>()
            {
                { "Band", "20m" }, { "Call", "N8AJM" }, { "TIME_ON", "2038" }, { "QSO_DATE", "2022-01-15" },
                { "My_Sig_Info", "K-9615" }, { "Mode", "USB" }, { "Operator", "K0UOG" }
            });
            listTag.Add(new Dictionary <string, string>()
            {
                { "Band", "20m" }, { "Call", "KN6KI" }, { "TIME_ON", "2039" }, { "QSO_DATE", "2022-01-15" },
                { "My_Sig_Info", "K-9615" }, { "Mode", "USB" }, { "Operator", "K0UOG" }
            });
            listTag.Add(new Dictionary <string, string>()
            {
                { "Band", "20m" }, { "Call", "KC2VOM" }, { "TIME_ON", "2041" }, { "QSO_DATE", "2022-01-15" },
                { "My_Sig_Info", "K-9615" }, { "Mode", "USB" }, { "Operator", "K0UOG" }, { "SIG_INFO", "K-1587" }
            });
            listTag.Add(new Dictionary <string, string>()
            {
                { "Band", "20m" }, { "Call", "W0RMS" }, { "TIME_ON", "2043" }, { "QSO_DATE", "2022-01-15" },
                { "My_Sig_Info", "K-9615" }, { "Mode", "USB" }, { "Operator", "K0UOG" }
            });
            listTag.Add(new Dictionary <string, string>()
            {
                { "Band", "20m" }, { "Call", "KC3PIP" }, { "TIME_ON", "2044" }, { "QSO_DATE", "2022-01-15" },
                { "My_Sig_Info", "K-9615" }, { "Mode", "USB" }, { "Operator", "K0UOG" }
            });
            listTag.Add(new Dictionary <string, string>()
            {
                { "Band", "20m" }, { "Call", "AC0CU" }, { "TIME_ON", "2044" }, { "QSO_DATE", "2022-01-15" },
                { "My_Sig_Info", "K-9615" }, { "Mode", "USB" }, { "Operator", "K0UOG" }
            });
            listTag.Add(new Dictionary <string, string>()
            {
                { "Band", "20m" }, { "Call", "KF0CGP" }, { "TIME_ON", "2045" }, { "QSO_DATE", "2022-01-15" },
                { "My_Sig_Info", "K-9615" }, { "Mode", "USB" }, { "Operator", "K0UOG" }
            });
            listTag.Add(new Dictionary <string, string>()
            {
                { "Band", "20m" }, { "Call", "K7ANK" }, { "TIME_ON", "2050" }, { "QSO_DATE", "2022-01-15" },
                { "My_Sig_Info", "K-9615" }, { "Mode", "USB" }, { "Operator", "K0UOG" }, { "SIG_INFO", "K-9579" }
            });
            listTag.Add(new Dictionary <string, string>()
            {
                { "Band", "20m" }, { "Call", "K7ANK" }, { "TIME_ON", "2050" }, { "QSO_DATE", "2022-01-15" },
                { "My_Sig_Info", "K-9615" }, { "Mode", "USB" }, { "Operator", "K0UOG" }, { "SIG_INFO", "K-5640" }
            });
            listTag.Add(new Dictionary <string, string>()
            {
                { "Band", "20m" }, { "Call", "K7ANK" }, { "TIME_ON", "2050" }, { "QSO_DATE", "2022-01-15" },
                { "My_Sig_Info", "K-9615" }, { "Mode", "USB" }, { "Operator", "K0UOG" }, { "SIG_INFO", "K-4572" }
            });
            listTag.Add(new Dictionary <string, string>()
            {
                { "Band", "20m" }, { "Call", "AJ5C" }, { "TIME_ON", "2052" }, { "QSO_DATE", "2022-01-15" },
                { "My_Sig_Info", "K-9615" }, { "Mode", "USB" }, { "Operator", "K0UOG" }
            });
            listTag.Add(new Dictionary <string, string>()
            {
                { "Band", "20m" }, { "Call", "VA7DBJ" }, { "TIME_ON", "2053" }, { "QSO_DATE", "2022-01-15" },
                { "My_Sig_Info", "K-9615" }, { "Mode", "USB" }, { "Operator", "K0UOG" }, { "SIG_INFO", "VE-3660" }
            });
            listTag.Add(new Dictionary <string, string>()
            {
                { "Band", "20m" }, { "Call", "K5TAO" }, { "TIME_ON", "2054" }, { "QSO_DATE", "2022-01-15" },
                { "My_Sig_Info", "K-9615" }, { "Mode", "USB" }, { "Operator", "K0UOG" }
            });
            listTag.Add(new Dictionary <string, string>()
            {
                { "Band", "20m" }, { "Call", "W2GZQ" }, { "TIME_ON", "2057" }, { "QSO_DATE", "2022-01-15" },
                { "My_Sig_Info", "K-9615" }, { "Mode", "USB" }, { "Operator", "K0UOG" }, { "SIG_INFO", "K-3433" }
            });
            listTag.Add(new Dictionary <string, string>()
            {
                { "Band", "20m" }, { "Call", "KC3SDQ" }, { "TIME_ON", "2059" }, { "QSO_DATE", "2022-01-15" },
                { "My_Sig_Info", "K-9615" }, { "Mode", "USB" }, { "Operator", "K0UOG" }
            });
            listTag.Add(new Dictionary <string, string>()
            {
                { "Band", "20m" }, { "Call", "N5USD" }, { "TIME_ON", "2101" }, { "QSO_DATE", "2022-01-15" },
                { "My_Sig_Info", "K-9615" }, { "Mode", "USB" }, { "Operator", "K0UOG" }
            });
            listTag.Add(new Dictionary <string, string>()
            {
                { "Band", "20m" }, { "Call", "KD9HZZ" }, { "TIME_ON", "2103" }, { "QSO_DATE", "2022-01-15" },
                { "My_Sig_Info", "K-9615" }, { "Mode", "USB" }, { "Operator", "K0UOG" }
            });
            listTag.Add(new Dictionary <string, string>()
            {
                { "Band", "20m" }, { "Call", "VE7QH" }, { "TIME_ON", "2104" }, { "QSO_DATE", "2022-01-15" },
                { "My_Sig_Info", "K-9615" }, { "Mode", "USB" }, { "Operator", "K0UOG" }, { "SIG_INFO", "VE-0445" }
            });
            listTag.Add(new Dictionary <string, string>()
            {
                { "Band", "20m" }, { "Call", "N7TWB" }, { "TIME_ON", "2105" }, { "QSO_DATE", "2022-01-15" },
                { "My_Sig_Info", "K-9615" }, { "Mode", "USB" }, { "Operator", "K0UOG" }
            });
            listTag.Add(new Dictionary <string, string>()
            {
                { "Band", "20m" }, { "Call", "K5CEL" }, { "TIME_ON", "2106" }, { "QSO_DATE", "2022-01-15" },
                { "My_Sig_Info", "K-9615" }, { "Mode", "USB" }, { "Operator", "K0UOG" }
            });
            listTag.Add(new Dictionary <string, string>()
            {
                { "Band", "20m" }, { "Call", "AB3VK" }, { "TIME_ON", "2103" }, { "QSO_DATE", "2022-01-15" },
                { "My_Sig_Info", "K-9615" }, { "Mode", "USB" }, { "Operator", "K0UOG" }
            });
            listTag.Add(new Dictionary <string, string>()
            {
                { "Band", "20m" }, { "Call", "N6WHY" }, { "TIME_ON", "2109" }, { "QSO_DATE", "2022-01-15" },
                { "My_Sig_Info", "K-9615" }, { "Mode", "USB" }, { "Operator", "K0UOG" }, { "SIG_INFO", "K-0210" }
            });
            listTag.Add(new Dictionary <string, string>()
            {
                { "Band", "20m" }, { "Call", "AD0BC" }, { "TIME_ON", "2111" }, { "QSO_DATE", "2022-01-15" },
                { "My_Sig_Info", "K-9615" }, { "Mode", "USB" }, { "Operator", "K0UOG" }
            });
            listTag.Add(new Dictionary <string, string>()
            {
                { "Band", "20m" }, { "Call", "W4TMD" }, { "TIME_ON", "2112" }, { "QSO_DATE", "2022-01-15" },
                { "My_Sig_Info", "K-9615" }, { "Mode", "USB" }, { "Operator", "K0UOG" }
            });
            listTag.Add(new Dictionary <string, string>()
            {
                { "Band", "20m" }, { "Call", "KN4ABC" }, { "TIME_ON", "2113" }, { "QSO_DATE", "2022-01-15" },
                { "My_Sig_Info", "K-9615" }, { "Mode", "USB" }, { "Operator", "K0UOG" }
            });
            listTag.Add(new Dictionary <string, string>()
            {
                { "Band", "20m" }, { "Call", "W5AZO" }, { "TIME_ON", "2113" }, { "QSO_DATE", "2022-01-15" },
                { "My_Sig_Info", "K-9615" }, { "Mode", "USB" }, { "Operator", "K0UOG" }
            });
            listTag.Add(new Dictionary <string, string>()
            {
                { "Band", "20m" }, { "Call", "N7HDD" }, { "TIME_ON", "2114" }, { "QSO_DATE", "2022-01-15" },
                { "My_Sig_Info", "K-9615" }, { "Mode", "USB" }, { "Operator", "K0UOG" }
            });
            listTag.Add(new Dictionary <string, string>()
            {
                { "Band", "20m" }, { "Call", "N5HA" }, { "TIME_ON", "2115" }, { "QSO_DATE", "2022-01-15" },
                { "My_Sig_Info", "K-9615" }, { "Mode", "USB" }, { "Operator", "K0UOG" }
            });
            listTag.Add(new Dictionary <string, string>()
            {
                { "Band", "20m" }, { "Call", "KC0ECQ" }, { "TIME_ON", "2116" }, { "QSO_DATE", "2022-01-15" },
                { "My_Sig_Info", "K-9615" }, { "Mode", "USB" }, { "Operator", "K0UOG" }
            });
            listTag.Add(new Dictionary <string, string>()
            {
                { "Band", "20m" }, { "Call", "KW7G" }, { "TIME_ON", "2117" }, { "QSO_DATE", "2022-01-15" },
                { "My_Sig_Info", "K-9615" }, { "Mode", "USB" }, { "Operator", "K0UOG" }
            });
            listTag.Add(new Dictionary <string, string>()
            {
                { "Band", "20m" }, { "Call", "K5KTD" }, { "TIME_ON", "2118" }, { "QSO_DATE", "2022-01-15" },
                { "My_Sig_Info", "K-9615" }, { "Mode", "USB" }, { "Operator", "K0UOG" }
            });
            listTag.Add(new Dictionary <string, string>()
            {
                { "Band", "20m" }, { "Call", "W9RFU" }, { "TIME_ON", "2119" }, { "QSO_DATE", "2022-01-15" },
                { "My_Sig_Info", "K-9615" }, { "Mode", "USB" }, { "Operator", "K0UOG" }
            });
            listTag.Add(new Dictionary <string, string>()
            {
                { "Band", "20m" }, { "Call", "K6BME" }, { "TIME_ON", "2119" }, { "QSO_DATE", "2022-01-15" },
                { "My_Sig_Info", "K-9615" }, { "Mode", "USB" }, { "Operator", "K0UOG" }, { "SIG_INFO", "K-1139" }
            });
            listTag.Add(new Dictionary <string, string>()
            {
                { "Band", "20m" }, { "Call", "W1EDX" }, { "TIME_ON", "2120" }, { "QSO_DATE", "2022-01-15" },
                { "My_Sig_Info", "K-9615" }, { "Mode", "USB" }, { "Operator", "K0UOG" }
            });
            listTag.Add(new Dictionary <string, string>()
            {
                { "Band", "20m" }, { "Call", "K7PYP" }, { "TIME_ON", "2120" }, { "QSO_DATE", "2022-01-15" },
                { "My_Sig_Info", "K-9615" }, { "Mode", "USB" }, { "Operator", "K0UOG" }
            });
            listTag.Add(new Dictionary <string, string>()
            {
                { "Band", "20m" }, { "Call", "W1EDX" }, { "TIME_ON", "2120" }, { "QSO_DATE", "2022-01-15" },
                { "My_Sig_Info", "K-9615" }, { "Mode", "USB" }, { "Operator", "K0UOG" }
            });
            listTag.Add(new Dictionary <string, string>()
            {
                { "Band", "20m" }, { "Call", "K7RJ" }, { "TIME_ON", "2123" }, { "QSO_DATE", "2022-01-15" },
                { "My_Sig_Info", "K-9615" }, { "Mode", "USB" }, { "Operator", "K0UOG" }
            });
            listTag.Add(new Dictionary <string, string>()
            {
                { "Band", "20m" }, { "Call", "KI5KOI" }, { "TIME_ON", "2124" }, { "QSO_DATE", "2022-01-15" },
                { "My_Sig_Info", "K-9615" }, { "Mode", "USB" }, { "Operator", "K0UOG" }, { "SIG_INFO", "K-0315" }
            });
            listTag.Add(new Dictionary <string, string>()
            {
                { "Band", "20m" }, { "Call", "W7RTA" }, { "TIME_ON", "2125" }, { "QSO_DATE", "2022-01-15" },
                { "My_Sig_Info", "K-9615" }, { "Mode", "USB" }, { "Operator", "K0UOG" }, { "SIG_INFO", "K-2843" }
            });
            listTag.Add(new Dictionary <string, string>()
            {
                { "Band", "20m" }, { "Call", "WO4ROG" }, { "TIME_ON", "2126" }, { "QSO_DATE", "2022-01-15" },
                { "My_Sig_Info", "K-9615" }, { "Mode", "USB" }, { "Operator", "K0UOG" }
            });
            listTag.Add(new Dictionary <string, string>()
            {
                { "Band", "20m" }, { "Call", "WI6NG" }, { "TIME_ON", "2126" }, { "QSO_DATE", "2022-01-15" },
                { "My_Sig_Info", "K-9615" }, { "Mode", "USB" }, { "Operator", "K0UOG" }, { "SIG_INFO", "K-3421" }
            });
            listTag.Add(new Dictionary <string, string>()
            {
                { "Band", "20m" }, { "Call", "K5LDA" }, { "TIME_ON", "2128" }, { "QSO_DATE", "2022-01-15" },
                { "My_Sig_Info", "K-9615" }, { "Mode", "USB" }, { "Operator", "K0UOG" }
            });
            listTag.Add(new Dictionary <string, string>()
            {
                { "Band", "20m" }, { "Call", "WD8PVS" }, { "TIME_ON", "2129" }, { "QSO_DATE", "2022-01-15" },
                { "My_Sig_Info", "K-9615" }, { "Mode", "USB" }, { "Operator", "K0UOG" }
            });
            listTag.Add(new Dictionary <string, string>()
            {
                { "Band", "20m" }, { "Call", "N1ATV" }, { "TIME_ON", "2132" }, { "QSO_DATE", "2022-01-15" },
                { "My_Sig_Info", "K-9615" }, { "Mode", "USB" }, { "Operator", "K0UOG" }
            });
            listTag.Add(new Dictionary <string, string>()
            {
                { "Band", "20m" }, { "Call", "K6TVB" }, { "TIME_ON", "2133" }, { "QSO_DATE", "2022-01-15" },
                { "My_Sig_Info", "K-9615" }, { "Mode", "USB" }, { "Operator", "K0UOG" }
            });
            listTag.Add(new Dictionary <string, string>()
            {
                { "Band", "20m" }, { "Call", "KW2DX" }, { "TIME_ON", "2135" }, { "QSO_DATE", "2022-01-15" },
                { "My_Sig_Info", "K-9615" }, { "Mode", "USB" }, { "Operator", "K0UOG" }
            });
            listTag.Add(new Dictionary <string, string>()
            {
                { "Band", "20m" }, { "Call", "N1KJS" }, { "TIME_ON", "2136" }, { "QSO_DATE", "2022-01-15" },
                { "My_Sig_Info", "K-9615" }, { "Mode", "USB" }, { "Operator", "K0UOG" }
            });
            listTag.Add(new Dictionary <string, string>()
            {
                { "Band", "20m" }, { "Call", "N8DGD" }, { "TIME_ON", "2137" }, { "QSO_DATE", "2022-01-15" },
                { "My_Sig_Info", "K-9615" }, { "Mode", "USB" }, { "Operator", "K0UOG" }
            });
            listTag.Add(new Dictionary <string, string>()
            {
                { "Band", "20m" }, { "Call", "W1CLM" }, { "TIME_ON", "2141" }, { "QSO_DATE", "2022-01-15" },
                { "My_Sig_Info", "K-9615" }, { "Mode", "USB" }, { "Operator", "K0UOG" }
            });
            listTag.Add(new Dictionary <string, string>()
            {
                { "Band", "20m" }, { "Call", "WB8UBR" }, { "TIME_ON", "2143" }, { "QSO_DATE", "2022-01-15" },
                { "My_Sig_Info", "K-9615" }, { "Mode", "USB" }, { "Operator", "K0UOG" }
            });
            listTag.Add(new Dictionary <string, string>()
            {
                { "Band", "20m" }, { "Call", "WB6MPH" }, { "TIME_ON", "2144" }, { "QSO_DATE", "2022-01-15" },
                { "My_Sig_Info", "K-9615" }, { "Mode", "USB" }, { "Operator", "K0UOG" }, { "SIG_INFO", "K-1204" }
            });
            listTag.Add(new Dictionary <string, string>()
            {
                { "Band", "20m" }, { "Call", "W5ALE" }, { "TIME_ON", "2145" }, { "QSO_DATE", "2022-01-15" },
                { "My_Sig_Info", "K-9615" }, { "Mode", "USB" }, { "Operator", "K0UOG" }
            });
            listTag.Add(new Dictionary <string, string>()
            {
                { "Band", "20m" }, { "Call", "KN6KOR" }, { "TIME_ON", "2146" }, { "QSO_DATE", "2022-01-15" },
                { "My_Sig_Info", "K-9615" }, { "Mode", "USB" }, { "Operator", "K0UOG" }, { "SIG_INFO", "K-7377" }
            });
            listTag.Add(new Dictionary <string, string>()
            {
                { "Band", "20m" }, { "Call", "K9TDW" }, { "TIME_ON", "2147" }, { "QSO_DATE", "2022-01-15" },
                { "My_Sig_Info", "K-9615" }, { "Mode", "USB" }, { "Operator", "K0UOG" }
            });
            listTag.Add(new Dictionary <string, string>()
            {
                { "Band", "20m" }, { "Call", "W6GAE" }, { "TIME_ON", "2148" }, { "QSO_DATE", "2022-01-15" },
                { "My_Sig_Info", "K-9615" }, { "Mode", "USB" }, { "Operator", "K0UOG" }
            });
            listTag.Add(new Dictionary <string, string>()
            {
                { "Band", "20m" }, { "Call", "W5JCC" }, { "TIME_ON", "2149" }, { "QSO_DATE", "2022-01-15" },
                { "My_Sig_Info", "K-9615" }, { "Mode", "USB" }, { "Operator", "K0UOG" }
            });
            listTag.Add(new Dictionary <string, string>()
            {
                { "Band", "20m" }, { "Call", "KE8JKW" }, { "TIME_ON", "2149" }, { "QSO_DATE", "2022-01-15" },
                { "My_Sig_Info", "K-9615" }, { "Mode", "USB" }, { "Operator", "K0UOG" }
            });
            listTag.Add(new Dictionary <string, string>()
            {
                { "Band", "20m" }, { "Call", "AA3C" }, { "TIME_ON", "2150" }, { "QSO_DATE", "2022-01-15" },
                { "My_Sig_Info", "K-9615" }, { "Mode", "USB" }, { "Operator", "K0UOG" }
            });
            listTag.Add(new Dictionary <string, string>()
            {
                { "Band", "20m" }, { "Call", "K4QQG" }, { "TIME_ON", "2151" }, { "QSO_DATE", "2022-01-15" },
                { "My_Sig_Info", "K-9615" }, { "Mode", "USB" }, { "Operator", "K0UOG" }
            });
            listTag.Add(new Dictionary <string, string>()
            {
                { "Band", "20m" }, { "Call", "KK4DX" }, { "TIME_ON", "2151" }, { "QSO_DATE", "2022-01-15" },
                { "My_Sig_Info", "K-9615" }, { "Mode", "USB" }, { "Operator", "K0UOG" }
            });
            listTag.Add(new Dictionary <string, string>()
            {
                { "Band", "20m" }, { "Call", "KS9Q" }, { "TIME_ON", "2152" }, { "QSO_DATE", "2022-01-15" },
                { "My_Sig_Info", "K-9615" }, { "Mode", "USB" }, { "Operator", "K0UOG" }
            });
            listTag.Add(new Dictionary <string, string>()
            {
                { "Band", "20m" }, { "Call", "KW9E" }, { "TIME_ON", "2157" }, { "QSO_DATE", "2022-01-15" },
                { "My_Sig_Info", "K-9615" }, { "Mode", "USB" }, { "Operator", "K0UOG" }
            });
            listTag.Add(new Dictionary <string, string>()
            {
                { "Band", "20m" }, { "Call", "W5NNI" }, { "TIME_ON", "2158" }, { "QSO_DATE", "2022-01-15" },
                { "My_Sig_Info", "K-9615" }, { "Mode", "USB" }, { "Operator", "K0UOG" }, { "SIG_INFO", "K-3000" }
            });
            listTag.Add(new Dictionary <string, string>()
            {
                { "Band", "20m" }, { "Call", "K9WBT" }, { "TIME_ON", "2159" }, { "QSO_DATE", "2022-01-15" },
                { "My_Sig_Info", "K-9615" }, { "Mode", "USB" }, { "Operator", "K0UOG" }
            });
            listTag.Add(new Dictionary <string, string>()
            {
                { "Band", "20m" }, { "Call", "KE8RAJ" }, { "TIME_ON", "2204" }, { "QSO_DATE", "2022-01-15" },
                { "My_Sig_Info", "K-9615" }, { "Mode", "USB" }, { "Operator", "K0UOG" }
            });
            listTag.Add(new Dictionary <string, string>()
            {
                { "Band", "20m" }, { "Call", "K5KTD" }, { "TIME_ON", "2205" }, { "QSO_DATE", "2022-01-15" },
                { "My_Sig_Info", "K-9615" }, { "Mode", "USB" }, { "Operator", "K0UOG" }
            });
            listTag.Add(new Dictionary <string, string>()
            {
                { "Band", "20m" }, { "Call", "W3BAY" }, { "TIME_ON", "2209" }, { "QSO_DATE", "2022-01-15" },
                { "My_Sig_Info", "K-9615" }, { "Mode", "USB" }, { "Operator", "K0UOG" }, { "SIG_INFO", "K-4471" }
            });
            listTag.Add(new Dictionary <string, string>()
            {
                { "Band", "20m" }, { "Call", "W3BAY" }, { "TIME_ON", "2209" }, { "QSO_DATE", "2022-01-15" },
                { "My_Sig_Info", "K-9615" }, { "Mode", "USB" }, { "Operator", "K0UOG" }, { "SIG_INFO", "K-4559" }
            });
            listTag.Add(new Dictionary <string, string>()
            {
                { "Band", "20m" }, { "Call", "N6EF" }, { "TIME_ON", "2214" }, { "QSO_DATE", "2022-01-15" },
                { "My_Sig_Info", "K-9615" }, { "Mode", "USB" }, { "Operator", "K0UOG" }, { "SIG_INFO", "K-3584" }
            });
            listTag.Add(new Dictionary <string, string>()
            {
                { "Band", "20m" }, { "Call", "W7JSJ" }, { "TIME_ON", "2218" }, { "QSO_DATE", "2022-01-15" },
                { "My_Sig_Info", "K-9615" }, { "Mode", "USB" }, { "Operator", "K0UOG" }, { "SIG_INFO", "K-3261" }
            });
            listTag.Add(new Dictionary <string, string>()
            {
                { "Band", "20m" }, { "Call", "WB4E" }, { "TIME_ON", "2225" }, { "QSO_DATE", "2022-01-15" },
                { "My_Sig_Info", "K-9615" }, { "Mode", "USB" }, { "Operator", "K0UOG" }, { "SIG_INFO", "K-2964" }
            });



            var dataset = new ADIFDataSet(listTag);

            dataset.ToADIF(@"C:\Users\S017138\Desktop\[email protected]", EmitFlags.AddCreatedTimestampIfNotPresent | EmitFlags.AddProgramIdIfNotPresent | EmitFlags.MirrorOperatorAndStationCallSign);

            return;

            var utag = new UserDefValueTag(null);

            var file   = @"C:\Users\S017138\Desktop\[email protected]";
            var parser = new Parser();

            parser.LoadFile(file);
            var res = parser.Parse();
            //var coll = parser.GetQsoCollection();

            var callTag = new CallTag();

            callTag.SetValue("N7LV");

            var bandTag = new BandTag();

            bandTag.SetValue("20m");

            var opTag = new OperatorTag();

            opTag.SetValue("K0UOG");

            var modeTag = new ModeTag();

            modeTag.SetValue("CW");

            var qso  = new ADIFQSO(callTag, bandTag, opTag, modeTag, new EndRecordTag());
            var adif = new ADIFDataSet();

            adif.QSOs = new ADIFQSOCollection();
            adif.QSOs.Add(qso);


            var str = adif.ToADIF(EmitFlags.LowercaseTagNames | EmitFlags.AddCreatedTimestampIfNotPresent | EmitFlags.AddProgramIdIfNotPresent | EmitFlags.MirrorOperatorAndStationCallSign);

            var countries = ADIFEnumeration.Get("Band");

            //var band = Band.Get(2.14566333);

            var alaskaRegex = @"^P[A-I].{1,}$";

            var is1 = System.Text.RegularExpressions.Regex.IsMatch("XE2TN", alaskaRegex);
            var is2 = System.Text.RegularExpressions.Regex.IsMatch("XX4HG", alaskaRegex);
            var is3 = System.Text.RegularExpressions.Regex.IsMatch("XA4TN", alaskaRegex);
            var is4 = System.Text.RegularExpressions.Regex.IsMatch("N0MTN", alaskaRegex);
            var is5 = System.Text.RegularExpressions.Regex.IsMatch("AL91B", alaskaRegex);

            var band = Band.IsFrequencyInBand("20m", 14.101, 2);



            //var loc = new ADIFLocation(locStr);
            //var decDeg = loc.ToDecimalDegrees();

            var myGrid = new GridSquareHelper().GetGridSquareFromCall("K0UOG");

            //var r1 ="NA-009".IsSotaDesignator();
            //var r2 = "AN-999".IsSotaDesignator();
            //var r3 = "W0C/FR-001".IsSotaDesignator();
            //var r4 = "G/LP-009".IsSotaDesignator();
            //var r5 = "LZ/RO-008".IsSotaDesignator();

            //var primarysubs = OptionValue.FromDatabase(@"C:\adif.db", Resources.RetrieveCountryCodesSql);

            //var sqlHelper = new SQLiteHelper(@"C:\adif.db", true, false);

            //sqlHelper.DropTable("PrimaryAdminSubdivisions");
            //sqlHelper.ExecuteNonQuery("create table Contests (ContestId varchar(75) not null primary key, ContestName varchar(255) not null, Deprecated bit not null, ValidStart real, ValidEnd real);");
            //sqlHelper.ExecuteNonQuery("update PrimaryAdminSubdivisions set Deprecated = 0");
            //sqlHelper.ExecuteNonQuery("Alter table PrimaryAdminSubdivisions alter column Deprecated bit not null");
            //sqlHelper.ExecuteNonQuery("Alter table PrimaryAdminSubdivisions add AlternateCodeName varchar(150)");
            //sqlHelper.ExecuteNonQuery("Alter table PrimaryAdminSubdivisions add ValidUntil int");
            //sqlHelper.ExecuteNonQuery("update PrimaryAdminSubdivisions set Id = rowid");

            //sqlHelper.ExecuteNonQuery(@"
            //");

            //sqlHelper.ExecuteNonQuery("update PrimaryAdminSubdivisions set Id = rowid");
            //sqlHelper.ExecuteNonQuery("update PrimaryAdminSubdivisions set Prefix = NULL WHERE Prefix = ''");
            //sqlHelper.ExecuteNonQuery("update PrimaryAdminSubdivisions set Deprecated = 0 WHERE Deprecated IS NULL");
            //var data = sqlHelper.ReadData("SELECT * FROM PrimaryAdminSubdivisions");

            //for (var x = 0; x < parser.QsoCount; x++) {
            //  var qso = parser.GetQso(x);

            //  if (qso != null)
            //    Console.WriteLine(qso.ToKeyPairString());
            //  }
        }