本文整理汇总了C#中IDialogModule类的典型用法代码示例。如果您正苦于以下问题:C# IDialogModule类的具体用法?C# IDialogModule怎么用?C# IDialogModule使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。
IDialogModule类属于命名空间,在下文中一共展示了IDialogModule类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: Initialise
public void Initialise(Scene scene, IConfigSource source)
{
m_scene = scene;
m_dialogModule = m_scene.RequestModuleInterface<IDialogModule>();
m_scene.RegisterModuleInterface<IGodsModule>(this);
m_scene.EventManager.OnNewClient += SubscribeToClientEvents;
}
示例2: AddRegion
public void AddRegion(Scene scene)
{
m_scene = scene;
m_dialogModule = m_scene.RequestModuleInterface<IDialogModule>();
m_scene.RegisterModuleInterface<IAttachmentsModule>(this);
m_scene.EventManager.OnNewClient += SubscribeToClientEvents;
// TODO: Should probably be subscribing to CloseClient too, but this doesn't yet give us IClientAPI
}
示例3: AddRegion
public void AddRegion(Scene scene)
{
if (ENABLED)
{
m_scene = scene;
m_scene.EventManager.OnSceneGroupMove += OnSceneGroupMove;
m_dialogMod = m_scene.RequestModuleInterface<IDialogModule>();
}
}
示例4: AddRegion
public void AddRegion(Scene scene)
{
if (ENABLED)
{
m_scene = scene;
m_scene.EventManager.OnSceneGroupMove += OnSceneGroupMove;
m_dialogMod = m_scene.RequestModuleInterface<IDialogModule>();
m_log.DebugFormat("[DA EXAMPLE MODULE]: Added region {0}", m_scene.Name);
}
}
示例5: RegionLoaded
public void RegionLoaded(Scene scene)
{
m_userManager = m_scene.RequestModuleInterface<IUserManagement>();
m_primCountModule = m_scene.RequestModuleInterface<IPrimCountModule>();
m_Dialog = m_scene.RequestModuleInterface<IDialogModule>();
}
示例6: RegionLoaded
public void RegionLoaded(IScene scene)
{
m_DialogModule = m_scene.RequestModuleInterface<IDialogModule> ();
m_scene.EventManager.OnStartupFullyComplete += EventManager_OnStartupFullyComplete;
}
示例7: SetModuleInterfaces
/// <summary>
/// Sets up references to modules required by the scene
/// </summary>
public void SetModuleInterfaces()
{
m_xmlrpcModule = RequestModuleInterface<IXMLRPC>();
m_worldCommModule = RequestModuleInterface<IWorldComm>();
XferManager = RequestModuleInterface<IXfer>();
m_AvatarFactory = RequestModuleInterface<IAvatarFactory>();
AttachmentsModule = RequestModuleInterface<IAttachmentsModule>();
m_serialiser = RequestModuleInterface<IRegionSerialiserModule>();
m_dialogModule = RequestModuleInterface<IDialogModule>();
m_capsModule = RequestModuleInterface<ICapabilitiesModule>();
m_teleportModule = RequestModuleInterface<IEntityTransferModule>();
// Shoving this in here for now, because we have the needed
// interfaces at this point
//
// TODO: Find a better place for this
//
while (m_regInfo.EstateSettings.EstateOwner == UUID.Zero && MainConsole.Instance != null)
{
MainConsole.Instance.Output("The current estate " + m_regInfo.EstateSettings.EstateName + " has no owner set.");
List<char> excluded = new List<char>(new char[1] { ' ' });
string first = MainConsole.Instance.CmdPrompt("Estate owner first name", "Test", excluded);
string last = MainConsole.Instance.CmdPrompt("Estate owner last name", "User", excluded);
UserAccount account = UserAccountService.GetUserAccount(m_regInfo.ScopeID, first, last);
if (account == null)
{
// Create a new account
account = new UserAccount(m_regInfo.ScopeID, first, last, String.Empty);
if (account.ServiceURLs == null || (account.ServiceURLs != null && account.ServiceURLs.Count == 0))
{
account.ServiceURLs = new Dictionary<string, object>();
account.ServiceURLs["HomeURI"] = string.Empty;
account.ServiceURLs["GatekeeperURI"] = string.Empty;
account.ServiceURLs["InventoryServerURI"] = string.Empty;
account.ServiceURLs["AssetServerURI"] = string.Empty;
}
if (UserAccountService.StoreUserAccount(account))
{
string password = MainConsole.Instance.PasswdPrompt("Password");
string email = MainConsole.Instance.CmdPrompt("Email", "");
account.Email = email;
UserAccountService.StoreUserAccount(account);
bool success = false;
success = AuthenticationService.SetPassword(account.PrincipalID, password);
if (!success)
m_log.WarnFormat("[USER ACCOUNT SERVICE]: Unable to set password for account {0} {1}.",
first, last);
GridRegion home = null;
if (GridService != null)
{
List<GridRegion> defaultRegions = GridService.GetDefaultRegions(UUID.Zero);
if (defaultRegions != null && defaultRegions.Count >= 1)
home = defaultRegions[0];
if (GridUserService != null && home != null)
GridUserService.SetHome(account.PrincipalID.ToString(), home.RegionID, new Vector3(128, 128, 0), new Vector3(0, 1, 0));
else
m_log.WarnFormat("[USER ACCOUNT SERVICE]: Unable to set home for account {0} {1}.",
first, last);
}
else
m_log.WarnFormat("[USER ACCOUNT SERVICE]: Unable to retrieve home region for account {0} {1}.",
first, last);
if (InventoryService != null)
success = InventoryService.CreateUserInventory(account.PrincipalID);
if (!success)
m_log.WarnFormat("[USER ACCOUNT SERVICE]: Unable to create inventory for account {0} {1}.",
first, last);
m_log.InfoFormat("[USER ACCOUNT SERVICE]: Account {0} {1} created successfully", first, last);
m_regInfo.EstateSettings.EstateOwner = account.PrincipalID;
m_regInfo.EstateSettings.Save();
}
else
m_log.ErrorFormat("[SCENE]: Unable to store account. If this simulator is connected to a grid, you must create the estate owner account first.");
}
else
{
m_regInfo.EstateSettings.EstateOwner = account.PrincipalID;
m_regInfo.EstateSettings.Save();
}
}
}
示例8: RegionState
// Setup runtime variable values
public RegionState(Scene p_scene, IConfig p_config)
{
scene = p_scene;
config = p_config;
Region = scene.RegionInfo.RegionName;
Host = scene.RegionInfo.ExternalHostName;
LocX = Convert.ToString(scene.RegionInfo.RegionLocX);
LocY = Convert.ToString(scene.RegionInfo.RegionLocY);
IDK = Convert.ToString(_idk_++);
showAlert = config.GetBoolean("alert_show", false);
string alertServerInfo = String.Empty;
if (showAlert)
{
bool showAlertServerInfo = config.GetBoolean("alert_show_serverinfo", true);
if (showAlertServerInfo)
alertServerInfo = String.Format("\nServer: {0}\nPort: {1}\nChannel: {2}\n\n",
config.GetString("server", ""), config.GetString("port", ""), config.GetString("channel", ""));
string alertPreMessage = config.GetString("alert_msg_pre", "This region is linked to Irc.");
string alertPostMessage = config.GetString("alert_msg_post", "Everything you say in public chat can be listened.");
alertMessage = String.Format("{0}\n{1}{2}", alertPreMessage, alertServerInfo, alertPostMessage);
dialogModule = scene.RequestModuleInterface<IDialogModule>();
}
// OpenChannel conditionally establishes a connection to the
// IRC server. The request will either succeed, or it will
// throw an exception.
ChannelState.OpenChannel(this, config);
// Connect channel to world events
scene.EventManager.OnChatFromWorld += OnSimChat;
scene.EventManager.OnChatFromClient += OnSimChat;
scene.EventManager.OnMakeRootAgent += OnMakeRootAgent;
scene.EventManager.OnMakeChildAgent += OnMakeChildAgent;
m_log.InfoFormat("[IRC-Region {0}] Initialization complete", Region);
}
示例9: SetModuleInterfaces
/// <summary>
/// Sets up references to modules required by the scene
/// </summary>
public void SetModuleInterfaces()
{
m_xmlrpcModule = RequestModuleInterface<IXMLRPC>();
m_worldCommModule = RequestModuleInterface<IWorldComm>();
XferManager = RequestModuleInterface<IXfer>();
m_AvatarFactory = RequestModuleInterface<IAvatarFactoryModule>();
AttachmentsModule = RequestModuleInterface<IAttachmentsModule>();
m_serialiser = RequestModuleInterface<IRegionSerialiserModule>();
m_dialogModule = RequestModuleInterface<IDialogModule>();
m_capsModule = RequestModuleInterface<ICapabilitiesModule>();
EntityTransferModule = RequestModuleInterface<IEntityTransferModule>();
m_groupsModule = RequestModuleInterface<IGroupsModule>();
AgentTransactionsModule = RequestModuleInterface<IAgentAssetTransactions>();
UserManagementModule = RequestModuleInterface<IUserManagement>();
}
示例10: SetModuleInterfaces
/// <summary>
/// Sets up references to modules required by the scene
/// </summary>
public void SetModuleInterfaces()
{
m_xmlrpcModule = RequestModuleInterface<IXMLRPC>();
m_worldCommModule = RequestModuleInterface<IWorldComm>();
XferManager = RequestModuleInterface<IXfer>();
m_AvatarFactory = RequestModuleInterface<IAvatarFactory>();
AttachmentsModule = RequestModuleInterface<IAttachmentsModule>();
m_serialiser = RequestModuleInterface<IRegionSerialiserModule>();
m_dialogModule = RequestModuleInterface<IDialogModule>();
m_capsModule = RequestModuleInterface<ICapabilitiesModule>();
m_teleportModule = RequestModuleInterface<IEntityTransferModule>();
}
示例11: AddRegion
public void AddRegion(Scene scene)
{
if (m_enabled)
{
m_scene = scene;
m_dialogmod = scene.RequestModuleInterface<IDialogModule>();
m_scene.EventManager.OnMakeRootAgent += OnVisit;
}
}
示例12: AddRegion
public void AddRegion(Scene scene)
{
if (m_enabled)
{
m_scene = scene;
m_dialogmod = m_scene.RequestModuleInterface<IDialogModule>();
m_scene.EventManager.OnChatFromWorld += new EventManager.ChatFromWorldEvent(OnChat);
m_scene.EventManager.OnChatFromClient += new EventManager.ChatFromClientEvent(OnChat);
}
}
示例13: AddRegion
public void AddRegion(Scene scene)
{
if (m_enabled)
{
m_scene = scene;
m_dialogmod = scene.RequestModuleInterface<IDialogModule>();
m_scene.EventManager.OnChatFromWorld += new EventManager.ChatFromWorldEvent(OnChat);
m_scene.EventManager.OnChatFromClient += new EventManager.ChatFromClientEvent(OnChat);
m_timer.Elapsed += new ElapsedEventHandler(OnTimer);
m_timer.Interval = m_cycleTime;
}
}
示例14: AddRegion
public void AddRegion(Scene scene)
{
if (m_enabled)
{
m_scene = scene;
m_dialogmod = m_scene.RequestModuleInterface<IDialogModule>();
m_pauseTimer.Elapsed += new ElapsedEventHandler(OnPauseTimer);
m_pauseTimer.Interval = 30000;
m_prims = new SceneObjectGroup[m_xCells, m_yCells];
RandomizeStartMatrix();
m_pauseTimer.Start(); //Don't allow users to setup or use module til all objects have time to load from datastore
}
}
示例15: PostInitialise
public void PostInitialise()
{
if (m_enabled)
{
m_dialogmod = m_scene.RequestModuleInterface<IDialogModule>();
m_scene.EventManager.OnChatFromWorld += new EventManager.ChatFromWorldEvent(OnChat);
m_scene.EventManager.OnChatFromClient += new EventManager.ChatFromClientEvent(OnChat);
//Start the timer
m_timer.Elapsed += new ElapsedEventHandler(OnTimer);
m_timer.Interval = m_cycleTime;
}
}