Пример #1
0
        public ControlXmlXsd()
        {
            //
            // The InitializeComponent() call is required for Windows Forms designer support.
            //
            InitializeComponent();

            //
            // TODO: Add constructor code after the InitializeComponent() call.
            //
            declaracionControl=new ElementoXsd();//nombre control definir el objeto...
            nodoControl=new XmlDocument();
            nodoControl.InnerXml="<Elemento>" +
                "<Nombre>" +
                "</Nombre>" +
                "<PosX>" +
                "</PosX>" +
                "<PosY>" +
                "</PosY>" +
                "</Elemento>";
            TipoDatos=TiposBaseXsd.String;
        }
Пример #2
0
		public void Reemplazar(ElementoXsd tipo)
		{
			Quitar(tipo);
			Añadir(tipo);
		}
Пример #3
0
		public bool Añadir(ElementoXsd tipo)
		{
			if (tipo.Nombre == null)
				throw new XsdException("El elemento tiene que tener un nombre");
			bool añadir = true;
			if (!declaracionElementos.ContainsKey(tipo))
				declaracionElementos.Add(tipo, null);
			else
				añadir = false;
			return añadir;
			
		}
Пример #4
0
		public bool Quitar(ElementoXsd tipo)
		{
			bool quitado = true;
			if (declaracionElementos.ContainsKey(tipo))
				declaracionElementos.Remove(tipo);
			else
				quitado = false;
			return quitado;
			
		}