예제 #1
0
 public void TestInitialize()
 {
     _statValueInterval = new StatValueInterval
     {
         Color = new Color
         {
             ColorA = 122,
             ColorB = 17,
             ColorG = 201,
             ColorR = 144
         },
         IntervalLowLevel = 10,
         IntervalUpLevel = 13
     };
 }
예제 #2
0
        public MeasurePointInfo(MeasurePoint point, StatValueField field, double degreeSpan) : this()
        {
            X1 = point.Longtitute - degreeSpan / 2;
            X2 = point.Longtitute + degreeSpan / 2;
            Y1 = point.Lattitute - degreeSpan / 2;
            Y2 = point.Lattitute + degreeSpan / 2;
            double value;

            switch (field.FieldName)
            {
            case "同模干扰电平":
                value = point.Result.SameModInterferenceLevel;
                break;

            case "不同模干扰电平":
                value = point.Result.DifferentModInterferenceLevel;
                break;

            case "总干扰电平":
                value = point.Result.TotalInterferencePower;
                break;

            case "信号RSRP":
                value = point.Result.StrongestCell.ReceivedRsrp;
                break;

            default:
                value = point.Result.NominalSinr;
                break;
            }
            if (field.IntervalList.Count > 0)
            {
                StatValueInterval interval = field.IntervalList.FirstOrDefault(
                    x => x.IntervalLowLevel < value && value < x.IntervalUpLevel);
                if (interval != null)
                {
                    interval.Color.ColorA = 128;
                    ColorString           = interval.Color.ColorStringForHtml;
                    ColorStringForKml     = interval.Color.ColorStringForKml;
                }
                else
                {
                    ColorString       = "ffffff";
                    ColorStringForKml = "80FFFFFF";
                }
            }
        }
 public void TestStatValueInterval_Constructor()
 {
     XElement element = new XElement("Interval",
             new XElement("LowLevel", "11"),
             new XElement("UpLevel", "15"),
             new XElement("A", "98"),
             new XElement("B", "114"),
             new XElement("R", "198"),
             new XElement("G", "221"));
     StatValueInterval interval = new StatValueInterval(element);
     Assert.AreEqual(interval.IntervalLowLevel, 11);
     Assert.AreEqual(interval.IntervalUpLevel, 15);
     Assert.AreEqual(interval.Color.ColorA, 98);
     Assert.AreEqual(interval.Color.ColorB, 114);
     Assert.AreEqual(interval.Color.ColorG, 221);
     Assert.AreEqual(interval.Color.ColorR, 198);
 }