Exemplo n.º 1
0
        void writeHeadData(ClassCSV cCSV)
        {
            long rowTarget = 2;

            while (rowTarget < cCSV.getDataMaxRow())
            {
                cCSV.setData(rowTarget + 1, 29, "馬体重");
                cCSV.setData(rowTarget + 1, 30, "増減");
                rowTarget += long.Parse(cCSV.getData(rowTarget, 4)) + 3;
            }
        }
Exemplo n.º 2
0
        void setData0B13(ClassCSV cCSV, string retbuff, long rowTarget, int numUma)
        {
            List <classDM> listDM = new List <classDM>();
            int            cnt    = 0;

            JVData_Struct.JV_DM_INFO mDMData =
                new JVData_Struct.JV_DM_INFO();
            mDMData.SetDataB(ref retbuff);
            for (int i = 0; i < numUma; i++)
            {
                if (int.Parse(mDMData.DMInfo[cnt].Umaban) == 0 ||
                    int.Parse(mDMData.DMInfo[cnt].Umaban) > 18)
                {
                    break;
                }
                listDM.Add(new classDM(int.Parse(mDMData.DMInfo[cnt].Umaban),
                                       int.Parse(mDMData.DMInfo[cnt].DMTime)));
                cnt++;
            }
            listDM.Sort((a, b) => a.DMTime - b.DMTime);
            // 書き込み
            for (int i = 0; i < numUma; i++)
            {
                if (listDM[i].Umaban <= 18)
                {
                    cCSV.setData(rowTarget + 1 + listDM[i].Umaban, 9,
                                 (i + 1).ToString());
                }
            }
        }
Exemplo n.º 3
0
        void setData0B31(ClassCSV cCSV, string retbuff, long rowTarget, int numUma)
        {
            long   rowWrite;
            double odds;
            double oddslow;
            int    ninki;

            JVData_Struct.JV_O1_ODDS_TANFUKUWAKU mO1Data =
                new JVData_Struct.JV_O1_ODDS_TANFUKUWAKU();
            mO1Data.SetDataB(ref retbuff);
            for (int i = 0; i <= numUma - 1; i++)
            {
                rowWrite = rowTarget + 1 +
                           int.Parse(mO1Data.OddsTansyoInfo[i].Umaban);
                if (mO1Data.OddsTansyoInfo[i].Odds.Contains("*") ||
                    mO1Data.OddsTansyoInfo[i].Odds.Contains("-"))
                {
                    odds = 0;
                }
                else
                {
                    odds = double.Parse(mO1Data.OddsTansyoInfo[i].Odds) / 10;
                }
                cCSV.setData(rowWrite, 5, String.Format("{0:0.0}", odds));
                if (mO1Data.OddsFukusyoInfo[i].OddsLow.Contains("*") ||
                    mO1Data.OddsFukusyoInfo[i].OddsLow.Contains("-"))
                {
                    oddslow = 0;
                }
                else
                {
                    oddslow = double.Parse(mO1Data.OddsFukusyoInfo[i].OddsLow) / 10;
                }
                cCSV.setData(rowWrite, 6, String.Format("{0:0.0}", oddslow));
                if (mO1Data.OddsTansyoInfo[i].Ninki.Contains("*") ||
                    mO1Data.OddsTansyoInfo[i].Ninki.Contains("-"))
                {
                    ninki = 0;
                }
                else
                {
                    ninki = int.Parse(mO1Data.OddsTansyoInfo[i].Ninki);
                }
                cCSV.setData(rowWrite, 10, ninki.ToString());
            }
        }
