Beispiel #1
0
        private RichLabelFormattingOptions FromString(object value)
        {
            string[] values = ((string)value).Split(',');
            if (values.Length != 2)
            {
                throw new ArgumentException("Could not convert the value");
            }

            try
            {
                RichLabelTextType type = (RichLabelTextType)Enum.Parse(typeof(RichLabelTextType), values[0], true);
                string            tag  = values[1].Trim(new char[] { ' ', '<', '>' });
                return(new RichLabelFormattingOptions(type, tag));
            }
            catch
            {
                throw new ArgumentException("Could not convert the value");
            }
        }
Beispiel #2
0
 public RichLabelFormattingOptions(RichLabelTextType type, string highlightTag)
 {
     this.highlightTag = highlightTag;
     this.type         = type;
 }
Beispiel #3
0
		public RichLabelFormattingOptions(RichLabelTextType type, string highlightTag)
		{
			this.highlightTag = highlightTag;
			this.type = type;
		}