Example #1
0
        public static void zhuanhua_copy_Click_kouling(CmsForm cmsForm, string content)
        {
            try
            {
                content = UrlUtil.copyImgContent(cmsForm, content, null);
                content = UrlUtil.parseContentWenan(cmsForm, content);
                ContentItem contentItem = UrlUtil.parseContent(cmsForm, content, null, true, true, 0);
                content = contentItem.content_send;

                string qq_com_pid = PidUtil.get_qq_com_pid_call(cmsForm, cmsForm.appBean.member_id);

                string weiba = UrlUtil.parseContent_kouling(cmsForm, contentItem, PidUtil.get_qq_com_pid_call(cmsForm, cmsForm.appBean.member_id), true);
                if (!string.IsNullOrEmpty(weiba))
                {
                    content = content + weiba;
                }
                string out_log;
                QqUtil.copy_content(cmsForm, content, out out_log);
                if (cmsForm.checkBox_tools_qingkong.Checked)
                {
                    ((IHTMLDocument2)cmsForm.webBrowser_zhuanhua.Document.DomDocument).body.innerHTML = "";
                }
                LogUtil.log_call(cmsForm, "转换拷贝完成!");
            }
            catch (Exception exception)
            {
                //MessageBox.Show("[messageForThread]出错:" + exception.ToString());
            }
        }
Example #2
0
        public static void send(CmsForm cmsForm, string content, string content_img, ArrayList imgList, CouponContent couponContent, int url_type, int goods_type)
        {
            string out_log = "";

            try
            {
                if (cmsForm.appBean.weibo_list == null || cmsForm.appBean.weibo_list.Count == 0)
                {
                    LogUtil.log_call(cmsForm, "没有微博账号!");
                    return;
                }
                int i = 0;
                while (i < cmsForm.appBean.weibo_list.Count)
                {
                    if (!cmsForm.appBean.send_status && !cmsForm.appBean.qunfa_genfa_qunfa_status)
                    {
                        out_log = "群发被强制停止";
                        return;
                    }
                    else
                    {
                        WeiboBean item = (WeiboBean)cmsForm.appBean.weibo_list[i];
                        if (item.status == 1)
                        {
                            string picId = "";
                            if (imgList != null && imgList.Count > 0)
                            {
                                int img_i = 0;
                                while (img_i < imgList.Count)
                                {
                                    string item_img = (string)imgList[img_i];
                                    string pic_id   = WeiboUtil.upload(cmsForm, item_img, item.cookie);
                                    if (!string.IsNullOrEmpty(pic_id))
                                    {
                                        if (!string.IsNullOrEmpty(picId))
                                        {
                                            picId = picId + ",";
                                        }
                                        picId = picId + pic_id;
                                    }
                                    img_i = +1;
                                }
                            }
                            content = content.Replace("<BR>", "\n");
                            WeiboUtil.post(cmsForm, string.Concat(content, QqUtil.weiba(cmsForm, out out_log)), picId, item.cookie);
                        }
                    }
                    i = i + 1;
                }
                LogUtil.log_call(cmsForm, "微博发完成!");
            }
            catch (Exception exception)
            {
                LogUtil.log_call(cmsForm, string.Concat("[autoSendweibo]出错:", exception.ToString()));
            }
            return;
        }
Example #3
0
 public static void zhuanhua_copy_Click(CmsForm cmsForm, string content)
 {
     try
     {
         content = UrlUtil.copyImgContent(cmsForm, content, null);
         content = UrlUtil.parseContentWenan(cmsForm, content);
         ContentItem contentItem = UrlUtil.parseContent(cmsForm, content, null, true, true, 0);
         content = contentItem.content_send;
         string out_log;
         QqUtil.copy_content(cmsForm, content, out out_log);
         if (cmsForm.checkBox_tools_qingkong.Checked)
         {
             ((IHTMLDocument2)cmsForm.webBrowser_zhuanhua.Document.DomDocument).body.innerHTML = "";
         }
         LogUtil.log_call(cmsForm, "转换拷贝完成!");
     }
     catch (Exception exception)
     {
         //MessageBox.Show("[messageForThread]出错:" + exception.ToString());
     }
 }
