Inheritance: WhiteCore.Framework.Modules.IDataTransferable
 public static void InitializeDefaults()
 {
     _settings = new GridSettings
                     {
                         MapCenter = new Vector2(1000, 1000),
                         LastSettingsVersionUpdateIgnored = CurrentVersion,
                         LastPagesVersionUpdateIgnored = PagesMigrator.GetVersion()
                     };
 }
        public static void GetGridConfigSettings(WebInterface webinterface)
        {
            var configSrc = webinterface.Registry.RequestModuleInterface<ISimulationBase> ().ConfigSource;
            IConfig config;
            _settingsGrid = new GridSettings ();

            // login
            config =  configSrc.Configs ["LoginService"];
            if (config != null)
            {
                _settingsGrid.WelcomeMessage = config.GetString("WelcomeMessage", _settingsGrid.WelcomeMessage);
            }

            // gridinfo
            config =  configSrc.Configs ["GridInfoService"];
            if (config != null)
            {
                _settingsGrid.Gridname = config.GetString("gridname", _settingsGrid.Gridname);
                _settingsGrid.Gridnick = config.GetString("gridnick", _settingsGrid.Gridnick);
            }

            // Library
            //            config =  configSrc.Configs ["LibraryService"];
            //            if (config != null)
            //            {
            //                _settingsGrid.LibraryName = config.GetString("LibraryName", _settingsGrid.LibraryName);
            //                _settingsGrid.LibraryOwnerName = config.GetString("LibraryOwnerName", _settingsGrid.LibraryOwnerName);
            //            }
            // RealEstate
            config =  configSrc.Configs ["EstateService"];
            if (config != null)
            {
                _settingsGrid.SystemEstateOwnerName = config.GetString("SystemEstateOwnerName", _settingsGrid.SystemEstateOwnerName);
                _settingsGrid.SystemEstateName = config.GetString("SystemEstateName", _settingsGrid.SystemEstateName);
            }
        }
        public void SaveGridSettings (GridSettings settings)
        {
            IGenericsConnector generics = Framework.Utilities.DataManager.RequestPlugin<IGenericsConnector> ();
            generics.AddGeneric (UUID.Zero, "GridSettings", "Settings", settings.ToOSD ());

            gridSettings = settings;

            // change what's appropriate...
            ILoginService loginService = Registry.RequestModuleInterface<ILoginService> ();
            loginService.WelcomeMessage = settings.WelcomeMessage;

        }
        public GridSettings GetGridSettings ()
        {
            if (gridSettings == null) {
                IGenericsConnector generics = Framework.Utilities.DataManager.RequestPlugin<IGenericsConnector> ();
                var settings = generics.GetGeneric<GridSettings> (UUID.Zero, "GridSettings", "Settings");
                if (settings == null)
                    settings = new GridSettings ();

                return settings;
            }

            return gridSettings;
        }