コード例 #1
0
        public Dictionary <string, object> Fill(WebInterface webInterface, string filename, OSHttpRequest httpRequest,
                                                OSHttpResponse httpResponse, Dictionary <string, object> requestParameters,
                                                ITranslator translator, out string response)
        {
            response = null;
            var vars = new Dictionary <string, object>();

            IAgentInfoConnector recentUsers = Framework.Utilities.DataManager.RequestPlugin <IAgentInfoConnector>();
            IGenericsConnector  connector   = Framework.Utilities.DataManager.RequestPlugin <IGenericsConnector>();
            GridWelcomeScreen   welcomeInfo = connector.GetGeneric <GridWelcomeScreen>(UUID.Zero, "GridWelcomeScreen",
                                                                                       "GridWelcomeScreen");

            if (welcomeInfo == null)
            {
                welcomeInfo = GridWelcomeScreen.Default;
            }

            IConfigSource config = webInterface.Registry.RequestModuleInterface <ISimulationBase>().ConfigSource;

            vars.Add("GridStatus", translator.GetTranslatedString("GridStatus"));
            vars.Add("GridOnline",
                     welcomeInfo.GridStatus
                         ? translator.GetTranslatedString("Online")
                         : translator.GetTranslatedString("Offline"));
            vars.Add("TotalUserCount", translator.GetTranslatedString("TotalUserCount"));
            vars.Add("UserCount", webInterface.Registry.RequestModuleInterface <IUserAccountService>().
                     NumberOfUserAccounts(null, "").ToString());
            vars.Add("TotalRegionCount", translator.GetTranslatedString("TotalRegionCount"));
            vars.Add("RegionCount", Framework.Utilities.DataManager.RequestPlugin <IRegionData>().
                     Count((RegionFlags)0, (RegionFlags)0).ToString());
            vars.Add("UniqueVisitors", translator.GetTranslatedString("UniqueVisitors"));
            vars.Add("UniqueVisitorCount", recentUsers.RecentlyOnline((uint)TimeSpan.FromDays(30).TotalSeconds, false).ToString());
            vars.Add("OnlineNow", translator.GetTranslatedString("OnlineNow"));
            vars.Add("OnlineNowCount", recentUsers.RecentlyOnline(5 * 60, true).ToString());
            vars.Add("RecentlyOnline", translator.GetTranslatedString("RecentlyOnline"));
            vars.Add("RecentlyOnlineCount", recentUsers.RecentlyOnline(10 * 60, false).ToString());
            vars.Add("HGActiveText", translator.GetTranslatedString("HyperGrid"));
            string disabled = translator.GetTranslatedString("Disabled"),
                   enabled  = translator.GetTranslatedString("Enabled");

            vars.Add("HGActive", disabled + "(TODO: FIX)");
            vars.Add("VoiceActiveLabel", translator.GetTranslatedString("Voice"));
            vars.Add("VoiceActive",
                     config.Configs["Voice"] != null &&
                     config.Configs["Voice"].GetString("Module", "GenericVoice") != "GenericVoice"
                         ? enabled
                         : disabled);
            vars.Add("CurrencyActiveLabel", translator.GetTranslatedString("Currency"));
            vars.Add("CurrencyActive",
                     webInterface.Registry.RequestModuleInterface <IMoneyModule>() != null ? enabled : disabled);

            return(vars);
        }
コード例 #2
0
 public virtual void FinishedStartup()
 {
     m_agentInfoConnector = DataManager.RequestPlugin<IAgentInfoConnector>();
     m_gridService = m_registry.RequestModuleInterface<IGridService>();
 }
コード例 #3
0
 public virtual void FinishedStartup()
 {
     m_agentInfoConnector = Framework.Utilities.DataManager.RequestPlugin <IAgentInfoConnector> ();
 }
コード例 #4
0
ファイル: AgentInfoService.cs プロジェクト: Gnu32/Silverfin
 public virtual void FinishedStartup()
 {
     m_agentInfoConnector = DataManager.RequestPlugin<IAgentInfoConnector>();
 }
コード例 #5
0
 public virtual void FinishedStartup()
 {
     m_agentInfoConnector = Framework.Utilities.DataManager.RequestPlugin<IAgentInfoConnector>();
 }
コード例 #6
0
ファイル: AgentInfoService.cs プロジェクト: x8ball/Aurora-Sim
 public void FinishedStartup()
 {
     m_agentInfoConnector = Aurora.DataManager.DataManager.RequestPlugin<IAgentInfoConnector>();
 }
コード例 #7
0
 public virtual void FinishedStartup()
 {
     m_agentInfoConnector = DataManager.RequestPlugin <IAgentInfoConnector>();
 }
コード例 #8
0
ファイル: AgentInfoService.cs プロジェクト: kow/Aurora-Sim
 public void FinishedStartup()
 {
     m_agentInfoConnector = Aurora.DataManager.DataManager.RequestPlugin <IAgentInfoConnector>();
 }