RPGonzo's Profile User Rating: -----

Reputation: 151 Stalwart
Group:
Contributors
Active Posts:
954 (0.51 per day)
Joined:
16-March 09
Profile Views:
8,158
Last Active:
User is offline Jul 03 2012 11:42 AM
Currently:
Offline

Previous Fields

Country:
US
OS Preference:
Windows
Favorite Browser:
FireFox
Favorite Processor:
AMD
Favorite Gaming Platform:
XBox
Your Car:
Honda
Dream Kudos:
25

Latest Visitors

Icon   RPGonzo I feel dumber everyday talking with todays society ....

Posts I've Made

  1. In Topic: Application.Startup Path Points to my Debug Bin when user executes exe

    Posted 29 Jun 2012

    I'm actually using this line on a project I'm working on right now.

    Works if i move it to another directory or to another machine.

    Application.StartupPath & "\filename.extension"
    
    
  2. In Topic: XML Deserialize to Class

    Posted 29 Jun 2012

    Not against literals just have never used them before to be honest.

    I'll look into them for sure ;-) never hurts to know about it, but for this project I'll just roll with what I have. It's not a super crazy important program, it's mainly for a work around for about 3-4 weeks until the FTP sources are not needed any longer.

    Thanks for your help guys always a treat ;-)
  3. In Topic: XML Deserialize to Class

    Posted 29 Jun 2012

    sure ... it's just in my main_load

        Private Sub main_Load(sender As Object, e As System.EventArgs) Handles Me.Load
            Try
                ' pull the current settings file
                Dim objStreamReader As New StreamReader(Application.StartupPath & "\sm.xml")
                Dim x As New XmlSerializer(GetType(myFTP))
                siteManager = x.Deserialize(objStreamReader)
                objStreamReader.Close()
    
                For Each aConfig In siteManager.configs
                    For Each aServer As Server In aConfig.servers
                        profileList.Items.Add(aServer.Name)
                    Next
                Next
            Catch ex As Exception
                MsgBox(ex.ToString)
            End Try
        End Sub
    
    


    I have not gotten to the point of testing how everything looks when i serialize it back to an XML.
  4. In Topic: XML Deserialize to Class

    Posted 29 Jun 2012

    ugly ugly ugly ... lol

    <?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
    <myFTP>
        <Servers>
            <Server>
                <Name>FTP Host 1</name>
                <Host>ftp1.host.com</Host>
                <Port>21</Port>
                <User>ftpuser</User>
                <Pass>ftppass</Pass>
                FTP Host 1
            </Server>
          <Server>
                <Name>FTP Host 2</name>
                <Host>ftp2.host.com</Host>
                <Port>21</Port>
                <User>ftpuser</User>
                <Pass>ftppass</Pass>
                FTP Host 2
          </Server>
        </Servers>
      <Servers></Servers>
    </myFTP>
    
    


    <Serializable()> _
    <XmlRoot("myFTP")> _
    Public Class myFTP
        <XmlElement("Servers")> _
        Public configs As List(Of Servers)
    End Class
    
    Public Class Servers
        <XmlElement("Server")> _
        Public servers As List(Of Server)
    End Class
    
    


    For Each aConfig In siteManager.configs
                    For Each aServer As Server In aConfig.servers
                        profileList.Items.Add(aServer.Name)
                    Next
                Next
    
    


    works just not as clean as I would like to do it ... still can't figure out how to read that text value of the node <server>, if it's even possible. I really don't need it but would prefer to know how to deal with it.
  5. In Topic: XML Deserialize to Class

    Posted 29 Jun 2012

    Meh, I didn't even realize I left the module declaration there thanks for that.

    <Serializable()> _
    <XmlRoot("myFTP")> _
    Public Class myFTP
        Public servers As List(Of Server)
    End Class
    
    


    The downside is now it doesn't iterate the server nodes under servers. So the collection is empty.

    It's only iterating the Servers nodes, that's why I had an extra class as Servers before, which i did because it made it iterate both the servers parent node and the server chil nodes under the servers.

    Hmmm .....

My Information

Member Title:
// Note to self: hmphh .... I forgot
Age:
31 years old
Birthday:
March 12, 1983
Gender:
Location:
Rosharon, Texas USA
Interests:
By profession and hobby i love computers, networking, and a new found interest in programming ( web and newly discovered windows programs )

PC FPS online gaming

Also race cars when i find time :)
Years Programming:
4
Programming Languages:
All are in learning processes and self-taught (also with help from countless forums like this one )
PHP, HTML, XML, CSS, JAVASCRIPT, MySQL
New to me is .NET, C++

Contact Information

E-mail:
Private
Website URL:
Website URL  http://www.Lazurous.com

Friends

Comments

Page 1 of 1
  1. Photo

    phpcoder1234 Icon

    07 Jun 2011 - 03:41
    Hello its nick the owner of pokemon toxic.
    I donno if you remember me when you coded the rpg with me ?
    Just wondering if u have any of the files still ?
    You most probley havnt but thought it was worth a ask :)
Page 1 of 1