예제 #1
0
파일: Main.cs 프로젝트: kanapero46/JvData
        private int RunJvReadMasterFunc(JVData_Struct.JV_UM_UMA UmaMaster)
        {
            JvRaceDataMasterStructures tmp = new JvRaceDataMasterStructures();

            if (tmpRaceData.id.Bamei == null || UmaMaster.head.RecordSpec == null)
            {
                return(RESULT_NG);
            }
            else if (tmpRaceData.id.Bamei.Equals(UmaMaster.Bamei))
            {
                tmpRaceData.Blood.fHorse = UmaMaster.Ketto3Info[0].Bamei;
                tmpRaceData.Blood.mHours = UmaMaster.Ketto3Info[1].Bamei;
                tmpRaceData.Blood.BMS    = UmaMaster.Ketto3Info[4].Bamei;
                tmpRaceData.Blood.BMS1   = UmaMaster.Ketto3Info[12].Bamei;
                return(RESULT_OK);
            }

            return(RESULT_NG);
        }
예제 #2
0
파일: Main.cs 프로젝트: kanapero46/JvData
        private void RunJvReadFuncToRAData(JVData_Struct.JV_RA_RACE buff, int funcNumber)
        {
            JvRaceDataMasterStructures RaceMaster = new JvRaceDataMasterStructures();

            if (funcNumber == 0)
            {
                //開催日データ・セット
                setkaisaiDate(RaceData.id.MonthDay);

                RaceNum.Add((libJvSysConv.LibJvConvCourceNum2String(RaceData.id.JyoCD) + RaceData.id.RaceNum + "R")); //場名+レース番号+R
                String Old   = Func.ChgYearOldString(RaceData.JyokenInfo.SyubetuCD, 1);                               //3歳以上
                String Joken = Func.CngRaceCla(RaceData.JyokenInfo.JyokenCD);                                         //500万下
                String TD    = Func.CngTrackCdtoString(1, RaceData.TrackCD);                                          //芝・ダート

                DefData.Date       = RaceData.id.MonthDay;
                DefData.Kai        = Int32.Parse(RaceData.id.Kaiji);
                DefData.Nichi      = Int32.Parse(RaceData.id.Nichiji);
                DefData.RaceCourse = Func.ChgJyoCDtoString(RaceData.id.JyoCD);            //場名
                DefData.RaceNumber = Int32.Parse(RaceData.id.RaceNum);                    //レース番号
                DefData.TD         = Func.CngTrackCdtoString(1, RaceData.TrackCD);        //芝・ダート
                DefData.Distance   = Int32.Parse(RaceData.Kyori);                         //距離

                //コース・距離
                Track.Add(TD);
                Distance.Add(RaceData.Kyori);


                if (RaceData.RaceInfo.Hondai.TrimEnd().Equals(""))
                {
                    //条件レース
                    DefData.RaceName = Old + Joken;
                    HName.Add(Old + Joken);
                }
                else
                {
                    String Name = RaceData.RaceInfo.Hondai.TrimEnd();
                    if (RaceData.GradeCD.Equals(" ") || RaceData.GradeCD.Equals("E"))
                    {
                        /* 重賞レース以外 → 条件入れる */
                        HName.Add(Name + "(" + Old + Joken + ")");
                        DefData.RaceName = Name;
                    }
                    else
                    {
                        //重賞レース → グレード入れる
                        HName.Add(Name + "(" + Func.ChgGradeCdToString(RaceData.GradeCD) + ")");
                        DefData.RaceName = Name + "(" + Func.ChgGradeCdToString(RaceData.GradeCD) + ")";
                    }
                }

                JyoMei = Func.ChgJyoCDtoString(RaceData.id.JyoCD);
                tmp.Add(DefData);
                KaisaiInfo.MaxRaceCounter++;    //最大レース数

                /* 開催情報 */
                FunctionKaisaiDateInfo(JyoMei);

                ArrayDefData.Add(DefData);
            }
            else if (funcNumber == 1)
            {
                /* 過去のデータ */
                return;
            }
        }
