Menú

Mostrar Mensajes

Esta sección te permite ver todos los mensajes escritos por este usuario. Ten en cuenta que sólo puedes ver los mensajes escritos en zonas a las que tienes acceso en este momento.

Mostrar Mensajes Menú

Mensajes - Zeroql

#201
es Cierto...
Pensaba hacerlos recursivosn inclusive.
pero este no es el unico archivo que se va  a leer y hay otros muchisimos mas grandes, decidi que era mejor usar for each.
#202
Buenas.... ya arregle el problema.

Para aquellos que experimentan talves el mismo problema les dejo la solucion

Mi problema era k no podia leer los SinlgeNode.

Cambie el code:

Código (vbnet) [Seleccionar]
Dim strNode() As String = Split(Node.Value, " ")

POR:
Código (vbnet) [Seleccionar]
Dim strNode() As String = Split(Node.FirstChild.Value, " ")

Espero que a alguien tambien le sirva esta solucion
#203
Buenas, buneo antes habia hecho un post de como leer este archivo..
resulta que ya lo se leer.
pero me presenta un problema cuando desea leer los keywords.
dejo el code y el archivo xml como lo tengo

Archivo XML
Código (xml) [Seleccionar]
<?xml version="1.0" encoding="utf-8"?>
<Languaje>
<Scopes>
<Scope start="Namespace" End="End Namespace"/>
<Scope start="#Region" End="#End Region"/>
<Scope start="Class" End="End Class"/>
<Scope start="Module" End="End Module"/>
<Scope start="Interface" End="End Iterface"/>
<Scope start="Sub" End="End Sub"/>
<Scope start="Function" End="End Function"/>
<Scope start="Property" End="End Property"/>
<Scope start="Get" End="End Get"/>
<Scope start="Set" End="End Set"/>
</Scopes>
<Coments>
<Coment start="'" End="\n"/>
</Coments>
<Constants>
<Constant text="VbCr"/>
<Constant text="VbCrLf"/>
<Constant text="VbLf"/>
</Constants>
<Operators>
<Pattern Id="." />
<Pattern Id="!" />
<Pattern Id=":" />
<Pattern Id="^" />
<Pattern Id="*" />
<Pattern Id="/" />
<Pattern Id="+" />
<Pattern Id="-" />
<Pattern Id="=" />
<Pattern Id=";" />
<Pattern Id="|" />
<Pattern Id="\" />
<Pattern Id="&gt;" />
<Pattern Id="&lt;" />
</Operators>
<Keys></Keys>
<Keywords>AddHandler AddressOf Alias And AndAlso Ansi As Assembly Auto Boolean ByRef Byte ByVal Call Case Catch CBool CByte CChar CDate CDec CDbl Char CInt Class CLng CObj Const CShort CSng CStr CType Currency Date Decimal Declare Default Delegate Dim DirectCast Do Double Each Else ElseIf End Enum Erase Error Event Exit Explicit False Finally For Friend Function Get GetType GoTo Global Handles If Imports In Inherits Integer Interface Implements Is Let Lib Like Long Loop Me Mod Module MustInherit MustOverride MyBase MyClass Namespace New Next Not Nothing NotInheritable NotOverridable Object On Option Optional Or OrElse Overloads Overridable Overrides ParamArray Preserve Private Property Protected Public RaiseEvent ReadOnly ReDim RemoveHandler Resume Return Select Set Shadows Shared Short Single Static Step Stop String Structure Sub SyncLock Then Throw To True Try TypeOf Unicode Until Variant When While With WithEvents WriteOnly Xor</Keywords>
</Languaje>