Exemplo n.º 4
0
        bool setDataDM(ClassCSV cCSV, string retbuff, DateTime datetimeTarg, bool isFind)
        {
            List <classDM> listDM = new List <classDM>();

            DateTime dateTime;
            string   strShortJyo;
            string   strJyo;
            long     rowTarget;
            int      numUma;
            int      cnt = 0;

            JVData_Struct.JV_DM_INFO mDMData =
                new JVData_Struct.JV_DM_INFO();
            mDMData.SetDataB(ref retbuff);
            dateTime = DateTime.Parse(
                (mDMData.id.Year +
                 mDMData.id.MonthDay).Insert(4, "/").Insert(7, "/"));
            if (dateTime.ToShortDateString() != datetimeTarg.ToShortDateString())
            {
                return(false);
            }
            if (isFind && dateTime > datetimeTarg)
            {
                return(true);
            }
            strJyo = cCommon.JyoCord(mDMData.id.JyoCD);
            if (strJyo == "")
            {
                return(false);
            }
            strShortJyo = cCommon.Jyo2ShortJyo(strJyo);
            rowTarget   = cCSV.getDataRow(strShortJyo,
                                          int.Parse(mDMData.id.RaceNum));
            numUma = int.Parse(cCSV.getData(rowTarget, 4));
            for (int i = 0; i < numUma; i++)
            {
                if (int.Parse(mDMData.DMInfo[cnt].Umaban) == 0 ||
                    int.Parse(mDMData.DMInfo[cnt].Umaban) > 18)
                {
                    break;
                }
                listDM.Add(new classDM(int.Parse(mDMData.DMInfo[cnt].Umaban),
                                       int.Parse(mDMData.DMInfo[cnt].DMTime)));
                cnt++;
            }
            listDM.Sort((a, b) => a.DMTime - b.DMTime);
            // 書き込み
            for (int i = 0; i < numUma; i++)
            {
                if (listDM[i].Umaban <= 18)
                {
                    cCSV.setData(rowTarget + 1 + listDM[i].Umaban, 9,
                                 (i + 1).ToString());
                }
            }

            return(false);
        }
Exemplo n.º 5
0
        void setData0B11(ClassCSV cCSV, string retbuff, long rowTarget, int numUma)
        {
            List <classDM> listDM = new List <classDM>();
            int            cnt    = 0;
            int            zogensa;

            JVData_Struct.JV_WH_BATAIJYU mWHData =
                new JVData_Struct.JV_WH_BATAIJYU();
            mWHData.SetDataB(ref retbuff);
            // 馬体重
            for (long i = rowTarget + 2; i <= rowTarget + numUma + 1; i++)
            {
                cCSV.setData(i, 29, mWHData.BataijyuInfo[cnt].BaTaijyu);
                if (mWHData.BataijyuInfo[cnt].ZogenSa.Contains(" "))
                {
                    zogensa = 0;
                }
                else
                {
                    zogensa = int.Parse(mWHData.BataijyuInfo[cnt].ZogenSa);
                }
                if (zogensa == 999)
                {
                    cCSV.setData(i, 30, "0");
                }
                else if (zogensa == 0)
                {
                    cCSV.setData(i, 30, "0");
                }
                else
                {
                    cCSV.setData(i, 30,
                                 mWHData.BataijyuInfo[cnt].ZogenFugo +
                                 String.Format("{0, 2}", zogensa));
                }
                cnt++;
            }
        }
Exemplo n.º 6
0
        void deleteZanteiData(ClassCSV cCSV)
        {
            long     rowTarget = 2;
            string   tmp;
            DateTime datecheck;

            while (rowTarget < cCSV.getDataMaxRow())
            {
                tmp       = cCSV.getData(2, 1) + " " + cCSV.getData(rowTarget, 5);
                datecheck = DateTime.Parse(tmp);
                if (DateTime.Now > datecheck)
                {
                    if (cCSV.getData(rowTarget - 1, 13).Contains("(暫定)"))
                    {
                        cCSV.setData(rowTarget - 1, 13,
                                     cCSV.getData(rowTarget - 1, 13).Replace("(暫定)", ""));
                    }
                    if (cCSV.getData(rowTarget - 1, 14).Contains("(暫定)"))
                    {
                        cCSV.setData(rowTarget - 1, 14,
                                     cCSV.getData(rowTarget - 1, 14).Replace("(暫定)", ""));
                    }
                    if (cCSV.getData(rowTarget, 13).Contains("(暫定)"))
                    {
                        cCSV.setData(rowTarget, 13,
                                     cCSV.getData(rowTarget, 13).Replace("(暫定)", ""));
                    }
                    if (cCSV.getData(rowTarget, 14).Contains("(暫定)"))
                    {
                        cCSV.setData(rowTarget, 14,
                                     cCSV.getData(rowTarget, 14).Replace("(暫定)", ""));
                    }
                }

                rowTarget += long.Parse(cCSV.getData(rowTarget, 4)) + 3;
            }
        }
