コード例 #1
0
 private void Buzz()
 {
     if (analyzer == null)
     {
         return;
     }
     RobotCore.SendEMail("*****@*****.**", this.cmd.Para, string.Empty);
     analyzer.Send("Buzz已发送!");
 }
コード例 #2
0
 private void fetion_Load(object sender, EventArgs e)
 {
     notify.ShowBalloonTip(100, "", "获取联系人列表成功", ToolTipIcon.Info);
     menuItemLogin.Visible       = false;
     menuItemRobotConfig.Enabled = true;
     notify.Text = "HaozesFx-" + fetion.CurrentUser.NickName;
     RobotCore.Init(fetion);
     fetion.SetPresence(PresenceStatus.Active);
 }
コード例 #3
0
        private void ReLogin()
        {
            LogoutFx();
            RobotCore.Stop();
            string info = "系统遇到错误,20秒后将重新登陆";

            RobotCore.Log.Info(info);
            notify.ShowBalloonTip(100, "", info, ToolTipIcon.Info);
            Thread.Sleep(20000);
            LoginFx();
        }
コード例 #4
0
        private void fetion_AddBuddyApplication(object sender, ConversationArgs e)
        {
            XDocument doc    = XDocument.Parse(e.Text);
            string    uri    = doc.Element("events").Element("event").Element("application").Attribute("uri").Value;
            string    desc   = doc.Element("events").Element("event").Element("application").Attribute("desc").Value;
            string    userid = doc.Element("events").Element("event").Element("application").Attribute("user-id").Value;

            fetion.SendToSelf(uri + "添加你为好友");
            fetion.AgreeAddBuddy(new SipUri(uri), userid);

            RobotCore.SendEMail("HaozesFx Robot Message", uri.ToString() + " 添加你的机器人为好友,机器人已自动添加他为好友");
        }
コード例 #5
0
 public void Formward(string msg)
 {
     RobotCore.SendEMail(string.Empty, msg);
 }
コード例 #6
0
 public void Formward(string mailContent)
 {
     mailContent = string.Format("SipUrl:{0} Display Name:{1}" + Environment.NewLine + "says:{2}", contact.Uri.ToString(), contact.DisplayName, mailContent);
     RobotCore.SendEMail(string.Empty, mailContent);
 }