public LSLEditorControlTheme()
        {
            var selection = SystemColors.HighlightColor;

            _selectionColor       = new XmlColor(Color.FromArgb(178, selection.R, selection.G, selection.B));
            _selectionBorderColor = new XmlColor(_selectionColor.Clone());
        }
Exemplo n.º 2
0
        public XmlTextDescription(TextDescription textDescription)
        {
            if (textDescription == default(TextDescription))
                throw Error.InCreatingFromObject("TextDescription", GetType(), typeof (TextDescription));

            Name = textDescription.Name;
            IsBold = textDescription.IsBold;
            IsItalic = textDescription.IsItalic;
            IsOutlined = textDescription.IsOutlined;

            StandardColor = new XmlColor
                                {
                                    StateIndex = StateIndex.Enabled,
                                    ColorValue = textDescription.Color.ToArgb().ToString("{0:X8}")
                                };
            HighlightedColor = (ApplyHighlight)
                                   ? new XmlColor
                                         {
                                             StateIndex = StateIndex.Highlighted,
                                             ColorValue = textDescription.HighlightedColor.ToArgb().ToString("{0:X8}")
                                         }
                                   : default(XmlColor);
            FontFamily = textDescription.FontFamily;
            Size = textDescription.Size;
        }
Exemplo n.º 3
0
 public XmlTextDescription()
 {
     Name = FontFamily = string.Empty;
     IsBold = IsItalic = ApplyShadowing = ApplyHighlight = false;
     StandardColor = new XmlColor();
     StandardColor = new XmlColor();
     HorizontalAlignment = HorizontalAlignment.Left;
     VerticalAlignment = VerticalAlignment.Top;
     Size = 0;
 }
 private void SelectColor(Control pb, ref XmlColor color)
 {
     using (DialogColor dColor = new DialogColor(pb.BackColor))
     {
         if (dColor.ShowDialog() == DialogResult.OK)
         {
             pb.BackColor = dColor.Color;
             color        = dColor.Color;
         }
     }
 }
Exemplo n.º 5
0
		public static XmlColor[]	ConvertArray (Color []array)
		{
			XmlColor[] Result = null;
			if (array != null)
			{
				Result = new XmlColor [array.Length];
				for (int i = 0; i < array.Length; i++)
				{
					Result[i] = new XmlColor (array[i]);
				}
			}
			return Result;
		}
Exemplo n.º 6
0
        public void InitDefault()
        {
            m_MyInt       = 69;
            m_MyString    = "This is a test string";
            m_MyXmlString = new XmlString("Native XML string object");
            m_MyFloat     = 3.14f;

            m_MyXmlDateTime          = new XmlDateTime(DateTime.Now);
            m_MyXmlColor             = new XmlColor(Color.BurlyWood);
            m_MyXmlSizeF2d           = new XmlSizeF2d(452.62f, 895.7989f);
            m_MyXmlItemKeyAndValue   = new XmlItemKeyAndValue("KeyNameToUse", m_MyXmlColor);
            m_MyXmlTranslatorElement = new XmlTranslatorElement("MyInternalName", 0);
            m_MyXmlTranslatorElement.AddOrUpdate(Language.English, "My translated text", "The last modifiying person", DateTime.Now);
            m_MyXmlTranslatorElement.AddOrUpdate(Language.German, "My translated text in German", "The last modifiying person", DateTime.Now);

            m_MyXmlPen = new XmlPen(Color.Violet, 20);

            m_MyArrayList = new ArrayList();
            m_MyArrayList.Add(this.MyInt);
            m_MyArrayList.Add(this.MyFloat);
            m_MyArrayList.Add(this.MyString);
            m_MyArrayList.Add(this.MyXmlString);

            m_MyXmlList = new XmlList();
            m_MyXmlList.Add(this.MyInt);
            m_MyXmlList.Add(this.MyFloat);
            m_MyXmlList.Add(this.MyString);
            m_MyXmlList.Add(this.MyXmlString);

            m_MyXmlHashtable = new XmlHashtable();
            m_MyXmlHashtable.Add("HashElement1", m_MyInt);
            m_MyXmlHashtable.Add("HashElement2", m_MyString);
            m_MyXmlHashtable.Add("HashElement3", m_MyXmlString);
            m_MyXmlHashtable.Add("HashElement4", m_MyFloat);
            m_MyXmlHashtable.Add("HashElement5", m_MyXmlList);
        }