Exemplo n.º 7
0
        void setDataSE(ClassCSV cCSV, string retbuff, long rowTarget)
        {
            long rowWrite;

            JVData_Struct.JV_SE_RACE_UMA mSeData =
                new JVData_Struct.JV_SE_RACE_UMA();
            mSeData.SetDataB(ref retbuff);
            if (int.Parse(mSeData.head.DataKubun) == 3 ||
                int.Parse(mSeData.head.DataKubun) == 4 ||
                int.Parse(mSeData.head.DataKubun) == 5 ||
                int.Parse(mSeData.head.DataKubun) == 6 ||
                int.Parse(mSeData.head.DataKubun) == 7)
            {
                rowWrite = rowTarget + 1 + int.Parse(mSeData.Umaban);
                cCSV.setData(rowWrite, 11,
                             (int.Parse(mSeData.KakuteiJyuni)).ToString());
            }
        }
Exemplo n.º 8
0
        void setDataTC(ClassCSV cCSV, string retbuff, DateTime datetimeTarg)
        {
            string strShortJyo;
            string strJyo;
            string tmp;
            string tmpTime;
            long   rowTarget;

            JVData_Struct.JV_TC_INFO mTCData =
                new JVData_Struct.JV_TC_INFO();
            mTCData.SetDataB(ref retbuff);
            strJyo = cCommon.JyoCord(mTCData.id.JyoCD);
            if (strJyo == "")
            {
                return;
            }
            strShortJyo = cCommon.Jyo2ShortJyo(strJyo);
            rowTarget   = 2;
            while (rowTarget < cCSV.getDataMaxRow())
            {
                tmp = int.Parse(mTCData.id.Kaiji).ToString() +
                      strShortJyo +
                      int.Parse(mTCData.id.Nichiji).ToString();
                tmpTime = int.Parse(mTCData.TCInfoAfter.Ji).ToString() +
                          ":" + mTCData.TCInfoAfter.Fun;
                if (cCSV.getData(rowTarget, 3) == tmp &&
                    int.Parse(cCSV.getData(rowTarget, 6)) ==
                    int.Parse(mTCData.id.RaceNum))
                {
                    if (cCSV.getData(rowTarget, 5) != tmpTime)
                    {
                        cCSV.setData(rowTarget, 5, tmpTime);
                        break;
                    }
                }
                rowTarget += long.Parse(cCSV.getData(rowTarget, 4)) + 3;
            }
        }
