Ejemplo n.º 1
0
        public override string toXMLString()
        {
            StringBuilder strXML = new StringBuilder();

            strXML.Append(@"<object>
                         <type>%type%</type>");
            strXML.Replace("%type%", this.getName());
            foreach (PictureList s in ((CPictureCollectionAtt)(Attributs)).PictureURLList)
            {
                strXML.Append("<uri>" + s.PictureURL + "</uri>");
            }
            if (((CPictureCollectionAtt)(Attributs)).PictureURLList.Count == 0)
            {
                strXML.Append("<uri></uri>");
            }
            strXML.Append(@"<x>%x%</x>
                         <y>%y%</y>
                         <width>%width%</width>
                         <height>%height%</height>
						 <marker>%marker%</marker>
                   </object> ");
            strXML.Replace("%x%", Attributs.getLocation().X.ToString());
            strXML.Replace("%y%", Attributs.getLocation().Y.ToString());
            strXML.Replace("%width%", Attributs.getSize().Width.ToString());
            strXML.Replace("%height%", Attributs.getSize().Height.ToString());
            strXML.Replace("%marker%", Attributs.getMarkerName());
            return(strXML.ToString());
        }
        public override string toXMLString()
        {
            StringBuilder strXML = new StringBuilder();

            strXML.Append(@"<marker>
                         <name>%name%</name>
                         <x>%x%</x>
                         <y>%y%</y>
                         <width>%width%</width>
                         <height>%height%</height>
                   </marker> ");
            strXML.Replace("%name%", this.getAttList().getInstanceName());
            strXML.Replace("%x%", Attributs.getLocation().X.ToString());
            strXML.Replace("%y%", Attributs.getLocation().Y.ToString());
            strXML.Replace("%width%", Attributs.getSize().Width.ToString());
            strXML.Replace("%height%", Attributs.getSize().Height.ToString());
            return(strXML.ToString());
        }
Ejemplo n.º 3
0
        public override string toXMLString()
        {
            StringBuilder strXML = new StringBuilder();

            strXML.Append(@"<object>
                         <type>%type%</type>
                         <uri>%uri%</uri>
                         <x>%x%</x>
                         <y>%y%</y>
                         <width>%width%</width>
                         <height>%height%</height>
						 <marker>%marker%</marker>
                   </object> ");
            strXML.Replace("%type%", this.getName());
            strXML.Replace("%uri%", ((CVideoAtt)(Attributs)).VideoURL);
            strXML.Replace("%x%", Attributs.getLocation().X.ToString());
            strXML.Replace("%y%", Attributs.getLocation().Y.ToString());
            strXML.Replace("%width%", Attributs.getSize().Width.ToString());
            strXML.Replace("%height%", Attributs.getSize().Height.ToString());
            strXML.Replace("%marker%", Attributs.getMarkerName());
            return(strXML.ToString());
        }
        public void updateAttributeValueBase(string strAttName, object objAttValue)
        {
            switch (strAttName)
            {
            case "YLocation":
                Attributs.setLocation(new Point(Attributs.getLocation().X, (int)objAttValue));
                break;

            case "XLocation":
                Attributs.setLocation(new Point((int)objAttValue, Attributs.getLocation().Y));
                break;

            case "Width":
                Attributs.setSize(new Size((int)objAttValue, Attributs.getSize().Height));
                break;

            case "Height":
                Attributs.setSize(new Size(Attributs.getSize().Width, (int)objAttValue));
                ctrl.Invalidate();
                break;
            }
        }