wiki:League/Settings

Version 2 (modified by vadim.godunko, 10 years ago) ( diff )

--

League - Settings

The League.Settings package provides persistent platform-independed application settings.

Example

with Ada.Wide_Wide_Text_IO;

with League.Settings;
with League.Strings;
with League.Values.Strings;

procedure Main is

   function "+"
    (Item : Wide_Wide_String) return League.Strings.Universal_String
       renames League.Strings.To_Universal_String;

   X : League.Settings.Settings;
   V : League.Values.Value;

begin
   X.Load ("my.ini");

   Ada.Wide_Wide_Text_IO.Put_Line
    (League.Values.Strings.Get (X.Value (+"tst/my")).To_Wide_Wide_String);

   League.Values.Strings.Set (V, +"Мой текст");
   X.Set_Value (+"test/your", V);

   X.Save ("new.ini");
end Main;
Note: See TracWiki for help on using the wiki.