Exemplo n.º 9
0
        public void writeHaitouData(ClassCSV cCSV, JVData_Struct.JV_HR_PAY mHrData, long rowTarget)
        {
            int    res;
            string tmp;

            // 単勝配当
            cCSV.setData(rowTarget - 1, 16,
                         createPayData(mHrData.PayTansyo[0].Pay,
                                       mHrData.PayTansyo[0].Umaban));
            if (int.TryParse(mHrData.PayTansyo[1].Pay, out res))
            {
                cCSV.setData(rowTarget + 0, 16,
                             createPayData(mHrData.PayTansyo[1].Pay,
                                           mHrData.PayTansyo[1].Umaban));
                cCSV.setData(rowTarget - 1, 17,
                             createPayData(mHrData.PayTansyo[2].Pay,
                                           mHrData.PayTansyo[2].Umaban));
            }
            // 1着複勝配当
            cCSV.setData(rowTarget + 0, 17,
                         createPayData(mHrData.PayFukusyo[0].Pay,
                                       mHrData.PayFukusyo[0].Umaban));
            cCSV.setData(rowTarget - 1, 18,
                         createPayData(mHrData.PayFukusyo[1].Pay,
                                       mHrData.PayFukusyo[1].Umaban));
            cCSV.setData(rowTarget + 0, 18,
                         createPayData(mHrData.PayFukusyo[2].Pay,
                                       mHrData.PayFukusyo[2].Umaban));
            if (int.TryParse(mHrData.PayFukusyo[3].Pay, out res))
            {
                cCSV.setData(rowTarget - 1, 19,
                             createPayData(mHrData.PayFukusyo[3].Pay,
                                           mHrData.PayFukusyo[3].Umaban));
                cCSV.setData(rowTarget + 0, 19,
                             createPayData(mHrData.PayFukusyo[4].Pay,
                                           mHrData.PayFukusyo[4].Umaban));
            }
            // 枠連配当
            tmp = "0" + mHrData.PayWakuren[0].Umaban.Substring(0, 1) +
                  "0" + mHrData.PayWakuren[0].Umaban.Substring(1, 1);
            cCSV.setData(rowTarget - 1, 20,
                         createPayData(mHrData.PayWakuren[0].Pay, tmp));
            if (int.TryParse(mHrData.PayWakuren[1].Pay, out res))
            {
                tmp = "0" + mHrData.PayWakuren[1].Umaban.Substring(0, 1) +
                      "0" + mHrData.PayWakuren[1].Umaban.Substring(1, 1);
                cCSV.setData(rowTarget + 0, 20,
                             createPayData(mHrData.PayWakuren[1].Pay, tmp));
                tmp = "0" + mHrData.PayWakuren[2].Umaban.Substring(0, 1) +
                      "0" + mHrData.PayWakuren[2].Umaban.Substring(1, 1);
                cCSV.setData(rowTarget - 1, 21,
                             createPayData(mHrData.PayWakuren[2].Pay, tmp));
            }
            // 馬連配当
            cCSV.setData(rowTarget + 0, 21,
                         createPayData(mHrData.PayUmaren[0].Pay,
                                       mHrData.PayUmaren[0].Kumi));
            if (int.TryParse(mHrData.PayUmaren[1].Pay, out res))
            {
                cCSV.setData(rowTarget - 1, 22,
                             createPayData(mHrData.PayUmaren[1].Pay,
                                           mHrData.PayUmaren[1].Kumi));
                cCSV.setData(rowTarget + 0, 22,
                             createPayData(mHrData.PayUmaren[2].Pay,
                                           mHrData.PayUmaren[2].Kumi));
            }
            // 馬単配当
            cCSV.setData(rowTarget - 1, 23,
                         createPayData(mHrData.PayUmatan[0].Pay,
                                       mHrData.PayUmatan[0].Kumi));
            if (int.TryParse(mHrData.PayUmatan[1].Pay, out res))
            {
                cCSV.setData(rowTarget + 0, 23,
                             createPayData(mHrData.PayUmatan[1].Pay,
                                           mHrData.PayUmatan[1].Kumi));
                cCSV.setData(rowTarget - 1, 24,
                             createPayData(mHrData.PayUmatan[2].Pay,
                                           mHrData.PayUmatan[2].Kumi));
                cCSV.setData(rowTarget + 0, 24,
                             createPayData(mHrData.PayUmatan[3].Pay,
                                           mHrData.PayUmatan[3].Kumi));
                cCSV.setData(rowTarget - 1, 25,
                             createPayData(mHrData.PayUmatan[4].Pay,
                                           mHrData.PayUmatan[4].Kumi));
                cCSV.setData(rowTarget - 1, 25,
                             createPayData(mHrData.PayUmatan[5].Pay,
                                           mHrData.PayUmatan[5].Kumi));
            }
            // 3連複配当
            cCSV.setData(rowTarget - 1, 26,
                         createPayData(mHrData.PaySanrenpuku[0].Pay,
                                       mHrData.PaySanrenpuku[0].Kumi));
            if (int.TryParse(mHrData.PaySanrenpuku[1].Pay, out res))
            {
                cCSV.setData(rowTarget + 0, 26,
                             createPayData(mHrData.PaySanrenpuku[1].Pay,
                                           mHrData.PaySanrenpuku[1].Kumi));
                cCSV.setData(rowTarget - 1, 27,
                             createPayData(mHrData.PaySanrenpuku[2].Pay,
                                           mHrData.PaySanrenpuku[2].Kumi));
            }
            // 3連単配当
            cCSV.setData(rowTarget + 0, 27,
                         createPayData(mHrData.PaySanrentan[0].Pay,
                                       mHrData.PaySanrentan[0].Kumi));
            if (int.TryParse(mHrData.PaySanrentan[1].Pay, out res))
            {
                cCSV.setData(rowTarget - 1, 28,
                             createPayData(mHrData.PaySanrentan[1].Pay,
                                           mHrData.PaySanrentan[1].Kumi));
                cCSV.setData(rowTarget + 0, 28,
                             createPayData(mHrData.PaySanrentan[2].Pay,
                                           mHrData.PaySanrentan[2].Kumi));
                cCSV.setData(rowTarget - 1, 29,
                             createPayData(mHrData.PaySanrentan[3].Pay,
                                           mHrData.PaySanrentan[3].Kumi));
                cCSV.setData(rowTarget - 1, 29,
                             createPayData(mHrData.PaySanrentan[4].Pay,
                                           mHrData.PaySanrentan[4].Kumi));
                cCSV.setData(rowTarget + 0, 30,
                             createPayData(mHrData.PaySanrentan[5].Pay,
                                           mHrData.PaySanrentan[5].Kumi));
            }
            // ワイド
            cCSV.setData(rowTarget + 0, 30,
                         createPayData(mHrData.PayWide[0].Pay,
                                       mHrData.PayWide[0].Kumi));
            cCSV.setData(rowTarget - 1, 31,
                         createPayData(mHrData.PayWide[1].Pay,
                                       mHrData.PayWide[1].Kumi));
            cCSV.setData(rowTarget + 0, 31,
                         createPayData(mHrData.PayWide[2].Pay,
                                       mHrData.PayWide[2].Kumi));
            if (int.TryParse(mHrData.PayWide[3].Pay, out res))
            {
                cCSV.setData(rowTarget - 1, 32,
                             createPayData(mHrData.PayWide[3].Pay,
                                           mHrData.PayWide[3].Kumi));
                cCSV.setData(rowTarget + 0, 32,
                             createPayData(mHrData.PayWide[4].Pay,
                                           mHrData.PayWide[4].Kumi));
                cCSV.setData(rowTarget - 1, 33,
                             createPayData(mHrData.PayWide[5].Pay,
                                           mHrData.PayWide[5].Kumi));
                cCSV.setData(rowTarget + 0, 33,
                             createPayData(mHrData.PayWide[6].Pay,
                                           mHrData.PayWide[6].Kumi));
            }
        }
