Exemplo n.º 1
0
        public async Task <ActionResult <DeleteChannelForm> > DeleteChannel([FromBody] DeleteChannelForm channel)
        {
            DeleteChannelForm c = this.Manager.DeleteChannel(channel, this.Identity);

            await this.HubContext.Clients.AllExcept(new string[] { Identity.ID }).SendAsync("onDeleteChannel", c);

            return(this.Ok(c));
        }
Exemplo n.º 2
0
        public DeleteChannelForm DeleteChannel(DeleteChannelForm channel, UserIdentity identity)
        {
            bool result = this.Manager.RemoveChannelForum(channel.idForum, channel.idChannel, identity);

            if (result)
            {
                return(channel);
            }
            else
            {
                return(new DeleteChannelForm());
            }
        }
Exemplo n.º 3
0
        private void DeleteChannelMenuItem_Click(object sender, EventArgs e)
        {
            DeleteChannelForm newDeleteChannelForm = new DeleteChannelForm();

            newDeleteChannelForm.Show();
        }