EaseSettings

    • Beta

    Es gibt 1 Antwort in diesem Thema. Der letzte Beitrag () ist von AliveDevil.

      EaseSettings

      Name des Programms:
      EaseSettings

      Beschreibung:
      Du bist es leid, immer deine eigenen Klassen zu schreiben?
      Du brauchst mehr als nur die simplen "My.Settings"?
      Dann ist "EaseSettings" die einfachste Variante, leistungsstarke Einstellungen zu verwenden!
      Die Einstellungen sind in einer Art Baumstruktur aufgebaut und gespeichert, sodass sehr viele Einstellungen darin Platz haben.

      Screenshot(s):


      Beispielverwendung:

      VB.NET-Quellcode

      1. Dim settingsManager As New SettingsManager()
      2. settingsManager.AddNode("application", "pathelement1", "pathelement2")
      3. settingsManager.AddNode("Hallo Welt. Dies ist der Wert!", "application", "pathelement1", "pathelement2", "value")
      4. Dim val As String = settingsManager.GetNode(Of String)("application", "pathelement1", "pathelement2", "value")
      5. settingsManager.RemoveNode("application")
      6. settingsManager.Save("C:\whatever.bin")
      7. settingsManager.Load("C:\whatever.dat")


      @Rinecamo: hat mich darauf hingewiesen, dass ich doch erläutern solle, wie die Dateien gespeichert werden.
      Nun, hier die Antwort:
      GZipped und Binärformatiert.
      entsprechender Codeabschnitt (Setting.vb)

      VB.NET-Quellcode

      1. Public Sub Save(path As String)
      2. Using fS As New FileStream(path, FileMode.Create)
      3. Using gS As New GZipStream(fS, CompressionMode.Compress, False)
      4. Dim bF As New BinaryFormatter()
      5. bF.AssemblyFormat = Runtime.Serialization.Formatters.FormatterAssemblyStyle.Simple
      6. bF.TypeFormat = Runtime.Serialization.Formatters.FormatterTypeStyle.XsdString
      7. bF.Serialize(gS, baseSettings)
      8. End Using
      9. End Using
      10. End Sub


      Die Dokumentation (Englisch) schreibe ich gerade auf CodePlex.
      Deutsche Dokumentation wird auf CodePlex auchnoch folgen.

      Verwendete Programmiersprache und IDE:
      VB.NET

      Systemanforderungen:
      .NET Framework 3

      Download:
      CodePlex
      Download der DLL:
      CodePlex 9k / 37k
      EaseSettings.zip 9k / 37k

      Lizenz/Weitergabe:
      Lizenz: Microsoft Public License
      Lizenztext

      Quellcode

      1. Microsoft Public License (Ms-PL)
      2. This license governs use of the accompanying software. If you use the software, you accept this license. If you do not accept the license, do not use the software.
      3. 1. Definitions
      4. The terms "reproduce," "reproduction," "derivative works," and "distribution" have the same meaning here as under U.S. copyright law.
      5. A "contribution" is the original software, or any additions or changes to the software.
      6. A "contributor" is any person that distributes its contribution under this license.
      7. "Licensed patents" are a contributor's patent claims that read directly on its contribution.
      8. 2. Grant of Rights
      9. (A) Copyright Grant- Subject to the terms of this license, including the license conditions and limitations in section 3, each contributor grants you a non-exclusive, worldwide, royalty-free copyright license to reproduce its contribution, prepare derivative works of its contribution, and distribute its contribution or any derivative works that you create.
      10. (B) Patent Grant- Subject to the terms of this license, including the license conditions and limitations in section 3, each contributor grants you a non-exclusive, worldwide, royalty-free license under its licensed patents to make, have made, use, sell, offer for sale, import, and/or otherwise dispose of its contribution in the software or derivative works of the contribution in the software.
      11. 3. Conditions and Limitations
      12. (A) No Trademark License- This license does not grant you rights to use any contributors' name, logo, or trademarks.
      13. (B) If you bring a patent claim against any contributor over patents that you claim are infringed by the software, your patent license from such contributor to the software ends automatically.
      14. (C) If you distribute any portion of the software, you must retain all copyright, patent, trademark, and attribution notices that are present in the software.
      15. (D) If you distribute any portion of the software in source code form, you may do so only under this license by including a complete copy of this license with your distribution. If you distribute any portion of the software in compiled or object code form, you may only do so under a license that complies with this license.
      16. (E) The software is licensed "as-is." You bear the risk of using it. The contributors give no express warranties, guarantees or conditions. You may have additional consumer rights under your local laws which this license cannot change. To the extent permitted under your local laws, the contributors exclude the implied warranties of merchantability, fitness for a particular purpose and non-infringement.

      Dieser Beitrag wurde bereits 3 mal editiert, zuletzt von „AliveDevil“ ()

      Update auf Version 0.0.1.1

      @Solaris: hatte die nette Idee, einfach mal alle Items aus der aktuellen Node zu bekommen.
      Changes: easesettings.codeplex.com/SourceControl/changeset/21621
      Aktuelles Release: 0.0.1.0 (easesettings.codeplex.com/releases/view/92910)
      Dev-Release: 0.0.1.1 (easesettings.codeplex.com/releases/view/93081)
      Zugriff auf die Eigenschaft:

      VB.NET-Quellcode

      1. Dim sManager As New SettingsManager()
      2. sManager.AddNode("hallo", "test", "test2")
      3. sManager.AddNode("hallo", "test", "test")
      4. sManager(SettingsManager.Combine("hallo", "test")) ' als HashTable

      Viel Spaß! Ich brauche übrigens Feedback, damit ich die Lib erweitern kann!
      Fehler bitte, falls CodePlex Account vorhanden, auf CodePlex posten, da ich dort eine bessere Auflistung habe.
      Ansonsten auch hier gerne gesehen.