Exemplo n.º 10
0
        void setDataWE(ClassCSV cCSV, string retbuff, DateTime datetimeTarg)
        {
            DateTime timeHappyo;
            DateTime timeRace;
            string   strShortJyo;
            string   strJyo;
            string   tmp;
            string   tmpTenko = "";
            string   tmpSiba  = "";
            string   tmpDirt  = "";
            string   tmpBaba  = "";
            long     rowTarget;

            JVData_Struct.JV_WE_WEATHER mWEData =
                new JVData_Struct.JV_WE_WEATHER();
            mWEData.SetDataB(ref retbuff);
            if (int.Parse(mWEData.HenkoID) == 2)
            {
                strJyo = cCommon.JyoCord(mWEData.id.JyoCD);
                if (strJyo == "")
                {
                    return;
                }
                strShortJyo = cCommon.Jyo2ShortJyo(strJyo);
                rowTarget   = 2;
                timeHappyo  = new DateTime(datetimeTarg.Year,
                                           datetimeTarg.Month,
                                           datetimeTarg.Day,
                                           int.Parse(mWEData.HappyoTime.Hour),
                                           int.Parse(mWEData.HappyoTime.Minute),
                                           0);
                while (rowTarget < cCSV.getDataMaxRow())
                {
                    timeRace = new DateTime(datetimeTarg.Year,
                                            datetimeTarg.Month,
                                            datetimeTarg.Day,
                                            int.Parse(cCSV.getData(rowTarget, 5).Substring(0, 2)),
                                            int.Parse(cCSV.getData(rowTarget, 5).Substring(3, 2)),
                                            0);
                    tmp = int.Parse(mWEData.id.Kaiji).ToString() +
                          strShortJyo +
                          int.Parse(mWEData.id.Nichiji).ToString();
                    if (cCSV.getData(rowTarget, 3) == tmp &&
                        timeHappyo < timeRace)
                    {
                        tmpTenko = cCommon.TenkoCord(mWEData.TenkoBaba.TenkoCD);
                        break;
                    }
                    rowTarget += long.Parse(cCSV.getData(rowTarget, 4)) + 3;
                }
                rowTarget = 2;
                while (rowTarget < cCSV.getDataMaxRow())
                {
                    tmp = int.Parse(mWEData.id.Kaiji).ToString() +
                          strShortJyo +
                          int.Parse(mWEData.id.Nichiji).ToString();
                    if (cCSV.getData(rowTarget, 3) == tmp &&
                        cCSV.getData(rowTarget, 14) != tmpTenko)
                    {
                        cCSV.setData(rowTarget, 14, tmpTenko);
                    }
                    rowTarget += long.Parse(cCSV.getData(rowTarget, 4)) + 3;
                }
            }
            if (int.Parse(mWEData.HenkoID) == 3)
            {
                strJyo = cCommon.JyoCord(mWEData.id.JyoCD);
                if (strJyo == "")
                {
                    return;
                }
                strShortJyo = cCommon.Jyo2ShortJyo(strJyo);
                rowTarget   = 2;
                timeHappyo  = new DateTime(datetimeTarg.Year,
                                           datetimeTarg.Month,
                                           datetimeTarg.Day,
                                           int.Parse(mWEData.HappyoTime.Hour),
                                           int.Parse(mWEData.HappyoTime.Minute),
                                           0);
                while (rowTarget < cCSV.getDataMaxRow())
                {
                    timeRace = new DateTime(datetimeTarg.Year,
                                            datetimeTarg.Month,
                                            datetimeTarg.Day,
                                            int.Parse(cCSV.getData(rowTarget, 5).Substring(0, 2)),
                                            int.Parse(cCSV.getData(rowTarget, 5).Substring(3, 2)),
                                            0);
                    tmp = int.Parse(mWEData.id.Kaiji).ToString() +
                          strShortJyo +
                          int.Parse(mWEData.id.Nichiji).ToString();
                    if (cCSV.getData(rowTarget, 3) == tmp &&
                        timeHappyo < timeRace)
                    {
                        tmpSiba = cCommon.BabaCord(mWEData.TenkoBaba.SibaBabaCD)
                                  .Substring(0, 1);
                        tmpDirt = cCommon.BabaCord(mWEData.TenkoBaba.DirtBabaCD)
                                  .Substring(0, 1);
                        break;
                    }
                    rowTarget += long.Parse(cCSV.getData(rowTarget, 4)) + 3;
                }
                rowTarget = 2;
                while (rowTarget < cCSV.getDataMaxRow())
                {
                    tmpBaba = "";
                    if (cCSV.getData(rowTarget, 9).Contains("ダート"))
                    {
                        tmpBaba = tmpDirt;
                    }
                    else
                    {
                        tmpBaba = tmpSiba;
                    }
                    tmp = int.Parse(mWEData.id.Kaiji).ToString() +
                          strShortJyo +
                          int.Parse(mWEData.id.Nichiji).ToString();
                    if (cCSV.getData(rowTarget, 3) == tmp &&
                        cCSV.getData(rowTarget, 13) != tmpBaba)
                    {
                        cCSV.setData(rowTarget, 13, tmpBaba);
                    }
                    rowTarget += long.Parse(cCSV.getData(rowTarget, 4)) + 3;
                }
            }
        }
