Ejemplo n.º 1
0
        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;
        }
Ejemplo n.º 2
0
        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;
        }
Ejemplo n.º 3
0
        private void menuItemCGAddRemoveChannel_Click(object sender, EventArgs e)
        {
            channelGroupForm = new PubnubChannelGroup();
            channelGroupForm.ChannelGroupRequestSubmitted += new EventHandler(channelGroupForm_ChannelGroupRequestSubmitted);
            channelGroupForm.Show();

        }
Ejemplo n.º 4
0
 private void menuItemCGAddRemoveChannel_Click(object sender, EventArgs e)
 {
     channelGroupForm = new PubnubChannelGroup();
     channelGroupForm.ChannelGroupRequestSubmitted += new EventHandler(channelGroupForm_ChannelGroupRequestSubmitted);
     channelGroupForm.Show();
 }