本文整理汇总了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
示例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;
}