示例#1
0
        public void Ban(MucContact mucContact)
        {
            UI.SingleValueBox banReason = new UI.SingleValueBox("Ban reason", "Ban user");
            banReason.DataContext = mucContact;

            banReason.Activate();
            if ((bool) banReason.ShowDialog())
            {
                mucContact.MucRoom.Ban(mucContact, banReason.Text);
            }
        }
        public void Kick(MucContact mucContact)
        {
            UI.SingleValueBox kickReason = new UI.SingleValueBox("Kick reason", "Kick user");
            kickReason.DataContext = mucContact;

            kickReason.Activate();
            if ((bool) kickReason.ShowDialog())
            {
                mucContact.MucRoom.Kick(mucContact, kickReason.Text);
            }
        }