示例#1
0
        private void Btn_SendImage_Click(object sender, EventArgs e)
        {
            OpenFileDialog fd = new OpenFileDialog();
            DialogResult   dr = fd.ShowDialog();

            if (dr == DialogResult.OK)
            {
                StartF.SendRobotImage(fd.FileName, _UserRow.Field <string>("User_ContactTEMPID"), _UserRow.Field <string>("User_SourceType"));
            }
        }
        private void btn_download_Click(object sender, EventArgs e)
        {
            Linq.dbDataContext db = new Linq.dbDataContext(System.Configuration.ConfigurationManager.ConnectionStrings[GlobalParam.DataSourceName].ConnectionString);
            //db.ExecuteCommand("SET TRANSACTION ISOLATION LEVEL READ UNCOMMITTED");
            //db.ObjectTrackingEnabled = false;
            bool SendImage = false;
            //StartF.DownLoad163CaiPiaoV_kaijiangwang(ref SendImage, Dtp_DownloadDate.Value, true,true);
            //StartF.DownLoad163CaiPiaoV_aozc(ref SendImage, Dtp_DownloadDate.Value, true, true);


            string LastPeriod = db.Game_Result.Where(t => t.aspnet_UserID == GlobalParam.UserKey).OrderByDescending(t => t.GamePeriod).First().GamePeriod;

            StartF.ShiShiCaiDealGameLogAndNotice(Linq.ProgramLogic.ShiShiCaiMode.重庆时时彩, true);
            db.SubmitChanges();
            Download163AndDeal_Load(null, null);

            SendImage = true;
            #region "有新的就通知,以及处理结果"
            if (SendImage == true)
            {
                DataRow[] dr = RunnerF.MemberSource.Select("User_IsReply='true'");

                foreach (var Rowitem in dr)
                {
                    #region  多人同号不到ID跳过
                    #endregion

                    string TEMPUserName  = dr[0].Field <string>("User_ContactTEMPID");
                    string WXUserName    = dr[0].Field <string>("User_ContactID");
                    string WX_SourceType = dr[0].Field <string>("User_SourceType");

                    Linq.WX_WebSendPICSetting webpcset = db.WX_WebSendPICSetting.SingleOrDefault(t => t.aspnet_UserID == GlobalParam.UserKey &&
                                                                                                 t.WX_SourceType == WX_SourceType &&
                                                                                                 t.WX_UserName == WXUserName
                                                                                                 );
                    if (webpcset == null)
                    {
                        continue;
                    }

                    if (dr[0].Field <string>("User_SourceType") == "微")
                    {
                        if ((webpcset.dragonpic == true))
                        {
                            StartF.SendRobotContent(StartForm.ReadVirtualFile("Data3" + GlobalParam.UserName + "_" + (Enum.GetName(typeof(Linq.ProgramLogic.ShiShiCaiMode), Linq.ProgramLogic.GetMode(dr))) + ".txt", db), TEMPUserName, WX_SourceType);
                        }
                    }

                    if (dr[0].Field <string>("User_SourceType") == "易")
                    {
                        if ((webpcset.dragonpic == true))
                        {
                            StartF.SendRobotContent(StartForm.ReadVirtualFile("Data3_yixin" + GlobalParam.UserName + "_" + (Enum.GetName(typeof(Linq.ProgramLogic.ShiShiCaiMode), Linq.ProgramLogic.GetMode(dr))) + ".txt", db), TEMPUserName, WX_SourceType);
                        }
                    }

                    if ((webpcset.NumberPIC == true))
                    {
                        StartF.SendRobotImage(Application.StartupPath + "\\Data" + GlobalParam.UserName + ".jpg", TEMPUserName, WX_SourceType);
                        Thread.Sleep(500);
                    }

                    //if ((Mode == "All" && webpcset.NumberAndDragonPIC == true) || (Mode == "图3"))
                    //{
                    //    SendRobotImage(Application.StartupPath + "\\Data" + GlobalParam.UserName + "_v3.jpg", TEMPUserName, SourceType);
                    //}

                    if ((webpcset.NumberAndDragonPIC == true))
                    {
                        StartF.SendRobotContent(StartForm.ReadVirtualFile("Data数字龙虎" + GlobalParam.UserName + "_" + (Enum.GetName(typeof(Linq.ProgramLogic.ShiShiCaiMode), Linq.ProgramLogic.GetMode(dr))) + ".txt", db), TEMPUserName, WX_SourceType);
                    }

                    if (webpcset.shishicailink == true)
                    {
                        StartF.SendRobotLink("查询开奖网地址", "https://h5.13322.com/kaijiang/ssc_cqssc_history_dtoday.html", TEMPUserName, WX_SourceType);
                    }
                } //设置为自动监听的用户
            }     //新开奖

            #endregion
        }