Example #4
0
        public static void qunfa_shoudong_fasong(CmsForm cmsForm, string content)
        {
            try
            {
                content = UrlUtil.parseContentWenan(cmsForm, content);
                ContentItem contentItem = UrlUtil.parseContent(cmsForm, content, null, cmsForm.checkBox_qunfa_pid.Checked, true, 0);
                if ((contentItem.urlList == null || contentItem.urlList.Count == 0) &&
                    cmsForm.checkBox_qunfa_link.Checked)
                {
                    LogUtil.log_call(cmsForm, "没有连接,跳过发送!");
                    ((IHTMLDocument2)cmsForm.webBrowser_send_content.Document.DomDocument).body.innerHTML = "";
                    return;
                }

                if (contentItem.status < 1)
                {
                    if (cmsForm.checkBox_qunfa_qq_boolean.Checked) //开启了qq发送
                    {
                        LogUtil.log_call(cmsForm, "开始qq群的发送!");

                        string content_send = contentItem.content_send;
                        content_send = UrlUtil.template_qq(cmsForm, contentItem, PidUtil.get_qq_com_pid_call(cmsForm, cmsForm.appBean.member_id), cmsForm.checkBox_qunfa_pid.Checked, cmsForm.appBean.qq_template);
                        content_send = UrlUtil.copyImgContent(cmsForm, content_send, null);
                        //if (this.checkBox_qunfa_qq_kouling_boolean.Checked == true)
                        //{
                        //    string kouling = UrlUtil.parseContent_kouling(this, contentItem, PidUtil.get_qq_com_pid(this, this.appBean.member_id), true);
                        //    content_send = content_send + kouling;
                        //}
                        QqUtil.send(cmsForm, content_send, content, contentItem.url_type, 1);

                        //QqUtil.send(this, contentItem.content_send);
                    }
                    if (cmsForm.checkBox_qunfa_weixin_boolean.Checked) //开启了qq发送
                    {
                        UrlUtil.parseContent_weixin(cmsForm, contentItem, null, cmsForm.checkBox_qunfa_pid.Checked);
                        UrlUtil.template_qq(cmsForm, contentItem, PidUtil.get_weixin_pid_call(cmsForm, cmsForm.appBean.member_id), cmsForm.checkBox_qunfa_pid.Checked, cmsForm.appBean.weixin_template);
                        LogUtil.log_call(cmsForm, "开始微信群的发送!");
                        WeixinUtil.send(cmsForm, contentItem.content_weixin, contentItem.content_weixin_img, contentItem.imgList, content, contentItem.url_type, 1);
                    }
                    if (cmsForm.checkBox_qunfa_weibo_boolean.Checked) //开启了qq发送
                    {
                        UrlUtil.parseContent_weixin(cmsForm, contentItem, PidUtil.get_weibo_pid_call(cmsForm, cmsForm.appBean.member_id), cmsForm.checkBox_qunfa_pid.Checked);
                        UrlUtil.template_qq(cmsForm, contentItem, PidUtil.get_weibo_pid_call(cmsForm, cmsForm.appBean.member_id), cmsForm.checkBox_qunfa_pid.Checked, cmsForm.appBean.weibo_template);
                        LogUtil.log_call(cmsForm, "开始微博的发送!");
                        WeiboUtil.send(cmsForm, contentItem.content_weixin, contentItem.content_weixin_img, contentItem.imgList, content, contentItem.url_type, 1);
                    }
                }
                else if (contentItem.status == 1)
                {
                    LogUtil.log_call(cmsForm, "优惠券小于最低优惠券要求,跳过发送!");
                }
                else if (contentItem.status == 2)
                {
                    LogUtil.log_call(cmsForm, "佣金比例小于设置的最低比例,跳过发送!");
                }
                else if (contentItem.status == 2)
                {
                    LogUtil.log_call(cmsForm, "所发的链接转换失败,跳过发送!");
                }
                try
                {
                    ((IHTMLDocument2)cmsForm.webBrowser_send_content.Document.DomDocument).body.innerHTML = "";
                }
                catch (Exception exception)
                { }
            }
            catch (Exception exception)
            {
                LogUtil.log_call(cmsForm, "发动异常:" + exception.ToString());
                //MessageBox.Show("[messageForThread]出错:" + exception.ToString());
            }
        }