Codigo que uso para leerlo
Código (vbnet) [Seleccionar]

       ''' <summary>
       ''' Leer todas palabras claves del lenguaje
       ''' </summary>
       Public Sub LoadSintax(ByVal pathSystem As String, ByVal nomLanguaje As String)
           Dim Xml As XmlDocument
           Dim NodeList As XmlNodeList
           Dim Node As XmlNode
           Try
               Xml = New XmlDocument()
               Xml.Load(pathSystem & "\" & nomLanguaje & ".xml")                   'Cargar el archivo XML con la info del lenguaje
               NodeList = Xml.SelectNodes("/Languaje/Scopes/Scope")                'Cargar los nodos a leer
               For Each Node In NodeList                                           'repetir hasta terminar todos los nodos
                   With Node.Attributes
                       sintax.StartMethod.Add(.GetNamedItem("start").Value)
                       sintax.EndMethod.Add(.GetNamedItem("End").Value)
                   End With
               Next
               NodeList = Xml.SelectNodes("/Languaje/Coments/Coment")                  'Cargar el sistema de comentarios
               For Each Node In NodeList
                   With Node.Attributes
                       sintax.startComent.Add(.GetNamedItem("start").Value)
                       sintax.endComent.Add(.GetNamedItem("End").Value)
                   End With
               Next
               NodeList = Xml.SelectNodes("/Languaje/Constants/Constant")              'Cargar las constantes de la aplicacion
               For Each Node In NodeList
                   With Node.Attributes
                       sintax.Constants.Add(.GetNamedItem("text").Value)
                   End With
               Next
               NodeList = Xml.SelectNodes("/Languaje/Operators/Pattern")               'Cargar los operadores del lenguaje
               For Each Node In NodeList
                   With Node.Attributes
                       sintax.Operators.Add(.GetNamedItem("Id").Value)
                   End With
               Next
               Node = Xml.SelectSingleNode("/Languaje/Keywords")                       'Cargar la sintaxis de lenguaje
               Dim strNode() As String = Split(Node.Value, " ")
               For idx = 0 To strNode.Length - 1
                   sintax.Sintaxis.Add(strNode(idx))
               Next
               Node = Xml.SelectSingleNode("/Languaje/Keys")                           'Cargar las palabras clave del lenguaje
               strNode = Split(Node.Value, " ")
               For idx = 0 To strNode.Length - 1
                   sintax.KeySintax.Add(strNode(idx))
               Next
           Catch ex As Exception
               MsgBox(ex.GetType.ToString & vbNewLine & ex.Message.ToString, vbCritical, "ERROR!")
           End Try
       End Sub



que tengo mal o que tengo que cambiar para que me lea los keyword y los keys

#204
Muchas gracias por la ayuda a todos!!! he consultado los temas y me sirvieron de mucho... gracias!!!
#205
Me podrian dar un ejemplo de code!!! gracias!!!
#206
Yo he usado XmlTextReader para una aplicacion anterior!!!
Pero lo k no se es como leer el sistema de arriba
[code=xml]<Scope start="Namespace" End="End Namespace"/>

como hago para almacenar el start y el end???
De ante mano agradezco toda la ayuda posible[/code]
#207
.NET (C#, VB.NET, ASP) / Leer archivo xml....
27 Junio 2010, 16:41 PM
Buenas...
bueno tengo este archivo xml

Código (xml) [Seleccionar]

<?xml version="1.0" encoding="utf-8"?>
<Language Name="VB.NET">
<Scope start="Namespace" End="End Namespace"/>
<Scope start="#Region" End="#End Region"/>
<Scope start="Class" End="End Class"/>
<Scope start="Interface" End="End + (Iterface)"/>
<Scope start="Sub" End="End Sub"/>
<Scope start="Function" End="End Function"/>
<Scope start="Property" End="End Property"/>
<Scope start="Get" End="End Get"/>
<Scope start="Set" End="End Set"/>
<Coment start="'" End=""/>
<Keywords>AddHandler AddressOf Alias And AndAlso Ansi As Assembly Auto Boolean ByRef Byte ByVal Call Case Catch CBool CByte CChar CDate CDec CDbl Char CInt Class CLng CObj Const CShort CSng CStr CType</Keywords>
<Constants>VbCrLf VbCr VbLf</Constants>
<Operators>
<Pattern Text="." />
<Pattern Text="!" />
<Pattern Text=":" />
<Pattern Text="^" />
<Pattern Text="*" />
<Pattern Text="/" />
<Pattern Text="+" />
<Pattern Text="-" />
<Pattern Text="=" />
<Pattern Text=";" />
<Pattern Text="|" />
<Pattern Text="\" />
<Pattern Text="&gt;" />
<Pattern Text="&lt;" />
</Operators>
</Language>



Mi pregunta es Como lo leo???
Lo mas importante es la parte de arriba los scope
Les agrezco mucho toda la ayuda disponible
#208
Alguna ayuda de la modificacion????
#209
.NET (C#, VB.NET, ASP) / Re: DragDrop
7 Junio 2010, 20:50 PM
Gracias me sirvio de mucho
#210
Bueno D4N93R me dio una respuesta que me sirvio de mucho para el arrastre de elementos a otros...

pero resulta y acontece lo siguiente:
Estoy realizando un control de deslizamiento tipo reproductor... con un picture. y quiero que cuando se le de click (mouseDown) este me permita arrastrarlo hasta cierto punto y se vea el efecto de arraste del control...
Como puedo hacer esto??? he buscado mucho y no encuentro algo asi... intente inventando codigo pero no me da nada
porfa alguna ayuda. un pedazo de code. se que se tiene que habilitar el myBase.AllowDrop pero no se mas....

De ante mano agradezco toda la ayuda prestada...