• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    公众号

C# jabber类代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

本文整理汇总了C#中jabber的典型用法代码示例。如果您正苦于以下问题:C# jabber类的具体用法?C# jabber怎么用?C# jabber使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。



jabber类属于命名空间,在下文中一共展示了jabber类的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的C#代码示例。

示例1: XDataForm

 /// <summary>
 /// Create an x:data form from the given iq stanza.
 /// </summary>
 /// <param name="parent">Original stanza</param>
 public XDataForm(jabber.protocol.client.IQ parent) : this(FindData(parent))
 {
     m_stanza = (Packet) parent.CloneNode(true);
     Data d = FindData(m_stanza);
     m_parent = (Element)d.ParentNode;
     m_parent.RemoveChild(d);
 }
开发者ID:krbysn,项目名称:jabber-net,代码行数:11,代码来源:XDataForm.cs


示例2: m_node_OnItemAdd

 private void m_node_OnItemAdd(PubSubNode node, jabber.protocol.iq.PubSubItem item)
 {
     // OnItemRemove should have fired first, so no reason to remove it here.
     // Hopefully.
     Debug.Assert(lbID.Items.IndexOf(item.ID) == -1);
     lbID.Items.Add(item.ID);
 }
开发者ID:krbysn,项目名称:jabber-net,代码行数:7,代码来源:PubSubDisplay.cs


示例3: AddRosterItemComplete

 void AddRosterItemComplete(object sender, jabber.protocol.client.IQ response, object data)
 {
     if (response.Type != jabber.protocol.client.IQType.set) {
         QApplication.Invoke(delegate {
             QMessageBox.Critical(Gui.MainWindow, "Failed to add octy", "Server returned an error.");
         });
     }
 }
开发者ID:jrudolph,项目名称:synapse,代码行数:8,代码来源:OctyService.cs


示例4: m_node_OnItemRemove

 private void m_node_OnItemRemove(PubSubNode node, jabber.protocol.iq.PubSubItem item)
 {
     int index = lbID.Items.IndexOf(item.ID);
     if (lbID.SelectedIndex == index)
         rtItem.Clear();
     if (index >= 0)
         lbID.Items.RemoveAt(index);
 }
开发者ID:krbysn,项目名称:jabber-net,代码行数:8,代码来源:PubSubDisplay.cs


示例5: LolChatUser

 public LolChatUser(string jid, string nickname, string @group, string status, jabber.protocol.iq.Item item)
 {
     Item = item;
     Jid = jid;
     _nickname = nickname;
     _group = @group;
     _status = status;
 }
开发者ID:hesa2020,项目名称:Hesa-Twitch-Bot,代码行数:8,代码来源:LolChatUser.cs


示例6: User

 public User(string JID, string Nickname, string Group, string status, jabber.protocol.iq.Item _item)
 {
     item = _item;
     _JID = JID;
     _Nickname = Nickname;
     _Group = Group;
     _status = status;
 }
开发者ID:vrokolos,项目名称:LeagueChat,代码行数:8,代码来源:User.cs


示例7: ChatClient_OnMessage

        //Blink and add to notification list if messaged
        void ChatClient_OnMessage(object sender, jabber.protocol.client.Message msg)
        {
            //If is special message, don't show popup
            if (msg.Subject != null)
            {
                Dispatcher.BeginInvoke(DispatcherPriority.Input, new ThreadStart(() =>
                {
                    ChatSubjects subject = (ChatSubjects)Enum.Parse(typeof(ChatSubjects), msg.Subject, true);

                    if ((subject == ChatSubjects.PRACTICE_GAME_INVITE ||
                        subject == ChatSubjects.GAME_INVITE) &&
                        Client.NotificationContainer.Visibility != System.Windows.Visibility.Visible)
                    {
                        NotificationButton.Content = ".";
                    }
                }));
                return;
            }

            if (Client.AllPlayers.ContainsKey(msg.From.User) && !String.IsNullOrWhiteSpace(msg.Body))
            {
                ChatPlayerItem chatItem = Client.AllPlayers[msg.From.User];
                Dispatcher.BeginInvoke(DispatcherPriority.Input, new ThreadStart(() =>
                {
                    NotificationChatPlayer player = null;
                    foreach (NotificationChatPlayer x in ChatListView.Items)
                    {
                        if (x.PlayerName == chatItem.Username)
                        {
                            player = x;
                            break;
                        }
                    }

                    if (player == null)
                    {
                        player = new NotificationChatPlayer();
                        player.Tag = chatItem;
                        player.PlayerName = chatItem.Username;
                        player.Margin = new Thickness(1, 0, 1, 0);
                        player.PlayerLabelName.Content = chatItem.Username;
                        Client.ChatListView.Items.Add(player);
                    }

                    if (Client.ChatItem != null)
                    {
                        if ((string)Client.ChatItem.PlayerLabelName.Content != chatItem.Username)
                        {
                            player.BlinkRectangle.Visibility = System.Windows.Visibility.Visible;
                        }
                    }
                    else
                    {
                        player.BlinkRectangle.Visibility = System.Windows.Visibility.Visible;
                    }
                }));
            }
        }
