void channelGroupForm_ChannelGroupRequestSubmitted(object sender, EventArgs e) { string channelName = channelGroupForm.ChannelName; string channelGroupName = channelGroupForm.ChannelGroupName; string nameSpace = ""; switch (channelGroupForm.ChannelGroupRequestType) { case "AddChannel": UpdateListBoxForDisplay("Running AddChannelsToChannelGroup()"); pubnub.AddChannelsToChannelGroup <string>(channelName.Split(','), nameSpace, channelGroupName, DisplayReturnMessage, DisplayErrorMessage); break; case "RemoveChannel": UpdateListBoxForDisplay("Running RemoveChannelsFromChannelGroup()"); pubnub.RemoveChannelsFromChannelGroup <string>(channelName.Split(','), nameSpace, channelGroupName, DisplayReturnMessage, DisplayErrorMessage); break; case "GetChannelList": UpdateListBoxForDisplay("Running GetChannelsForChannelGroup()"); pubnub.GetChannelsForChannelGroup <string>(nameSpace, channelGroupName, DisplayReturnMessage, DisplayErrorMessage); break; } channelGroupForm = null; }
void channelGroupForm_ChannelGroupRequestSubmitted(object sender, EventArgs e) { string channelName = channelGroupForm.ChannelName; string channelGroupName = channelGroupForm.ChannelGroupName; string nameSpace = ""; switch (channelGroupForm.ChannelGroupRequestType) { case "AddChannel": UpdateListBoxForDisplay("Running AddChannelsToChannelGroup()"); pubnub.AddChannelsToChannelGroup<string>(channelName.Split(','), nameSpace, channelGroupName, DisplayReturnMessage, DisplayErrorMessage); break; case "RemoveChannel": UpdateListBoxForDisplay("Running RemoveChannelsFromChannelGroup()"); pubnub.RemoveChannelsFromChannelGroup<string>(channelName.Split(','), nameSpace, channelGroupName, DisplayReturnMessage, DisplayErrorMessage); break; case "GetChannelList": UpdateListBoxForDisplay("Running GetChannelsForChannelGroup()"); pubnub.GetChannelsForChannelGroup<string>(nameSpace, channelGroupName, DisplayReturnMessage, DisplayErrorMessage); break; } channelGroupForm = null; }
private void menuItemCGAddRemoveChannel_Click(object sender, EventArgs e) { channelGroupForm = new PubnubChannelGroup(); channelGroupForm.ChannelGroupRequestSubmitted += new EventHandler(channelGroupForm_ChannelGroupRequestSubmitted); channelGroupForm.Show(); }