Exemplo n.º 11
0
        bool setDataSE(ClassCSV cCSV, string retbuff, DateTime datetimeTarg, bool isFind)
        {
            DateTime dateTime;
            string   strShortJyo;
            string   strJyo;
            long     rowTarget;
            long     rowWrite;
            long     rowadj;
            int      zogensa;

            JVData_Struct.JV_SE_RACE_UMA mSeData =
                new JVData_Struct.JV_SE_RACE_UMA();
            mSeData.SetDataB(ref retbuff);
            dateTime = DateTime.Parse(
                (mSeData.id.Year +
                 mSeData.id.MonthDay).Insert(4, "/").Insert(7, "/"));
            if (isFind && dateTime > datetimeTarg)
            {
                return(true);
            }
            if (dateTime.ToShortDateString() != datetimeTarg.ToShortDateString())
            {
                return(false);
            }
            string codeName = objCodeConv.GetCodeName("2001",
                                                      mSeData.id.JyoCD, 1);

            strJyo = cCommon.JyoCord(mSeData.id.JyoCD);
            if (strJyo == "")
            {
                return(false);
            }
            strShortJyo = cCommon.Jyo2ShortJyo(strJyo);
            if (strShortJyo == "")
            {
                return(false);
            }
            rowTarget = cCSV.getDataRow(strShortJyo,
                                        int.Parse(mSeData.id.RaceNum));
            // 馬体重
            rowadj = long.Parse(mSeData.Umaban) + 1;
            cCSV.setData(rowTarget + rowadj, 29, mSeData.BaTaijyu);
            if (mSeData.ZogenSa.Contains(" "))
            {
                zogensa = 0;
            }
            else
            {
                zogensa = int.Parse(mSeData.ZogenSa);
            }
            if (zogensa == 999)
            {
                cCSV.setData(rowTarget + rowadj, 30, "0");
            }
            else if (zogensa == 0)
            {
                cCSV.setData(rowTarget + rowadj, 30, "0");
            }
            else
            {
                cCSV.setData(rowTarget + rowadj, 30,
                             mSeData.ZogenFugo + String.Format("{0, 2}", zogensa));
            }
            // 着順
            if (int.Parse(mSeData.head.DataKubun) >= 5)
            {
                rowWrite = rowTarget + 1 + long.Parse(mSeData.Umaban);
                cCSV.setData(rowWrite, 11, (int.Parse(mSeData.KakuteiJyuni)).ToString());
            }

            return(false);
        }