开发者ID:JizzHub,项目名称:LegendaryClient,代码行数:59,代码来源:StatusPage.xaml.cs


示例8: InsertMessage

        /// <summary>
        /// Insert the given message into the history.  The timestamp on the message will be used, if
        /// included, otherwise the current time will be used.
        /// Messages without bodies will be ignored.
        /// </summary>
        /// <param name="msg"></param>
        public void InsertMessage(jabber.protocol.client.Message msg)
        {
            string body = msg.Body;
            if (body == null)
                return;  // typing indicator, e.g.

            string nick = (m_nick == null) ? msg.From.Resource : m_nick;
            AppendMaybeScroll(m_recvColor, nick + ":", body);
        }
开发者ID:rankida,项目名称:HangoutPhone,代码行数:15,代码来源:ChatHistory.cs


示例9: SendMessage

        public SendMessage(jabber.client.JabberClient jc)
        {
            //
            // Required for Windows Form Designer support
            //
            InitializeComponent();

            m_jc = jc;
        }
开发者ID:krbysn,项目名称:jabber-net,代码行数:9,代码来源:SendMessage.cs


示例10: LoadVCard

        public void LoadVCard(jabber.JID jid)
        {
            Text = string.Format ("Information for {0}", jid.Bare);
            JidLabel.Text = jid.Bare;

            jabber.protocol.iq.VCardIQ iq = XmppGlobal.Queries.CreateVCardQuery ();
            iq.To = new jabber.JID (jid.Bare);
            iq.Type = jabber.protocol.client.IQType.get;

            XmppGlobal.Queries.SendQuery (iq, new QueryCallback (GotVCard), null);
        }
开发者ID:noismaster,项目名称:xmppapplication,代码行数:11,代码来源:UserVCardDialog.cs


示例11: LoadEntityTime

        public void LoadEntityTime(jabber.JID jid)
        {
            TimeIQ iq = XmppGlobal.Queries.CreateTimeQuery ();

            iq.To = jid;

            XmppGlobal.Queries.SendQuery (iq, new QueryCallback (GotTimeQuery), null);

            JidLabel.Text = jid.ToString ();
            Spinner.Visible = true;
        }
开发者ID:noismaster,项目名称:xmppapplication,代码行数:11,代码来源:EntityTimeDialog.cs


示例12: ChatClient_OnMessage

 public void ChatClient_OnMessage(object sender, jabber.protocol.client.Message msg)
 {
     if (Client.AllPlayers.ContainsKey(msg.From.User) && !String.IsNullOrWhiteSpace(msg.Body))
     {
         ChatPlayerItem chatItem = Client.AllPlayers[msg.From.User];
         Dispatcher.BeginInvoke(DispatcherPriority.Input, new ThreadStart(() =>
         {
             if ((string)Client.ChatItem.PlayerLabelName.Content == chatItem.Username)
             {
                 Update();
             }
         }));
     }
 }
开发者ID:JizzHub,项目名称:LegendaryClient,代码行数:14,代码来源:ChatItem.xaml.cs


示例13: SubscriptionRequestDialog

        public SubscriptionRequestDialog(jabber.protocol.client.Presence request)
        {
            InitializeComponent ();

            this.request = request;

            RequestLabel.Text = string.Format ("{0} would like to add you to their contact list.  Is this OK?", request.From.Bare);

            AddCheckBox.Visible = false;

            if (!XmppGlobal.Roster.ContainsKey (request.From))
                if (!XmppGlobal.Roster.ContainsKey (new jabber.JID (request.From.Bare)))
                    AddCheckBox.Visible = true;
        }
开发者ID:noismaster,项目名称:xmppapplication,代码行数:14,代码来源:SubscriptionRequestDialog.cs


