예제 #1
0
        private void LoadInfoItems()
        {
            foreach (string str in Visibility.Keys)
            {
                string result = GetInfoItem(str);
                switch (str)
                {
                case "Genre":
                    Genre = result;
                    break;

                case "Discs":
                    if (string.IsNullOrEmpty(result))
                    {
                        result = GetInfoItem("Disc");
                    }
                    SplitDiscs(result);
                    break;

                case "Publisher":
                    Publisher = result;
                    break;

                case "Developer":
                    Developer = result;
                    break;

                case "Trailer":
                    Trailer = result;
                    break;

                //case "Game Date":
                //  Date = Convert.ToDateTime(result);
                //case "Game Type":
                //    Type = result;
                case "Abgx Info":
                    if (result != string.Empty)
                    {
                        Abgx = AbgStatus.Deserialize(result);
                        if (Abgx != null)
                        {
                            if ((Abgx.RegionCode != 0))
                            {
                                RegionCode = Abgx.RegionCode.ToString("X8");
                            }
                        }
                    }
                    break;

                case "RegionCode":
                    if (!string.IsNullOrEmpty(result.Trim()))
                    {
                        RegionCode = result;
                    }
                    break;
                }
            }
        }
예제 #2
0
        public static AbgStatus Deserialize(string sta)
        {
            AbgStatus abgx = new AbgStatus();

            abgx.SSCRC           = new AbgStatus.CRCInfo();
            abgx.SSCRC.Status    = AbgStatus.CRCStatus.Bad;
            abgx.DMICRC          = new AbgStatus.CRCInfo();
            abgx.DMICRC.Status   = AbgStatus.CRCStatus.Bad;
            abgx.PFICRC          = new AbgStatus.CRCInfo();
            abgx.PFICRC.Status   = AbgStatus.CRCStatus.Bad;
            abgx.XEXCRC          = new AbgStatus.CRCInfo();
            abgx.XEXCRC.Status   = AbgStatus.CRCStatus.Bad;
            abgx.VideoCRC        = new AbgStatus.CRCInfo();
            abgx.VideoCRC.Status = AbgStatus.CRCStatus.Bad;
            abgx.V0CRC           = new AbgStatus.CRCInfo();
            abgx.V0CRC.Status    = AbgStatus.CRCStatus.Bad;
            abgx.V1CRC           = new AbgStatus.CRCInfo();
            abgx.V1CRC.Status    = AbgStatus.CRCStatus.Bad;
            abgx.GameCRC         = new AbgStatus.CRCInfo();
            abgx.GameCRC.Status  = AbgStatus.CRCStatus.Unverified;
            string[] strings = sta.Split(';');
            foreach (string s in strings)
            {
                string[] st = s.Split('=');
                st[0] = st[0].Trim();
                switch (st[0])
                {
                case "Error":
                    abgx.Error = Convert.ToBoolean(st[1]);
                    break;

                case "ErrorString":
                    abgx.ErrorString = st[1].Replace("~", ";").Replace("|", "=");
                    break;

                case "LTouchVersion":
                    abgx.LTouchVersion = (LTVersion)int.Parse(st[1]);
                    break;

                case "XEXCRC":
                    string[] k1 = st[1].Split('|');
                    abgx.XEXCRC.Status = (CRCStatus)int.Parse(k1[0]);
                    abgx.XEXCRC.Crc    = Convert.ToUInt32(k1[1], 16);
                    break;

                case "VideoCRC":
                    string[] k2 = st[1].Split('|');
                    abgx.VideoCRC.Status = (CRCStatus)int.Parse(k2[0]);
                    abgx.VideoCRC.Crc    = Convert.ToUInt32(k2[1], 16);
                    break;

                case "V0CRC":
                    string[] k3 = st[1].Split('|');
                    abgx.V0CRC.Status = (CRCStatus)int.Parse(k3[0]);
                    abgx.V0CRC.Crc    = Convert.ToUInt32(k3[1], 16);
                    break;

                case "V1CRC":
                    string[] k4 = st[1].Split('|');
                    abgx.V1CRC.Status = (CRCStatus)int.Parse(k4[0]);
                    abgx.V1CRC.Crc    = Convert.ToUInt32(k4[1], 16);
                    break;

                case "PFICRC":
                    string[] k5 = st[1].Split('|');
                    abgx.PFICRC.Status = (CRCStatus)int.Parse(k5[0]);
                    abgx.PFICRC.Crc    = Convert.ToUInt32(k5[1], 16);
                    break;

                case "DMICRC":
                    string[] k6 = st[1].Split('|');
                    abgx.DMICRC.Status = (CRCStatus)int.Parse(k6[0]);
                    abgx.DMICRC.Crc    = Convert.ToUInt32(k6[1], 16);
                    break;

                case "SSCRC":
                    string[] k7 = st[1].Split('|');
                    abgx.SSCRC.Status = (CRCStatus)int.Parse(k7[0]);
                    abgx.SSCRC.Crc    = Convert.ToUInt32(k7[1], 16);
                    break;

                case "GameCRC":
                    string[] k8 = st[1].Split('|');
                    abgx.GameCRC.Status = (CRCStatus)int.Parse(k8[0]);
                    abgx.GameCRC.Crc    = Convert.ToUInt32(k8[1], 16);
                    break;

                case "Size":
                    abgx.Size = Convert.ToUInt64(st[1]);
                    break;

                case "RAWSS":
                    abgx.RAWSS = Convert.ToUInt32(st[1], 16);
                    break;

                case "RegionCode":
                    abgx.RegionCode = Convert.ToUInt32(st[1], 16);
                    break;

                case "MediaId":
                    abgx.MediaId = st[1];
                    break;

                case "AnyDVDCorruption":
                    abgx.AnyDVDCorruption = Convert.ToBoolean(st[1]);
                    break;

                case "MinKernel":
                    abgx.MinKernel = st[1];
                    break;

                case "DiskVersion":
                    abgx.DiskVersion = (XGDVersion)int.Parse(st[1]);
                    break;

                case "LastCheck":
                    abgx.LastCheck = Convert.ToDateTime(st[1]);
                    break;

                case "Wave":
                    abgx.Wave = st[1];
                    break;
                }
            }
            return(abgx);
        }