2 using System.Collections.Generic;
5 using AnimatGUI.Framework;
9 namespace RobotIOControls
14 #region " Attributes "
16 protected int m_iPortNumber = 3;
20 #region " Properties "
22 public override string Description {
get {
return "Performs IO with the C884 Piezo motor controller.";} set { }}
23 public override string ButtonImageName {
get {
return "HybridInterfaceGUI.Graphics.C884_Large.gif"; } }
24 public override string WorkspaceImageName {
get {
return "HybridInterfaceGUI.Graphics.C884_Small.gif"; } }
25 public override string PartType {
get {
return "C884Controller"; } }
26 public override string ModuleName {
get {
return "HybridInterfaceSim"; } }
28 public virtual int PortNumber
36 SetSimData(
"PortNumber", value.ToString(),
true);
37 m_iPortNumber = value;
48 m_strName =
"C884 Controller";
54 public override AnimatGUI.Framework.DataObject Clone(AnimatGUI.Framework.DataObject doParent,
bool bCutData, AnimatGUI.Framework.DataObject doRoot)
60 protected override void CloneInternal(DataObject doOriginal,
bool bCutData, DataObject doRoot)
62 base.CloneInternal(doOriginal, bCutData, doRoot);
68 m_iPortNumber = doOrig.m_iPortNumber;
72 public override void BuildProperties(ref AnimatGuiCtrls.Controls.PropertyTable propTable)
74 base.BuildProperties(ref propTable);
76 propTable.Properties.Add(
new AnimatGuiCtrls.Controls.PropertySpec(
"Com Port",
this.PortNumber.GetType(),
"PortNumber",
"Properties",
"Com port number", this.PortNumber));
85 m_iPortNumber = oXml.GetChildInt(
"PortNumber", m_iPortNumber);
96 oXml.AddChildElement(
"PortNumber", m_iPortNumber);
103 base.SaveSimulationXml(oXml, ref nmParentControl, strName);
107 oXml.AddChildElement(
"PortNumber", m_iPortNumber);