示例14: MessageWindow

        public MessageWindow(jabber.JID jid)
        {
            InitializeComponent ();

            foreign_jid = jid;
            thread_id = Guid.NewGuid ().ToString ().Replace ("-", "");
            UserAvatar.Image = XmppImages.DefaultAvatar;

            Activated += new EventHandler (MessageWindow_Activated);
            FormClosing += new FormClosingEventHandler (MessageWindow_FormClosing);
            Load += new EventHandler (MessageWindow_Load);
            OutgoingTextBox.KeyDown += new KeyEventHandler (OutgoingTextBox_KeyDown);
            RichTextBox1.LinkClicked += new LinkClickedEventHandler (RichTextBox1_LinkClicked);
            SendButton.Click += new EventHandler (SendButton_Click);
        }
开发者ID:noismaster,项目名称:xmppapplication,代码行数:15,代码来源:MessageWindow.cs


示例15: _jabberClient_OnMessage

 public void _jabberClient_OnMessage(object sender, jabber.protocol.client.Message msg)
 {
     if (!this.ReceiveFlag)
     {
         if (msg.From.Bare == this.MailId)
         {
             if (msg.Body != "")
             {
                 string receivedMsg = msg.From.User + " Says : " + msg.Body + "\n";
                 AppendConversation(receivedMsg);
                 msg.Body = "";
             }
         }
     }
 }
开发者ID:Akku,项目名称:XmppNetTest,代码行数:15,代码来源:FrmChat.cs


示例16: ProcessMessage

        public void ProcessMessage(jabber.protocol.client.Message message)
        {
            AuctionEvent ev = AuctionEvent.From(message.Body);

            switch(ev.Type)
            {
                case "CLOSE":
                    _listener.AuctionClosed();
                    break;
                case "PRICE":
                    _listener.CurrentPrice(ev.CurrentPrice, ev.Increment, ev.IsFrom(_sniperId));
                    break;
                default:
                    throw new Exception("Invalid message");
            }
        }
开发者ID:jgroszko,项目名称:AuctionSniper,代码行数:16,代码来源:AuctionMessageTranslator.cs


示例17: DiscoInfoQuery

        public void DiscoInfoQuery(jabber.JID to, string node, bool refresh, QueryCallback callback, object state)
        {
            if (!refresh) {
                IQ cache_version = XmppGlobal.InternalQueryCache.DiscoInfo[to.ToString () + "!!!!!" + node];

                if (cache_version != null) {
                    callback.Invoke (this, cache_version, state);
                    return;
                }
            }

            DiscoInfoIQ iq = XmppGlobal.Queries.CreateDiscoInfoQuery ();
            iq.To = to;

            if (!string.IsNullOrEmpty (node))
                iq.Node = node;

            XmppGlobal.Queries.SendQuery (iq, callback, state);
        }
开发者ID:noismaster,项目名称:xmppapplication,代码行数:19,代码来源:Disco.cs


示例18: AddBackJid

        // Manage the back button entry list
        private void AddBackJid(jabber.JID jid, string node)
        {
            if (back_history.Count > 0) {
                ItemNode inode = back_history.Peek ();

                if (inode.Jid != jid || inode.Node != node) {
                    back_history.Push (new ItemNode (jid, node));
                    BackButton.Enabled = true;
                }
            } else {
                back_history.Push (new ItemNode (jid, node));
                BackButton.Enabled = true;
            }
        }
开发者ID:noismaster,项目名称:xmppapplication,代码行数:15,代码来源:ServiceBrowser.cs


示例19: GotItems

 private void GotItems(DiscoManager sender, jabber.connection.DiscoNode node, object state)
 {
     // TODO: some of this will break in 2003.
     TreeNode[] nodes = tvServices.Nodes.Find(node.Key, true);
     foreach (TreeNode n in nodes)
     {
         n.ImageIndex = 7;
         n.SelectedImageIndex = 7;
         foreach (jabber.connection.DiscoNode dn in node.Children)
         {
             TreeNode tn = n.Nodes.Add(dn.Key, dn.Name);
             tn.ToolTipText = dn.Key.Replace('\u0000', '\n');
             tn.Tag = dn;
             tn.ImageIndex = 8;
             tn.SelectedImageIndex = 8;
         }
     }
     pgServices.Refresh();
 }
开发者ID:rankida,项目名称:HangoutPhone,代码行数:19,代码来源:ServiceDisplay.cs


示例20: GotInitialFeatures

 private void GotInitialFeatures(DiscoManager sender, jabber.connection.DiscoNode node, object state)
 {
     m_disco.BeginGetItems(node, new jabber.connection.DiscoNodeHandler(GotItems), state);
 }
开发者ID:rankida,项目名称:HangoutPhone,代码行数:4,代码来源:ServiceDisplay.cs



注:本文中的jabber类示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
C# java类代码示例发布时间:2022-05-24
下一篇:
C# jQueryObject类代码示例发布时间:2022-05-24
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap