当前位置: 首页>>代码示例>>C#>>正文


C# WebInterface.UserTypeArgs方法代码示例

本文整理汇总了C#中Universe.Modules.Web.WebInterface.UserTypeArgs方法的典型用法代码示例。如果您正苦于以下问题:C# WebInterface.UserTypeArgs方法的具体用法?C# WebInterface.UserTypeArgs怎么用?C# WebInterface.UserTypeArgs使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在Universe.Modules.Web.WebInterface的用法示例。


在下文中一共展示了WebInterface.UserTypeArgs方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。

示例1: Fill


//.........这里部分代码省略.........
            monthsArgs.Add(new Dictionary<string, object> {{"Value", translator.GetTranslatedString("Nov_Short")}});
            monthsArgs.Add(new Dictionary<string, object> {{"Value", translator.GetTranslatedString("Dec_Short")}});

            List<Dictionary<string, object>> yearsArgs = new List<Dictionary<string, object>>();
            for (int i = 1940; i <= 2013; i++)
                yearsArgs.Add(new Dictionary<string, object> {{"Value", i}});

            vars.Add("Days", daysArgs);
            vars.Add("Months", monthsArgs);
            vars.Add("Years", yearsArgs);

            var sortBy = new Dictionary<string, bool>();
            sortBy.Add("RegionName", true);

            var RegionListVars = new List<Dictionary<string, object>>();
            var regions = Framework.Utilities.DataManager.RequestPlugin<IRegionData>().Get((RegionFlags) 0,
                RegionFlags.Hyperlink |
                RegionFlags.Foreign |
                RegionFlags.Hidden,
                null, null, sortBy);
            foreach (var region in regions)
            {

                RegionListVars.Add (new Dictionary<string, object> {
                    { "RegionName", region.RegionName },
                    { "RegionUUID", region.RegionID }
                });
            }

            vars.Add("RegionList", RegionListVars);
            vars.Add("UserHomeRegionText", translator.GetTranslatedString("UserHomeRegionText"));

            vars.Add("UserTypeText", translator.GetTranslatedString("UserTypeText"));
            vars.Add("UserType", webInterface.UserTypeArgs(translator)) ;

            List<AvatarArchive> archives = webInterface.Registry.RequestModuleInterface<IAvatarAppearanceArchiver>().GetAvatarArchives();

            List<Dictionary<string, object>> avatarArchives = new List<Dictionary<string, object>>();
            IWebHttpTextureService webTextureService = webInterface.Registry.
                                                                    RequestModuleInterface<IWebHttpTextureService>();
            foreach (var archive in archives)
                avatarArchives.Add(new Dictionary<string, object>
                                       {
                                           {"AvatarArchiveName", archive.FolderName },
                                           {"AvatarArchiveSnapshotID", archive.Snapshot},
                                           {
                                               "AvatarArchiveSnapshotURL",
                                               webTextureService.GetTextureURL(archive.Snapshot)
                                           }
                                       });

            vars.Add("AvatarArchive", avatarArchives);

            string tosLocation = "";
            if (loginServerConfig != null && loginServerConfig.GetBoolean("UseTermsOfServiceOnFirstLogin", false))
            {
                tosLocation = loginServerConfig.GetString("FileNameOfTOS", "");
                tosLocation = PathHelpers.VerifyReadFile (tosLocation,  ".txt", simBase.DefaultDataPath);
            }
            string ToS = "There are no Terms of Service currently. This may be changed at any point in the future.";

            if (tosLocation != "")
            {
                System.IO.StreamReader reader =
                    new System.IO.StreamReader(System.IO.Path.Combine(Environment.CurrentDirectory, tosLocation));
                try
开发者ID:VirtualReality,项目名称:Universe,代码行数:67,代码来源:register.cs

示例2: Fill


//.........这里部分代码省略.........
                    agent.Flags &= ~IAgentFlags.TempBan;
                    agent.Flags &= ~IAgentFlags.PermBan;
                    agent.OtherAgentInformation.Remove ("Temporary BanInfo");
                    agentService.UpdateAgent (agent);
                } else {
                    DateTime bannedTime = agent.OtherAgentInformation ["Temporary BanInfo"].AsDate ();
                    TempUserBanned = bannedTime != Util.UnixEpoch;
                    bannedUntil = string.Format ("{0} {1}", bannedTime.ToShortDateString (), bannedTime.ToLongTimeString ());
                }
            }
            bool userOnline = false;
            IAgentInfoService agentInfoService = webInterface.Registry.RequestModuleInterface<IAgentInfoService> ();
            if (agentInfoService != null) {
                UserInfo Info = null;
                if (account != null)
                    Info = agentInfoService.GetUserInfo (account.PrincipalID.ToString ());
                userOnline = Info != null && Info.IsOnline;
            }

            if (account != null) {
                vars.Add ("EmailValue", account.Email);
                vars.Add ("UserID", account.PrincipalID);
                vars.Add ("UserName", account.Name);
            } else {
                vars.Add ("EmailValue", "");
                vars.Add ("UserID", "");
                vars.Add ("UserName", "");
            }

            vars.Add ("UserOnline", userOnline);
            vars.Add ("NotUserBanned", !userBanned);
            vars.Add ("UserBanned", userBanned);
            vars.Add ("TempUserBanned", TempUserBanned);
            vars.Add ("BannedUntil", bannedUntil);
            vars.Add ("ErrorMessage", error);
            vars.Add ("ChangeUserInformationText", translator.GetTranslatedString ("ChangeUserInformationText"));
            vars.Add ("ChangePasswordText", translator.GetTranslatedString ("ChangePasswordText"));
            vars.Add ("NewPasswordText", translator.GetTranslatedString ("NewPasswordText"));
            vars.Add ("NewPasswordConfirmationText", translator.GetTranslatedString ("NewPasswordConfirmationText"));
            vars.Add ("ChangeEmailText", translator.GetTranslatedString ("ChangeEmailText"));
            vars.Add ("NewEmailText", translator.GetTranslatedString ("NewEmailText"));
            vars.Add ("UserNameText", translator.GetTranslatedString ("UserNameText"));
            vars.Add ("PasswordText", translator.GetTranslatedString ("PasswordText"));
            vars.Add ("DeleteUserText", translator.GetTranslatedString ("DeleteUserText"));
            vars.Add ("DeleteText", translator.GetTranslatedString ("DeleteText"));
            vars.Add ("DeleteUserInfoText", translator.GetTranslatedString ("DeleteUserInfoText"));
            vars.Add ("Submit", translator.GetTranslatedString ("Submit"));
            vars.Add ("Login", translator.GetTranslatedString ("Login"));
            vars.Add ("TypeUserNameToConfirm", translator.GetTranslatedString ("TypeUserNameToConfirm"));

            vars.Add ("AdminUserTypeInfoText", translator.GetTranslatedString ("AdminUserTypeInfoText"));
            vars.Add ("AdminSetUserTypeText", translator.GetTranslatedString ("UserTypeText"));

            vars.Add ("AdminLoginInAsUserText", translator.GetTranslatedString ("AdminLoginInAsUserText"));
            vars.Add ("AdminLoginInAsUserInfoText", translator.GetTranslatedString ("AdminLoginInAsUserInfoText"));
            vars.Add ("AdminDeleteUserText", translator.GetTranslatedString ("AdminDeleteUserText"));
            vars.Add ("AdminDeleteUserInfoText", translator.GetTranslatedString ("AdminDeleteUserInfoText"));
            vars.Add ("AdminUnbanUserText", translator.GetTranslatedString ("AdminUnbanUserText"));
            vars.Add ("AdminTempBanUserText", translator.GetTranslatedString ("AdminTempBanUserText"));
            vars.Add ("AdminTempBanUserInfoText", translator.GetTranslatedString ("AdminTempBanUserInfoText"));
            vars.Add ("AdminBanUserText", translator.GetTranslatedString ("AdminBanUserText"));
            vars.Add ("AdminBanUserInfoText", translator.GetTranslatedString ("AdminBanUserInfoText"));
            vars.Add ("BanText", translator.GetTranslatedString ("BanText"));
            vars.Add ("UnbanText", translator.GetTranslatedString ("UnbanText"));
            vars.Add ("TimeUntilUnbannedText", translator.GetTranslatedString ("TimeUntilUnbannedText"));
            vars.Add ("EdittingText", translator.GetTranslatedString ("EdittingText"));
            vars.Add ("BannedUntilText", translator.GetTranslatedString ("BannedUntilText"));

            vars.Add ("KickAUserInfoText", translator.GetTranslatedString ("KickAUserInfoText"));
            vars.Add ("KickAUserText", translator.GetTranslatedString ("KickAUserText"));
            vars.Add ("KickMessageText", translator.GetTranslatedString ("KickMessageText"));
            vars.Add ("KickUserText", translator.GetTranslatedString ("KickUserText"));

            vars.Add ("MessageAUserText", translator.GetTranslatedString ("MessageAUserText"));
            vars.Add ("MessageAUserInfoText", translator.GetTranslatedString ("MessageAUserInfoText"));
            vars.Add ("MessageUserText", translator.GetTranslatedString ("MessageUserText"));

            List<Dictionary<string, object>> daysArgs = new List<Dictionary<string, object>> ();
            for (int i = 0; i <= 100; i++)
                daysArgs.Add (new Dictionary<string, object> { { "Value", i } });

            List<Dictionary<string, object>> hoursArgs = new List<Dictionary<string, object>> ();
            for (int i = 0; i <= 23; i++)
                hoursArgs.Add (new Dictionary<string, object> { { "Value", i } });

            List<Dictionary<string, object>> minutesArgs = new List<Dictionary<string, object>> ();
            for (int i = 0; i <= 59; i++)
                minutesArgs.Add (new Dictionary<string, object> { { "Value", i } });

            vars.Add ("Days", daysArgs);
            vars.Add ("Hours", hoursArgs);
            vars.Add ("Minutes", minutesArgs);
            vars.Add ("DaysText", translator.GetTranslatedString ("DaysText"));
            vars.Add ("HoursText", translator.GetTranslatedString ("HoursText"));
            vars.Add ("MinutesText", translator.GetTranslatedString ("MinutesText"));

            vars.Add ("UserType", webInterface.UserTypeArgs (translator));

            return vars;
        }
开发者ID:Virtual-Universe,项目名称:Virtual-Universe,代码行数:101,代码来源:edit_user.cs


注:本文中的Universe.Modules.Web.WebInterface.UserTypeArgs方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。