Exemplo n.º 7
0
		public void InitDefault ()
		{
			m_MyInt			= 69;
			m_MyString		= "This is a test string";
			m_MyXmlString	= new XmlString ("Native XML string object");
			m_MyFloat		= 3.14f;

			m_MyXmlDateTime				= new XmlDateTime (DateTime.Now);
			m_MyXmlColor				= new XmlColor	(Color.BurlyWood);
			m_MyXmlSizeF2d				= new XmlSizeF2d (452.62f, 895.7989f);
			m_MyXmlItemKeyAndValue		= new XmlItemKeyAndValue ("KeyNameToUse", m_MyXmlColor);
			m_MyXmlTranslatorElement	= new XmlTranslatorElement ("MyInternalName", 0);
			m_MyXmlTranslatorElement.AddOrUpdate (Language.English, "My translated text", "The last modifiying person", DateTime.Now);
			m_MyXmlTranslatorElement.AddOrUpdate (Language.German, "My translated text in German", "The last modifiying person", DateTime.Now);

			m_MyXmlPen			= new XmlPen (Color.Violet, 20);

			m_MyArrayList		= new ArrayList ();
			m_MyArrayList.Add (this.MyInt);
			m_MyArrayList.Add (this.MyFloat);
			m_MyArrayList.Add (this.MyString);
			m_MyArrayList.Add (this.MyXmlString);
			
			m_MyXmlList			= new XmlList ();
			m_MyXmlList.Add (this.MyInt);
			m_MyXmlList.Add (this.MyFloat);
			m_MyXmlList.Add (this.MyString);
			m_MyXmlList.Add (this.MyXmlString);

			m_MyXmlHashtable	= new XmlHashtable ();
			m_MyXmlHashtable.Add ("HashElement1", m_MyInt);
			m_MyXmlHashtable.Add ("HashElement2", m_MyString);
			m_MyXmlHashtable.Add ("HashElement3", m_MyXmlString);
			m_MyXmlHashtable.Add ("HashElement4", m_MyFloat);
			m_MyXmlHashtable.Add ("HashElement5", m_MyXmlList);
		}
Exemplo n.º 8
0
 public ChartLegendItem(XmlColor itemColor, XmlString text)
 {
     m_Color = itemColor;
     m_Text  = text;
 }
Exemplo n.º 9
0
 public ChartLegendItem(Color itemColor, string text)
 {
     m_Color = new XmlColor(itemColor);
     m_Text  = new XmlString(text);
 }
Exemplo n.º 10
0
        public Fx_common_color_or_texture_type(XPathNodeIterator iterator, string uri)
        {
            _root = iterator.Current.Name;

            XPathNodeIterator nodeIterator;

            nodeIterator = iterator.Current.SelectChildren(XmlCollada.XmlColor.root, uri);
            if (nodeIterator.MoveNext())
            {
                _color = new XmlColor(nodeIterator);
            }

            nodeIterator = iterator.Current.SelectChildren(XmlCollada.XmlFloat.root, uri);
            if (nodeIterator.MoveNext())
            {
                _float = new XmlFloat(nodeIterator);
            }

            nodeIterator = iterator.Current.SelectChildren(XmlCollada.Texture.root, uri);
            if (nodeIterator.MoveNext())
            {
                _texture = new Texture(nodeIterator, uri);
            }
        }
Exemplo n.º 11
0
 public Fx_common_color_or_texture_type(string root, XmlColor color, XmlFloat floatValue, Texture texture)
 {
     _root = root;
     _color = color;
     _float = floatValue;
     _texture = texture;
 }
Exemplo n.º 12
0
 public XmlColorArray(ColorArray colorArray)
 {
     xmlColorArray = new XmlColor[ColorArray.ColorCount];
     for (int i = 0; i < ColorArray.ColorCount; i++)
     {
         xmlColorArray[i] = new XmlColor
                                {
                                    StateIndex = (StateIndex) i,
                                    ColorValue = colorArray[(StateIndex) i].ToArgb().ToString("{0:X8}")
                                };
     }
 }
Exemplo n.º 13
0
		public ChartLegendItem(XmlColor itemColor, XmlString text)
		{
			m_Color	= itemColor;
			m_Text	= text;
		}
Exemplo n.º 14
0
		public ChartLegendItem(Color itemColor, string text)
		{
			m_Color	= new XmlColor (itemColor);
			m_Text	= new XmlString (text);
		}
Exemplo n.º 15
0
 private void SelectColor(Control pb, ref XmlColor color)
 {
     using (DialogColor dColor = new DialogColor(pb.BackColor))
     {
         if (dColor.ShowDialog() == DialogResult.OK)
         {
             pb.BackColor = dColor.NewColor;
             color = (Color)dColor.NewColor;
         }
     }
 }
Exemplo n.º 16
0
		public static Color[]	ConvertArray (XmlColor []array)
		{
			Color[] Result = null;
			if (array != null)
			{
				Result = new Color [array.Length];
				for (int i = 0; i < array.Length; i++)
				{
					Result[i] = array[i].Color;
				}
			}
			return Result;
		}