예제 #1
0
        public PointLabel(XElement node)
        {
            foreach (var attribute in node.Attributes())
            {
                var name  = attribute.Name.LocalName;
                var value = attribute.Value;
                switch (name)
                {
                case nameof(Position):
                    Position = double.Parse(value);
                    break;

                case nameof(ColorStop):
                    ColorStop = (Color)ColorConverter.ConvertFromString(value);
                    break;
                }
            }
            LabelText = FrequencyLabelSet.GetDescriptionFromXml(node);
        }
예제 #2
0
        public RangeLabel(XElement node)
        {
            foreach (var attribute in node.Attributes())
            {
                var name  = attribute.Name.LocalName;
                var value = attribute.Value;
                switch (name)
                {
                case nameof(Start):
                    Start = double.Parse(value);
                    break;

                case nameof(End):
                    End = double.Parse(value);
                    break;

                case nameof(Color):
                    Color = (Color)ColorConverter.ConvertFromString(value);
                    break;
                }
            }
            LabelText = FrequencyLabelSet.GetDescriptionFromXml(node);
        }