8 using System.Collections.Generic;
9 using Microsoft.VisualStudio.Tools.Applications.Runtime;
19 #region ChemistryControlType enum 37 private List<KeyValuePair<string, object>>
list;
62 string customXmlid, params KeyValuePair<string, object>[] properties)
71 this.list =
new List<KeyValuePair<string, object>>();
72 this.list.AddRange(properties);
87 string customXmlid, params KeyValuePair<string, object>[] properties)
97 this.list =
new List<KeyValuePair<string, object>>();
99 this.list.AddRange(properties);
111 params KeyValuePair<string, object>[] properties)
112 : this(
name,
type, start, end, 0, 0, null, properties)
121 set {
name = value; }
130 set {
type = value; }
138 set { this.customXmLid = value; }
147 set {
list = value; }
155 get {
return width; }
156 set {
width = value; }
192 get {
return inline; }
193 set {
inline = value; }
248 get {
return dirty; }
250 set {
dirty = value; }
Class that stores a list of property values for a saved control.
ControlProperties(string name, ChemistryControlType type, float x, float y, float width, float height, string customXmlid, params KeyValuePair< string, object >[] properties)
Constructor for floating controls.
string ControlName
The control's name.
bool BeforeSave()
Called before the object is saved to the cache.
ChemistryControlType type
float ControlX
The control's X coordinate in points.
float ControlWidth
The control's width in points.
ChemistryControlType ControlType
The control's type.
ChemistryControlType
/summary>
float ControlHeight
The control's height in points.
void AfterSave()
Called after the object is saved to the cache.
int Compare(ControlProperties x, ControlProperties y)
Compares two ControlProperties objects based on their position in the document.
bool BeforeLoad()
Called before the object is loaded from the cache.
float ControlY
The control's Y coordinate in points.
List< KeyValuePair< string, object > > PropertyList
The control's property list.
ControlProperties(string name, ChemistryControlType type, int start, int end, float width, float height, string customXmlid, params KeyValuePair< string, object >[] properties)
Constructor for inline controls.
Comparer that will compare ControlProperties objects based on their position in the document.
bool IsDirty
Return true to indicate that the object is dirty, i.e. it needs to be saved to the cache.
ControlProperties(string name, ChemistryControlType type, int start, int end, params KeyValuePair< string, object >[] properties)
Constructor for host controls.
List< KeyValuePair< string, object > > list
ControlProperties()
Default constructor - used for de-serialization.
bool IsInline
Flag indicating if a control is in-line. If true, the control is in-line; if foalse,...
List of control's properties. This class provides an implementation of ICachedType for complete contr...
void AfterLoad()
Called after the object is loaded from the cache.