GetVersion() публичный статический Метод

public static GetVersion ( ) : uint
Результат uint
        public static void InitializeWebUIDefaults(WebInterface webinterface)
        {
            _settingsWebUI = new WebUISettings();

            _settingsWebUI.LastSettingsVersionUpdateIgnored = CurrentVersion;
            _settingsWebUI.LastPagesVersionUpdateIgnored    = PagesMigrator.GetVersion();
            _settingsWebUI.MapCenter = new Vector2(1000, 1000);

            var configSrc   = webinterface.Registry.RequestModuleInterface <ISimulationBase> ().ConfigSource;
            var loginConfig = configSrc.Configs ["LoginService"];

            if (loginConfig != null)
            {
                _settingsWebUI.WebRegistration = loginConfig.GetBoolean("AllowAnonymousLogin", true);
            }
        }
Пример #2
0
        public static void InitializeWebUIDefaults(WebInterface webinterface)
        {
            _settingsWebUI = new WebUISettings();
            _settingsWebUI.LastSettingsVersionUpdateIgnored = CurrentVersion;
            _settingsWebUI.LastPagesVersionUpdateIgnored    = PagesMigrator.GetVersion();
            _settingsWebUI.MapCenter = new Vector2(Constants.DEFAULT_REGIONSTART_X, Constants.DEFAULT_REGIONSTART_Y);

            // check for user configurations
            var configSrc   = webinterface.Registry.RequestModuleInterface <ISimulationBase> ().ConfigSource;
            var loginConfig = configSrc.Configs ["LoginService"];

            if (loginConfig != null)
            {
                _settingsWebUI.WebRegistration = loginConfig.GetBoolean("AllowAnonymousLogin", true);
            }

            var mapConfig = configSrc.Configs ["WebInterface"];

            if (mapConfig != null)
            {
                _settingsWebUI.MapCenter.X = mapConfig.GetInt("mapcenter_x", (int)_settingsWebUI.MapCenter.X);
                _settingsWebUI.MapCenter.Y = mapConfig.GetInt("mapcenter_y", (int)_settingsWebUI.MapCenter.Y);
            }
        }