internal ProfileDocument(JinxBotClient profileClient) : this(profileClient.Client) { m_jbClient = profileClient; m_channelSelector = new ChannelSelect(profileClient); m_channelSelector.Show(this.dock); }
public ChannelSelect(JinxBotClient client) : this() { Debug.Assert(client != null); m_client = client; m_client.Client.RegisterChannelListReceivedNotification(Priority.Low, ChannelListReceived); m_client.Client.RegisterDisconnectedNotification(Priority.Low, Disconnected); }
private void Dispose(bool disposing) { if (disposing) { m_client.Client.UnregisterMessageSentNotification(Priority.Low, userSpoke); m_client.Client.WhisperReceived -= whisperReceived; m_client.Client.UserSpoke -= userSpoke; whisperReceived = null; userSpoke = null; m_client = null; m_profile = null; } }
public CommandTranslator(JinxBotClient client) { Debug.Assert(client != null); m_client = client; m_profile = client.Client.Settings as ClientProfile; string triggerCharacter = m_profile.TriggerCharacter; if (string.IsNullOrEmpty(triggerCharacter)) triggerCharacter = "!"; triggerCharacter = MetacharacterEscape.Replace(triggerCharacter, MetacharacterReplace); m_speakingTest = new Regex(string.Format(CultureInfo.InvariantCulture, "\\A{0}(?<commandText>.+)", triggerCharacter)); userSpoke = client_UserSpoke; whisperReceived = client_WhisperReceived; client.Client.UserSpoke += userSpoke; client.Client.WhisperReceived += whisperReceived; client.Client.RegisterMessageSentNotification(Priority.Low, userSpoke); }
public CommandTranslator(JinxBotClient client) { Debug.Assert(client != null); m_client = client; m_profile = client.Client.Settings as ClientProfile; string triggerCharacter = m_profile.TriggerCharacter; if (string.IsNullOrEmpty(triggerCharacter)) { triggerCharacter = "!"; } triggerCharacter = MetacharacterEscape.Replace(triggerCharacter, MetacharacterReplace); m_speakingTest = new Regex(string.Format(CultureInfo.InvariantCulture, "\\A{0}(?<commandText>.+)", triggerCharacter)); userSpoke = client_UserSpoke; whisperReceived = client_WhisperReceived; client.Client.UserSpoke += userSpoke; client.Client.WhisperReceived += whisperReceived; client.Client.RegisterMessageSentNotification(Priority.Low, userSpoke); }