예제 #3
0
파일: Main.cs 프로젝트: kanapero46/JvData
        private int JvReadFuncToRCOVData()
        {
            String  buff       = null;
            int     buffsize   = 2000;
            String  fName      = null;
            int     skipCount  = 0;
            int     boolStatus = 0;
            Boolean eof        = false;

            do
            {
                int ret = JvMain.ReadJv(out buff, out buffsize, out fName);

                if (ret == -1)
                {
                    /* ファイルの切り替え */
                    if (eof == true)
                    {
                        break;
                    } //2日分の開催データ取得完了

                    JvMain.SkipJv();
                }
                else if (buff == null)
                {
                    break;  //エラー
                }
                else if (ret == 0)
                {
                    if (eof == true)
                    {
                        /* ファイル読み込みの終了 */
                        break;
                    }
                    else
                    {
                        skipCount++;        //3回以上スキップしたら終了する。
                        JvMain.SkipJv();
                        continue;
                    }
                }
                if (buff == null)
                {
                    JvMain.SkipJv();
                    continue;
                }

                JvRaceDataMasterStructures MasterDataSe = new JvRaceDataMasterStructures();
                switch (buff.Substring(0, 2))
                {
                case "SE":
                    /* 相手馬 */
                    JVData_Struct.JV_SE_RACE_UMA Se = new JVData_Struct.JV_SE_RACE_UMA();

                    Se.SetDataB(ref buff);
                    MasterDataSe.Common.Waku   = Int32.Parse(Se.Wakuban);
                    MasterDataSe.Common.Umaban = Int32.Parse(Se.Umaban);
                    MasterDataSe.Common.Bamei  = Se.Bamei;
                    MasterDataSe.Common.Jokkey = Se.KisyuRyakusyo;
                    MasterDataSe.Common.Omosa  = Int32.Parse(Se.Futan);
                    MasterDataSe.Rank          = Se.KakuteiJyuni;
                    if (Se.KakuteiJyuni.Equals("01"))
                    {
                        MasterDataSe.AiteUma = "(" + Se.ChakuUmaInfo[0].Bamei + ")";
                    }
                    else
                    {
                        MasterDataSe.AiteUma = Se.ChakuUmaInfo[0].Bamei;
                    }
                    MasterDataSe.Bataiju     = Se.BaTaijyu;
                    MasterDataSe.Zougen      = Se.ZogenFugo;            /* + - */
                    MasterDataSe.BataijuDiff = Se.ZogenSa;

                    MasterDataSe.final3F        = Se.HaronTimeL3;
                    MasterDataSe.DiffTime       = Se.TimeDiff;
                    MasterDataSe.Conner.conner1 = Int32.Parse(Se.Jyuni1c);
                    MasterDataSe.Conner.conner2 = Int32.Parse(Se.Jyuni2c);
                    MasterDataSe.Conner.conner3 = Int32.Parse(Se.Jyuni3c);
                    MasterDataSe.Conner.conner4 = Int32.Parse(Se.Jyuni4c);
                    MasterDataSe.Time           = Se.Time;


                    tmpFormPerfomanceSE.Add(MasterDataSe);
                    break;

                case "RA":
                    /* 頭数・馬場状態 */
                    JVData_Struct.JV_RA_RACE Race = new JVData_Struct.JV_RA_RACE();
                    Race.SetDataB(ref buff);
                    String TrackCD = Race.TenkoBaba.SibaBabaCD + Race.TenkoBaba.DirtBabaCD;
                    MasterDataSe.SyusouTosu = Int32.Parse(Race.SyussoTosu);
                    MasterDataSe.BabaJotai  = TrackCD;

                    tmpFormPerfomanceRA.Add(MasterDataSe);
                    break;

                case "UM":
                    JVData_Struct.JV_UM_UMA    Uma        = new JVData_Struct.JV_UM_UMA();
                    JvRaceDataMasterStructures MasterData = new JvRaceDataMasterStructures();
                    Uma.SetDataB(ref buff);
                    MasterDataSe.Common.Bamei = Uma.Bamei;
                    MasterDataSe.Blood.fHorse = Uma.Ketto3Info[0].Bamei;
                    MasterDataSe.Blood.mHours = Uma.Ketto3Info[1].Bamei;
                    MasterDataSe.Blood.BMS    = Uma.Ketto3Info[4].Bamei;
                    MasterDataSe.Blood.BMS1   = Uma.Ketto3Info[12].Bamei;
                    tmpFormPerfomance.Add(MasterDataSe);
                    break;
                }
            }while (boolStatus == 0 && skipCount < 10);

            /* 結合処理を加える */
            //  JointmpFormPerfomanceData();
            return(0);
        }