Exemplo n.º 12
0
        void setDataRA(ClassCSV cCSV, string retbuff, DateTime datetimeTarg)
        {
            DateTime dateTime;
            string   strShortJyo;
            string   strJyo;
            long     rowTarget;
            string   tmpBaba;
            string   tmpTenko;

            JVData_Struct.JV_RA_RACE mRaData =
                new JVData_Struct.JV_RA_RACE();
            mRaData.SetDataB(ref retbuff);
            dateTime = DateTime.Parse(
                (mRaData.id.Year +
                 mRaData.id.MonthDay).Insert(4, "/").Insert(7, "/"));
            if (dateTime.ToShortDateString() != datetimeTarg.ToShortDateString())
            {
                return;
            }
            strJyo = cCommon.JyoCord(mRaData.id.JyoCD);
            if (strJyo == "")
            {
                return;
            }
            strShortJyo = cCommon.Jyo2ShortJyo(strJyo);
            if (strShortJyo == "")
            {
                return;
            }
            rowTarget = cCSV.getDataRow(strShortJyo,
                                        int.Parse(mRaData.id.RaceNum));
            // 発走時刻
            cCSV.setData(rowTarget, 5,
                         mRaData.HassoTime.Substring(0, 2) + ":" +
                         mRaData.HassoTime.Substring(2, 2));
            // 馬場状態
            if (cCSV.getData(rowTarget, 9).Contains("ダート"))
            {
                tmpBaba = cCommon.BabaCord(mRaData.TenkoBaba.DirtBabaCD.Substring(0, 1));
            }
            else
            {
                tmpBaba = cCommon.BabaCord(mRaData.TenkoBaba.SibaBabaCD.Substring(0, 1));
            }
            if (tmpBaba != "")
            {
                tmpBaba = tmpBaba.Substring(0, 1);
            }
            if (tmpBaba != "未設定")
            {
                cCSV.setData(rowTarget, 13, tmpBaba);
            }
            // 天候
            tmpTenko = cCommon.TenkoCord(mRaData.TenkoBaba.TenkoCD);
            if (tmpTenko != "未設定")
            {
                cCSV.setData(rowTarget, 14, tmpTenko);
            }
            if (cCSV.getData(rowTarget, 13).Contains("(暫定)"))
            {
                cCSV.setData(rowTarget, 13, cCSV.getData(rowTarget, 13).Replace("(暫定)", ""));
            }
            if (cCSV.getData(rowTarget, 14).Contains("(暫定)"))
            {
                cCSV.setData(rowTarget, 14, cCSV.getData(rowTarget, 14).Replace("(暫定)", ""));
            }
        }
