当前位置: 首页>>代码示例>>C#>>正文


C# jabber类代码示例

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


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


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