AtmoWin - improvement discussion (2 Viewers)

B

BassFan

Guest
only for Information!
I contacted the developer of the XMLFoundation
and I hope it continues so come

greets
 
B

BassFan

Guest
here is the XML File for AtmoWinX..
which create automaticaly on the first start.
if you create later your own Profile then i will create the same File again
only changed with your Settings and profile Name.
Sample "BassFan_provile.xml" if the Profile name BassFan ;)

if your found any fault value please tell me so i can fix it.

greets
 
Last edited by a moderator:

azzuro

Test Group
  • Team MediaPortal
  • May 10, 2007
    9,984
    5,663
    France - IDF
    Home Country
    France France
    i don't know what is this line :
    <setting name="IgnoreConnectionErrorOnStartup" value="0"/>
    but i think can be good for me ;)

    @BassFan : this file work with your working version ?
     
    B

    BassFan

    Guest
    @BassFan : this file work with your working version ?
    what your mean?
    i'm learning XMLFoundation.
    first step is create a class, serialize the XML and write it to File
    so i have Default Setting on first start.

    @BassFan don't know what is this line :
    Code:
    // m_IgnoreConnectionErrorOnStartup
    if(ReadRegistryInt(mykey, configRootKey,"IgnoreConnectionErrorOnStartup",0) == 1)
       m_IgnoreConnectionErrorOnStartup = ATMO_TRUE;
    no idea i will check any value if read and write to XML to
    please give me a Little time ;)

    Working with Developer of XMLFoundation
    so i can use Read/write to XML - Files Registry like.

    Code:
    //Registry..
    WriteRegistryInt(mykey, configRootKey,"Ardu_BaudrateIndex", m_Ardu_BaudrateIndex); (OLD-WAY)
    //XML.......
    WriteXMLInt('PathFilename', 'AtmoWinX', "Ardu_BaudrateIndex", m_Ardu_BaudrateIndex); (I WILL DO THIS)
    //PATH incl. FILENAME, SECTION, SETTING, VALUE

    Code:
    //Registry..
    m_Ardu_BaudrateIndex  = ReadRegistryInt(mykey, newconfigRootKey,"Ardu_BaudrateIndex", m_Ardu_BaudrateIndex ); (OLD-WAY)
    //XML.......
    m_Ardu_BaudrateIndex  = ReadXMLInt('PathFilename', 'AtmoWinX',"Ardu_BaudrateIndex", 0); (I WILL DO THIS)
    //PATH incl. FILENAME, SECTION, SETTING, DEFAULTVALUE

    the Developer work on this.. takes a while Sorry.
    Quote from Developer to!
    Thank you for an honest question. They help both of us. You help me see my own library from a new angle. XML data can go in Attributes or Elements. I now realize that the examples focus on data in elements - and here you have a case of PURELY Attribute data. I don't have an example of that at all. So I will add one, today. Additionally, I am going to add this code to GProfile, and support XML or INI format because this will be a thin layer over my existing "Registry Like" support that is GProfile. I will add a GetXML() and a SetXML() to GProfile which currently represents data only in INI format. I will use this format, and make an example comparing the two.

    your see also i'm working on it. ;)

    greets
     
    Last edited by a moderator:
    B

    BassFan

    Guest
    reading of XML should now be simple;)
    Code:
    //ReadRegistryInt(mykey, newconfigRootKey,"ZonesTopCount",m_ZonesTopCount);
    m_ZonesTopCount                  = GetProfile().GetIntOrDefault("AtmoWinX", "ZonesTopCount", 1);
    //ReadRegistryInt(mykey, newconfigRootKey,"ZonesBottomCount",m_ZonesBottomCount);
    m_ZonesBottomCount               = GetProfile().GetIntOrDefault("AtmoWinX", "ZonesBottomCount", 1);
    //ReadRegistryInt(mykey, newconfigRootKey,"ZonesLRCount",m_ZonesLRCount);
    m_ZonesLRCount                   = GetProfile().GetIntOrDefault("AtmoWinX", "ZonesLRCount", 1);
    //(ReadRegistryInt(mykey, newconfigRootKey,"ZoneSummary",m_ZoneSummary) != 0);
    m_ZoneSummary                    = (GetProfile().GetIntOrDefault("AtmoWinX", "ZoneSummary", m_ZoneSummary) != 0);

    greets
     

    azzuro

    Test Group
  • Team MediaPortal
  • May 10, 2007
    9,984
    5,663
    France - IDF
    Home Country
    France France
    How you think manage profil ?
    all inside 1 file or
    XML:
    <section name="Profil1">
    <setting name="Ardu_BaudrateIndex" value="0"/>
    <setting name="Arducomport" value="1"/>
    <setting name="ColorChanger_iDelay" value="25"/>
    <setting name="ColorChanger_iSteps" value="50"/>
    <setting name="comport" value="1"/>.
    ...
    </section>
    <section name="Profil2">
    <setting name="Ardu_BaudrateIndex" value="0"/>
    <setting name="Arducomport" value="1"/>
    <setting name="ColorChanger_iDelay" value="25"/>
    <setting name="ColorChanger_iSteps" value="50"/>
    <setting name="comport" value="1"/>.
    ...
    </section>
    each profil have their file
    XML:
    <section name="Profil 1">
    <setting name="Ardu_BaudrateIndex" value="0"/>
    <setting name="Arducomport" value="1"/>
    <setting name="ColorChanger_iDelay" value="25"/>
    <setting name="ColorChanger_iSteps" value="50"/>
    <setting name="comport" value="1"/>.
    ...
    </section>
     
    B

    BassFan

    Guest
    no.. sorry.

    every Profile created a full copy of the Default XML..
    so i think is better in the future use for any Profil a own XML
    then you can create backups of this and has no Trouble if the first on (Default destroyed or what ever)

    or what your mean exactly?
    i have update the branch..

    each profil have their file
    each Profile used all from Default XML.
    create a Profile and search in the registry for AtmoWinX then
    Show in the root of AtmoWinX and then in Root of your Profile

    greets
     
    Last edited by a moderator:

    azzuro

    Test Group
  • Team MediaPortal
  • May 10, 2007
    9,984
    5,663
    France - IDF
    Home Country
    France France
    or what your mean exactly?
    your answer ;)
    if profil setting was saved in the same files or in their own files.

    their own files is fine for me .. (y)

    PS : What do you think to move Atmowin folder in "Programdata/Atmowin" or "PData/Team MP/Atmowin" directly ?
    instead of Team MP. / MediaPortal, because tommorow for use with MP2. not the same folder ...
    and like you, use Atmowin without MP .... hehee :p
     

    Users who are viewing this thread

    Top Bottom