Exemplo n.º 13
0
        void setDataO1(ClassCSV cCSV, string retbuff, DateTime datetimeTarg)
        {
            DateTime dateTime;
            string   strShortJyo;
            string   strJyo;
            long     rowTarget;
            long     rowWrite;
            int      numUma;
            double   odds;
            double   oddslow;
            int      ninki;

            JVData_Struct.JV_O1_ODDS_TANFUKUWAKU mO1Data =
                new JVData_Struct.JV_O1_ODDS_TANFUKUWAKU();
            mO1Data.SetDataB(ref retbuff);
            dateTime = DateTime.Parse(
                (mO1Data.id.Year +
                 mO1Data.id.MonthDay).Insert(4, "/").Insert(7, "/"));
            if (dateTime.ToShortDateString() != datetimeTarg.ToShortDateString())
            {
                return;
            }
            strJyo = cCommon.JyoCord(mO1Data.id.JyoCD);
            if (strJyo == "")
            {
                return;
            }
            strShortJyo = cCommon.Jyo2ShortJyo(strJyo);
            rowTarget   = cCSV.getDataRow(strShortJyo,
                                          int.Parse(mO1Data.id.RaceNum));
            numUma = int.Parse(cCSV.getData(rowTarget, 4));
            for (int i = 0; i < numUma; i++)
            {
                rowWrite = rowTarget + 1 +
                           int.Parse(mO1Data.OddsTansyoInfo[i].Umaban);
                if (mO1Data.OddsTansyoInfo[i].Odds.Contains("*") ||
                    mO1Data.OddsTansyoInfo[i].Odds.Contains("-"))
                {
                    odds = 0;
                }
                else
                {
                    odds = double.Parse(mO1Data.OddsTansyoInfo[i].Odds) / 10;
                }
                cCSV.setData(rowWrite, 5, String.Format("{0:0.0}", odds));
                if (mO1Data.OddsFukusyoInfo[i].OddsLow.Contains("*") ||
                    mO1Data.OddsFukusyoInfo[i].OddsLow.Contains("-"))
                {
                    oddslow = 0;
                }
                else
                {
                    oddslow = double.Parse(mO1Data.OddsFukusyoInfo[i].OddsLow) / 10;
                }
                cCSV.setData(rowWrite, 6, String.Format("{0:0.0}", oddslow));
                if (mO1Data.OddsTansyoInfo[i].Ninki.Contains("*") ||
                    mO1Data.OddsTansyoInfo[i].Ninki.Contains("-"))
                {
                    ninki = 0;
                }
                else
                {
                    ninki = int.Parse(mO1Data.OddsTansyoInfo[i].Ninki);
                }
                cCSV.setData(rowWrite, 10, ninki.ToString());
            }
        }