示例#1
0
        private void ParseBand(string band)
        {
            bandStates.Clear();
            LOTWMode LOTWmode = new LOTWMode();

            //band = band.ToUpper();
            foreach (string s in MainWindow2.allWAS)
            {
                string[] tokens   = s.Split(new string[] { " " }, StringSplitOptions.None);
                string   thisBand = tokens[0];
                string   mode     = tokens[1];
                string   state    = tokens[2];
                LOTWmode.AddCallsign(state, mode);
                bool isTriplePlay = LOTWmode.IsTriplePlay(state);
                bool is5BandWAS   = LOTWmode.Is5BandWAS(thisBand);
                if (thisBand.Equals(band) || band.Equals(BANDALL) || (band.Equals(BANDTRIPLEPLAY) && isTriplePlay) /* || (band.Equals(BAND5BANDWAS)&&is5BandWAS) */)
                {
                    string mystate = s.Substring(s.Length - 2);
                    if (!bandStates.Contains(mystate))
                    {
                        bandStates.Add(mystate);
                    }
                }
                AddBand(thisBand);
            }
        }
示例#2
0
        private void ParseBandMode(string band, string mode)
        {
            LOTWMode LOTWmode = new LOTWMode();

            if ((!mode.Equals("ALL") && !band.Equals("All")) && (!band.Equals("Digital") && !band.Equals("TriplePlay") /*&& !band.Equals(BAND5BANDWAS)*/))
            {
                bandStates.Clear();
            }
            //band = band.ToUpper();
            mode = " " + mode + " ";
            foreach (string s in MainWindow2.allWAS)
            {
                string[] tokens  = s.Split(new string[] { " " }, StringSplitOptions.None);
                string   myband  = tokens[0];
                string   mymode  = tokens[1];
                string   mystate = tokens[2];
                LOTWmode.AddCallsign(mystate, mymode);
                Boolean modeOK        = s.Contains(mode) || mode.Equals(" " + MODEALL + " ");
                Boolean bandOK        = myband.Equals(band) || band.Equals(BANDALL);
                Boolean isDigitalMode = LOTWmode.IsModeDigital(mymode) && band.Contains("Digital");
                Boolean isTriplePlay  = LOTWmode.IsTriplePlay(mystate) && band.Contains("TriplePlay");
                Boolean is5BandWAS    = LOTWmode.Is5BandWAS(myband) && (band.Contains(BAND5BANDWAS) /*|| mode.Contains(BAND5BANDWAS)*/);
                if ((bandOK && modeOK) || isDigitalMode || isTriplePlay || is5BandWAS)
                {
                    string state = s.Substring(s.Length - 2);
                    if (!bandStates.Contains(state))
                    {
                        bandStates.Add(state);
                    }
                }
            }
            //MessageBox.Show("Bandstates=" + bandStates.Count);
        }
示例#3
0
        private void ParseBandMode(string band, string mode)
        {
            LOTWMode LOTWmode = new LOTWMode();

            bandStates.Clear();
            mode = " " + mode + " ";
            foreach (string s in MainWindow2.allWAS)
            {
                string[] tokens  = s.Split(new string[] { " " }, StringSplitOptions.None);
                string   myband  = tokens[0];
                string   mymode  = tokens[1];
                string   mystate = tokens[2];
                LOTWmode.AddCallsign(mystate, mymode);
                AddBand(myband);
                //string myband = s.Substring(0, band.Length);
                Boolean modeOK        = s.Contains(mode) || mode.Equals(" " + MODEALL + " ");
                Boolean bandOK        = myband.Equals(band) || band.Equals(BANDALL);
                Boolean isDigitalMode = LOTWmode.IsModeDigital(mymode) && band.Equals("Digital");
                Boolean isTriplePlay  = LOTWmode.IsTriplePlay(mystate) && band.Equals("TriplePlay");
                Boolean is5BandWAS    = LOTWmode.Is5BandWAS(myband) && band.Equals("5-Band WAS");
                //if ((bandOK && modeOK) || (modeOK && isDigitalMode && ban|| isTriplePlay)
                if ((bandOK && modeOK) || isTriplePlay || isDigitalMode || is5BandWAS)
                {
                    string state = s.Substring(s.Length - 2);
                    bandStates.Add(state);
                }
            }
        }