Пример #1
0
 /// <summary>
 /// Constructor for floating controls.
 /// </summary>
 /// <param name="name">Control's name</param>
 /// <param name="type">Control's type</param>
 /// <param name="x">Control's X coordinate in points</param>
 /// <param name="y">Control's Y coordinate in points</param>
 /// <param name="width">Control's width in points</param>
 /// <param name="height">Control's height in points</param>
 /// <param name="customXmlid"></param>
 /// <param name="properties">List of control's properties to persist.</param>
 public ControlProperties(string name, ChemistryControlType type, float x, float y, float width, float height,
                          string customXmlid, params KeyValuePair <string, object>[] properties)
 {
     this.name        = name;
     this.type        = type;
     this.x           = x;
     this.y           = y;
     this.width       = width;
     this.height      = height;
     this.CustomXmlId = customXmlid;
     this.list        = new List <KeyValuePair <string, object> >();
     this.list.AddRange(properties);
 }
Пример #2
0
 /// <summary>
 /// Constructor for host controls.
 /// </summary>
 /// <param name="name">Control's name</param>
 /// <param name="type">Control's type</param>
 /// <param name="start">Start position of control's range (in characters)</param>
 /// <param name="end">End position of control's range (in characters)</param>
 /// <param name="properties">List of control's properties to persist.</param>
 public ControlProperties(string name, ChemistryControlType type, int start, int end,
                          params KeyValuePair <string, object>[] properties)
     : this(name, type, start, end, 0, 0, null, properties)
 {
 }