Inheritance: Universe.Framework.Modules.IDataTransferable
コード例 #1
0
        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);
            }

            // RealEstate
            config =  configSrc.Configs ["EstateService"];
            if (config != null)
            {
                _settingsGrid.SystemEstateOwnerName = config.GetString("SystemEstateOwnerName", _settingsGrid.SystemEstateOwnerName);
                _settingsGrid.SystemEstateName = config.GetString("SystemEstateName", _settingsGrid.SystemEstateName);
            }
        }
コード例 #2
0
        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;
        }
コード例 #3
0
        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;
        }
コード例 #4
0
        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);
            //            }

            // System users
            config = configSrc.Configs ["SystemUserService"];
            if (config != null) {
                _settingsGrid.GovernorName = config.GetString ("GovernorName", _settingsGrid.GovernorName);
                _settingsGrid.RealEstateOwnerName = config.GetString ("RealEstateOwnerName", _settingsGrid.RealEstateOwnerName);
                _settingsGrid.BankerName = config.GetString ("BankerName", _settingsGrid.BankerName);
                _settingsGrid.MarketplaceOwnerName = config.GetString ("MarketplaceOwnerName", _settingsGrid.MarketplaceOwnerName);
            }

            // RealEstate
            config = configSrc.Configs ["EstateService"];
            if (config != null) {
                _settingsGrid.SystemEstateName = config.GetString ("MainlandEstateName", _settingsGrid.MainlandEstateName);
                _settingsGrid.SystemEstateName = config.GetString ("SystemEstateName", _settingsGrid.SystemEstateName);
            }


        }