当前位置: 首页>>代码示例>>C#>>正文


C# HiscoreData类代码示例

本文整理汇总了C#中HiscoreData的典型用法代码示例。如果您正苦于以下问题:C# HiscoreData类的具体用法?C# HiscoreData怎么用?C# HiscoreData使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。


HiscoreData类属于命名空间,在下文中一共展示了HiscoreData类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。

示例1: HiToString

        public override string HiToString()
        {
            string retString = m_format + Environment.NewLine;

            for (int i = 0; i < m_numEntries; i++)
            {
                HiscoreData hiscoreData = new HiscoreData();
                if (i == NumEntries - 1)
                {
                    HiscoreDataLast hsdl = new HiscoreDataLast();
                    hsdl = (HiscoreDataLast)HiConvert.RawDeserialize(m_data, i * Marshal.SizeOf(typeof(HiscoreData)), typeof(HiscoreDataLast));

                    retString += String.Format("{0}|{1}|{2}|{3}",
                        i + 1,
                        HiConvert.ByteArrayHexToInt(hsdl.Score).ToString().PadLeft(8, '0'),
                        ByteArrayToString(hsdl.Name),
                        GetRound((int)hsdl.Round)) + Environment.NewLine;
                }
                else
                {
                    hiscoreData = (HiscoreData)HiConvert.RawDeserialize(m_data, i * Marshal.SizeOf(typeof(HiscoreData)), typeof(HiscoreData));

                    retString += String.Format("{0}|{1}|{2}|{3}",
                        i + 1,
                        HiConvert.ByteArrayHexToInt(hiscoreData.Score).ToString().PadLeft(8, '0'),
                        ByteArrayToString(hiscoreData.Name),
                        GetRound((int)hiscoreData.Round)) + Environment.NewLine;
                }
            }

            return retString;
        }
开发者ID:skeezix,项目名称:compo4all,代码行数:32,代码来源:cabal.cs

示例2: HiToString

        public override string HiToString()
        {
            string retString = m_format + Environment.NewLine;

            HiscoreData hiscoreData = new HiscoreData();
            hiscoreData = (HiscoreData)HiConvert.RawDeserialize(m_data, 0, typeof(HiscoreData));

            retString += String.Format("{0}|{1}|{2}|{3}", 1, HiConvert.ByteArrayHexToInt(hiscoreData.Score1), ByteArrayToString(hiscoreData.Name1), hiscoreData.Level1) + Environment.NewLine;
            retString += String.Format("{0}|{1}|{2}|{3}", 2, HiConvert.ByteArrayHexToInt(hiscoreData.Score2), ByteArrayToString(hiscoreData.Name2), hiscoreData.Level2) + Environment.NewLine;
            retString += String.Format("{0}|{1}|{2}|{3}", 3, HiConvert.ByteArrayHexToInt(hiscoreData.Score3), ByteArrayToString(hiscoreData.Name3), hiscoreData.Level3) + Environment.NewLine;
            retString += String.Format("{0}|{1}|{2}|{3}", 4, HiConvert.ByteArrayHexToInt(hiscoreData.Score4), ByteArrayToString(hiscoreData.Name4), hiscoreData.Level4) + Environment.NewLine;
            retString += String.Format("{0}|{1}|{2}|{3}", 5, HiConvert.ByteArrayHexToInt(hiscoreData.Score5), ByteArrayToString(hiscoreData.Name5), hiscoreData.Level5) + Environment.NewLine;
            retString += String.Format("{0}|{1}|{2}|{3}", 6, HiConvert.ByteArrayHexToInt(hiscoreData.Score6), ByteArrayToString(hiscoreData.Name6), hiscoreData.Level6) + Environment.NewLine;
            retString += String.Format("{0}|{1}|{2}|{3}", 7, HiConvert.ByteArrayHexToInt(hiscoreData.Score7), ByteArrayToString(hiscoreData.Name7), hiscoreData.Level7) + Environment.NewLine;
            retString += String.Format("{0}|{1}|{2}|{3}", 8, HiConvert.ByteArrayHexToInt(hiscoreData.Score8), ByteArrayToString(hiscoreData.Name8), hiscoreData.Level8) + Environment.NewLine;
            retString += String.Format("{0}|{1}|{2}|{3}", 9, HiConvert.ByteArrayHexToInt(hiscoreData.Score9), ByteArrayToString(hiscoreData.Name9), hiscoreData.Level9) + Environment.NewLine;
            retString += String.Format("{0}|{1}|{2}|{3}", 10, HiConvert.ByteArrayHexToInt(hiscoreData.Score10), ByteArrayToString(hiscoreData.Name10), hiscoreData.Level10) + Environment.NewLine;
            retString += String.Format("{0}|{1}|{2}|{3}", 11, HiConvert.ByteArrayHexToInt(hiscoreData.Score11), ByteArrayToString(hiscoreData.Name11), hiscoreData.Level11) + Environment.NewLine;
            retString += String.Format("{0}|{1}|{2}|{3}", 12, HiConvert.ByteArrayHexToInt(hiscoreData.Score12), ByteArrayToString(hiscoreData.Name12), hiscoreData.Level12) + Environment.NewLine;
            retString += String.Format("{0}|{1}|{2}|{3}", 13, HiConvert.ByteArrayHexToInt(hiscoreData.Score13), ByteArrayToString(hiscoreData.Name13), hiscoreData.Level13) + Environment.NewLine;
            retString += String.Format("{0}|{1}|{2}|{3}", 14, HiConvert.ByteArrayHexToInt(hiscoreData.Score14), ByteArrayToString(hiscoreData.Name14), hiscoreData.Level14) + Environment.NewLine;
            retString += String.Format("{0}|{1}|{2}|{3}", 15, HiConvert.ByteArrayHexToInt(hiscoreData.Score15), ByteArrayToString(hiscoreData.Name15), hiscoreData.Level15) + Environment.NewLine;
            retString += String.Format("{0}|{1}|{2}|{3}", 16, HiConvert.ByteArrayHexToInt(hiscoreData.Score16), ByteArrayToString(hiscoreData.Name16), hiscoreData.Level16) + Environment.NewLine;
            retString += String.Format("{0}|{1}|{2}|{3}", 17, HiConvert.ByteArrayHexToInt(hiscoreData.Score17), ByteArrayToString(hiscoreData.Name17), hiscoreData.Level17) + Environment.NewLine;
            retString += String.Format("{0}|{1}|{2}|{3}", 18, HiConvert.ByteArrayHexToInt(hiscoreData.Score18), ByteArrayToString(hiscoreData.Name18), hiscoreData.Level18) + Environment.NewLine;
            retString += String.Format("{0}|{1}|{2}|{3}", 19, HiConvert.ByteArrayHexToInt(hiscoreData.Score19), ByteArrayToString(hiscoreData.Name19), hiscoreData.Level19) + Environment.NewLine;
            retString += String.Format("{0}|{1}|{2}|{3}", 20, HiConvert.ByteArrayHexToInt(hiscoreData.Score20), ByteArrayToString(hiscoreData.Name20), hiscoreData.Level20) + Environment.NewLine;

            return retString;
        }
开发者ID:Fyrecrypts,项目名称:HiToText,代码行数:30,代码来源:junofrst.cs

示例3: SetHiScore

        public override void SetHiScore(string[] args)
        {
            int rankGiven = Convert.ToInt32(args[0]);
            int score = System.Convert.ToInt32(args[1]);
            string name = args[2];
            int round = System.Convert.ToInt32(args[3]);

            int rank = NumEntries;
            int offset;

            HiscoreData hiscoreData = new HiscoreData();
            //Do not change the below.
            hiscoreData.Score = HiConvert.IntToByteArrayHex(score, 4);
            hiscoreData.Name = new byte[6];
            hiscoreData.Round = (byte)round;
            HiConvert.ByteArrayCopy(hiscoreData.Name, StringToByteArray(name));
            byte[] byteArray = HiConvert.RawSerialize(hiscoreData);

            #region DETERMINE RANK
            for (int i = 0; i < NumEntries; i++)
            {
                offset = i * Marshal.SizeOf(typeof(HiscoreData));
                byte[] tmp = { m_data[offset], m_data[offset + 1], m_data[offset + 2], m_data[offset + 3] };

                int scoreToCompare = HiConvert.ByteArrayHexToInt(tmp);
                if (score > scoreToCompare)
                {
                    rank = i;
                    break;
                }
            }
            #endregion

            #region ADJUST
            int adjust = -1;
            if (rank < NumEntries - 1)
                adjust = NumEntries - 2;
            for (int i = adjust; i >= 0; i--)
            {
                if (rank > i)
                    break;

                int offsetOldLoc = i * Marshal.SizeOf(typeof(HiscoreData));
                int offsetNewLoc = (i + 1) * Marshal.SizeOf(typeof(HiscoreData));

                for (int j = 0; j < byteArray.Length; j++)
                    m_data[offsetNewLoc + j] = m_data[offsetOldLoc + j];
            }
            #endregion

            #region REPLACE NEW
            if (rank < NumEntries)
            {
                offset = rank * Marshal.SizeOf(typeof(HiscoreData));

                for (int i = 0; i < byteArray.Length; i++)
                    m_data[offset + i] = byteArray[i];
            }
            #endregion
        }
开发者ID:skeezix,项目名称:compo4all,代码行数:60,代码来源:bjtwin.cs

示例4: HiToString

        public override string HiToString()
        {
            string retString = m_format + Environment.NewLine;

            HiscoreData hiscoreData = new HiscoreData();
            hiscoreData = (HiscoreData)HiConvert.RawDeserialize(m_data, 0, typeof(HiscoreData));
            int offset;

            for (int i = 0; i < m_numEntries; i++)
            {
                offset = i * 8; //The size of each score, and name.
                byte[] score = {
                    hiscoreData.EntryArray[offset],
                    hiscoreData.EntryArray[offset + 1],
                    hiscoreData.EntryArray[offset + 2],
                    hiscoreData.EntryArray[offset + 3]};
                byte[] name = {
                    hiscoreData.EntryArray[offset + 4],
                    hiscoreData.EntryArray[offset + 5],
                    hiscoreData.EntryArray[offset + 6] };

                retString += String.Format("{0}|{1}|{2}|{3}",
                    i + 1,
                    HiConvert.ByteArrayHexToInt(score),
                    ByteArrayToString(name),
                    GetArea(Int32.Parse(hiscoreData.EntryArray[offset + 7].ToString("X2")))) + Environment.NewLine;
            }

            return retString;
        }
开发者ID:Fyrecrypts,项目名称:HiToText,代码行数:30,代码来源:bloodbro.cs

示例5: HiToString

        public override string HiToString()
        {
            string retString = m_format + Environment.NewLine;

            HiscoreData hiscoreData = new HiscoreData();
            hiscoreData = (HiscoreData)HiConvert.RawDeserialize(m_data, 0, typeof(HiscoreData));

            retString += String.Format(
                         "{0}|{1}|{2}|{3}|{4}|{5}|{6}",
                         1,
                         HiConvert.ByteArrayHexToInt(hiscoreData.Score1) * 10 + HiConvert.ByteArrayHexToInt(hiscoreData.LastScore1),
                         ByteArrayToString(hiscoreData.Name1),
                         AreaToString(HiConvert.ByteArrayHexToInt(hiscoreData.AreaPartA1), HiConvert.ByteArrayHexToInt(hiscoreData.AreaPartB1)),
                         hiscoreData.Character1,
                         hiscoreData.Powerup1,
                         HiConvert.ByteArrayHexToInt(hiscoreData.MaxHit1))
                            + Environment.NewLine;
            retString += String.Format(
                         "{0}|{1}|{2}|{3}|{4}|{5}|{6}",
                         2,
                         HiConvert.ByteArrayHexToInt(hiscoreData.Score2) * 10 + HiConvert.ByteArrayHexToInt(hiscoreData.LastScore2),
                         ByteArrayToString(hiscoreData.Name2),
                         AreaToString(HiConvert.ByteArrayHexToInt(hiscoreData.AreaPartA2), HiConvert.ByteArrayHexToInt(hiscoreData.AreaPartB2)),
                         hiscoreData.Character2,
                         hiscoreData.Powerup2,
                         HiConvert.ByteArrayHexToInt(hiscoreData.MaxHit2))
                            + Environment.NewLine;
            retString += String.Format(
                         "{0}|{1}|{2}|{3}|{4}|{5}|{6}",
                         3,
                         HiConvert.ByteArrayHexToInt(hiscoreData.Score3) * 10 + HiConvert.ByteArrayHexToInt(hiscoreData.LastScore3),
                         ByteArrayToString(hiscoreData.Name3),
                         AreaToString(HiConvert.ByteArrayHexToInt(hiscoreData.AreaPartA3), HiConvert.ByteArrayHexToInt(hiscoreData.AreaPartB3)),
                         hiscoreData.Character3,
                         hiscoreData.Powerup3,
                         HiConvert.ByteArrayHexToInt(hiscoreData.MaxHit3))
                            + Environment.NewLine;
            retString += String.Format(
                         "{0}|{1}|{2}|{3}|{4}|{5}|{6}",
                         4,
                         HiConvert.ByteArrayHexToInt(hiscoreData.Score4) * 10 + HiConvert.ByteArrayHexToInt(hiscoreData.LastScore4),
                         ByteArrayToString(hiscoreData.Name4),
                         AreaToString(HiConvert.ByteArrayHexToInt(hiscoreData.AreaPartA4), HiConvert.ByteArrayHexToInt(hiscoreData.AreaPartB4)),
                         hiscoreData.Character4,
                         hiscoreData.Powerup4,
                         HiConvert.ByteArrayHexToInt(hiscoreData.MaxHit4))
                            + Environment.NewLine;
            retString += String.Format(
                         "{0}|{1}|{2}|{3}|{4}|{5}|{6}",
                         5,
                         HiConvert.ByteArrayHexToInt(hiscoreData.Score5) * 10 + HiConvert.ByteArrayHexToInt(hiscoreData.LastScore5),
                         ByteArrayToString(hiscoreData.Name5),
                         AreaToString(HiConvert.ByteArrayHexToInt(hiscoreData.AreaPartA5), HiConvert.ByteArrayHexToInt(hiscoreData.AreaPartB5)),
                         hiscoreData.Character5,
                         hiscoreData.Powerup5,
                         HiConvert.ByteArrayHexToInt(hiscoreData.MaxHit5))
                            + Environment.NewLine;

            return retString;
        }
开发者ID:skeezix,项目名称:compo4all,代码行数:60,代码来源:ddonpach.cs

示例6: HiToString

        public override string HiToString()
        {
            string retString = m_format + Environment.NewLine;

            HiscoreData hiscoreData = new HiscoreData();
            hiscoreData = (HiscoreData)HiConvert.RawDeserialize(m_data, 0, typeof(HiscoreData));

            retString += String.Format("{0}|{1}", HiConvert.ByteArrayHexAsHexToInt(hiscoreData.ScorePart1) * 1000 + HiConvert.ByteArrayHexAsHexToInt(hiscoreData.ScorePart2), ByteArrayToString(hiscoreData.Name)) + Environment.NewLine;

            return retString;
        }
开发者ID:Fyrecrypts,项目名称:HiToText,代码行数:11,代码来源:barrier.cs

示例7: HiToString

        public override string HiToString()
        {
            string retString = m_format + Environment.NewLine;

            HiscoreData hiscoreData = new HiscoreData();
            hiscoreData = (HiscoreData)HiConvert.RawDeserialize(m_data, 0, typeof(HiscoreData));

            retString += String.Format("{0}", ConvertScore(hiscoreData.HiScore)) + Environment.NewLine;

            return retString;
        }
开发者ID:Fyrecrypts,项目名称:HiToText,代码行数:11,代码来源:sprint1.cs

示例8: HiToString

        public override string HiToString()
        {
            string retString = m_format + Environment.NewLine;

            HiscoreData hiscoreData = new HiscoreData();
            hiscoreData = (HiscoreData)HiConvert.RawDeserialize(m_data, 0, typeof(HiscoreData));

            for (int i = 0; i < NumEntries; i++)
            {
                int rankPointer = Convert.ToInt32(hiscoreData.Ranks[i]);
                switch (rankPointer)
                {
                    case 0x23:
                        retString += String.Format(
                            "{0}|{1}|{2}",
                            i + 1,
                            HiConvert.ByteArrayHexToInt(HiConvert.ReverseByteArray(hiscoreData.ScoreE)),
                            ByteArrayToString(hiscoreData.NameE)) + Environment.NewLine;
                        break;
                    case 0x1d:
                        retString += String.Format(
                            "{0}|{1}|{2}",
                            i + 1,
                            HiConvert.ByteArrayHexToInt(HiConvert.ReverseByteArray(hiscoreData.ScoreD)),
                            ByteArrayToString(hiscoreData.NameD)) + Environment.NewLine;
                        break;
                    case 0x17:
                        retString += String.Format(
                            "{0}|{1}|{2}",
                            i + 1,
                            HiConvert.ByteArrayHexToInt(HiConvert.ReverseByteArray(hiscoreData.ScoreC)),
                            ByteArrayToString(hiscoreData.NameC)) + Environment.NewLine;
                        break;
                    case 0x11:
                        retString += String.Format(
                            "{0}|{1}|{2}",
                            i + 1,
                            HiConvert.ByteArrayHexToInt(HiConvert.ReverseByteArray(hiscoreData.ScoreB)),
                            ByteArrayToString(hiscoreData.NameB)) + Environment.NewLine;
                        break;
                    case 0x0b:
                        retString += String.Format(
                            "{0}|{1}|{2}",
                            i + 1,
                            HiConvert.ByteArrayHexToInt(HiConvert.ReverseByteArray(hiscoreData.ScoreA)),
                            ByteArrayToString(hiscoreData.NameA)) + Environment.NewLine;
                        break;
                    default:
                        break;
                }
            }

            return retString;
        }
开发者ID:Fyrecrypts,项目名称:HiToText,代码行数:54,代码来源:popeye.cs

示例9: HiToString

        public override string HiToString()
        {
            string retString = m_format + Environment.NewLine;

            HiscoreData hiscoreData = new HiscoreData();
            hiscoreData = (HiscoreData)HiConvert.RawDeserialize(m_data, 0, typeof(HiscoreData));

            retString += String.Format("{0}", HiConvert.ByteArrayHexToInt(HiConvert.ReverseByteArray(hiscoreData.HiScore)) * 100) + Environment.NewLine;

            return retString;
        }
开发者ID:Fyrecrypts,项目名称:HiToText,代码行数:11,代码来源:seawolf2.cs

示例10: GetLargestScore

        private int GetLargestScore(HiscoreData hiscoreData)
        {
            int p1 = HiConvert.ByteArrayHexToInt(HiConvert.ReverseByteArray(hiscoreData.ScoreP1));
            int p2 = HiConvert.ByteArrayHexToInt(HiConvert.ReverseByteArray(hiscoreData.ScoreP2));
            int hi = HiConvert.ByteArrayHexToInt(HiConvert.ReverseByteArray(hiscoreData.HiScore));

            if (p1 >= p2 && p1 >= hi)
                return p1;
            else if (p2 >= p1 && p2 >= hi)
                return p2;
            else
                return hi;
        }
开发者ID:Fyrecrypts,项目名称:HiToText,代码行数:13,代码来源:steelwkr.cs

示例11: HiToString

        public override string HiToString()
        {
            HiscoreData hiscoreData = new HiscoreData();
            hiscoreData = (HiscoreData)HiConvert.RawDeserialize(m_data, 0, typeof(HiscoreData));

            string retString = AltFormat[0] + Environment.NewLine;
            retString += String.Format("{0}", HiConvert.ByteArrayHexAsHexToInt(hiscoreData.SoloScorePart1) * 10000 + HiConvert.ByteArrayHexAsHexToInt(hiscoreData.SoloScorePart2) * 10) + Environment.NewLine;

            retString += Environment.NewLine + AltFormat[1] + Environment.NewLine;
            retString += String.Format("{0}", HiConvert.ByteArrayHexAsHexToInt(hiscoreData.TeamScorePart1) * 10000 + HiConvert.ByteArrayHexAsHexToInt(hiscoreData.TeamScorePart2) * 10) + Environment.NewLine;

            return retString;
        }
开发者ID:skeezix,项目名称:compo4all,代码行数:13,代码来源:ripoff.cs

示例12: HiToString

        public override string HiToString()
        {
            string retString = m_format + Environment.NewLine;

            HiscoreData hiscoreData = new HiscoreData();
            hiscoreData = (HiscoreData)HiConvert.RawDeserialize(m_data, 0, typeof(HiscoreData));

            retString += String.Format("{0}|{1}", 1, ByteArrayToString(hiscoreData.Score1)) + Environment.NewLine;
            retString += String.Format("{0}|{1}", 2, ByteArrayToString(hiscoreData.Score2)) + Environment.NewLine;
            retString += String.Format("{0}|{1}", 3, ByteArrayToString(hiscoreData.Score3)) + Environment.NewLine;

            return retString;
        }
开发者ID:skeezix,项目名称:compo4all,代码行数:13,代码来源:headon2.cs

示例13: HiToString

        public override string HiToString()
        {
            string retString = m_format + Environment.NewLine;

            HiscoreData hiscoreData = new HiscoreData();
            hiscoreData = (HiscoreData)HiConvert.RawDeserialize(m_data, 0, typeof(HiscoreData));

            List<DisplayData> formatting = new List<DisplayData>();
            formatting.Add(new DisplayData(null, DisplayData.CannedDisplay.AscendingFrom1));
            formatting.Add(new DisplayData(new Regex("^Score.*$"), ConvertScore));
            retString += HTTF.HiToString(hiscoreData, formatting);

            return retString;
        }
开发者ID:skeezix,项目名称:compo4all,代码行数:14,代码来源:005.cs

示例14: HiToString

        public override string HiToString()
        {
            string retString = m_format + Environment.NewLine;
            int TempScore;
            HiscoreData hiscoreData = new HiscoreData();
            hiscoreData = (HiscoreData)HiConvert.RawDeserialize(m_data, 0, typeof(HiscoreData));

            TempScore = HiConvert.ByteArrayHexToInt(hiscoreData.Score1);
            if (TempScore > 0)
                retString += String.Format("{0}|{1}|{2}", 1, TempScore, ByteArrayToString(hiscoreData.Name1)) + Environment.NewLine;

            TempScore = HiConvert.ByteArrayHexToInt(hiscoreData.Score2);
            if (TempScore > 0)
                retString += String.Format("{0}|{1}|{2}", 2, TempScore, ByteArrayToString(hiscoreData.Name2)) + Environment.NewLine;

            TempScore = HiConvert.ByteArrayHexToInt(hiscoreData.Score3);
            if (TempScore > 0)
                retString += String.Format("{0}|{1}|{2}", 3, TempScore, ByteArrayToString(hiscoreData.Name3)) + Environment.NewLine;

            TempScore = HiConvert.ByteArrayHexToInt(hiscoreData.Score4);
            if (TempScore > 0)
                retString += String.Format("{0}|{1}|{2}", 4, TempScore, ByteArrayToString(hiscoreData.Name4)) + Environment.NewLine;

            TempScore = HiConvert.ByteArrayHexToInt(hiscoreData.Score5);
            if (TempScore > 0)
                retString += String.Format("{0}|{1}|{2}", 5, TempScore, ByteArrayToString(hiscoreData.Name5)) + Environment.NewLine;

            TempScore = HiConvert.ByteArrayHexToInt(hiscoreData.Score6);
            if (TempScore > 0)
                retString += String.Format("{0}|{1}|{2}", 6, TempScore, ByteArrayToString(hiscoreData.Name6)) + Environment.NewLine;

            TempScore = HiConvert.ByteArrayHexToInt(hiscoreData.Score7);
            if (TempScore > 0)
                retString += String.Format("{0}|{1}|{2}", 7, TempScore, ByteArrayToString(hiscoreData.Name7)) + Environment.NewLine;

            TempScore = HiConvert.ByteArrayHexToInt(hiscoreData.Score8);
            if (TempScore > 0)
                retString += String.Format("{0}|{1}|{2}", 8, TempScore, ByteArrayToString(hiscoreData.Name8)) + Environment.NewLine;

            TempScore = HiConvert.ByteArrayHexToInt(hiscoreData.Score9);
            if (TempScore > 0)
                retString += String.Format("{0}|{1}|{2}", 9, TempScore, ByteArrayToString(hiscoreData.Name9)) + Environment.NewLine;

            TempScore = HiConvert.ByteArrayHexToInt(hiscoreData.Score10);
            if (TempScore > 0)
                retString += String.Format("{0}|{1}|{2}", 10, TempScore, ByteArrayToString(hiscoreData.Name10)) + Environment.NewLine;

            return retString;
        }
开发者ID:Fyrecrypts,项目名称:HiToText,代码行数:49,代码来源:journey.cs

示例15: HiToString

        public override string HiToString()
        {
            string retString = m_format + Environment.NewLine;

            HiscoreData hiscoreData = new HiscoreData();
            hiscoreData = (HiscoreData)HiConvert.RawDeserialize(m_data, 0, typeof(HiscoreData));

            retString += String.Format("{0}|{1}|{2}|{3}", 1, HiConvert.ByteArrayHexToInt(hiscoreData.Score1) * 10, ByteArrayToString(hiscoreData.Name1), System.Convert.ToInt32(hiscoreData.Round1.ToString("X2"))) + Environment.NewLine;
            retString += String.Format("{0}|{1}|{2}|{3}", 2, HiConvert.ByteArrayHexToInt(hiscoreData.Score2) * 10, ByteArrayToString(hiscoreData.Name2), System.Convert.ToInt32(hiscoreData.Round2.ToString("X2"))) + Environment.NewLine;
            retString += String.Format("{0}|{1}|{2}|{3}", 3, HiConvert.ByteArrayHexToInt(hiscoreData.Score3) * 10, ByteArrayToString(hiscoreData.Name3), System.Convert.ToInt32(hiscoreData.Round3.ToString("X2"))) + Environment.NewLine;
            retString += String.Format("{0}|{1}|{2}|{3}", 4, HiConvert.ByteArrayHexToInt(hiscoreData.Score4) * 10, ByteArrayToString(hiscoreData.Name4), System.Convert.ToInt32(hiscoreData.Round4.ToString("X2"))) + Environment.NewLine;
            retString += String.Format("{0}|{1}|{2}|{3}", 5, HiConvert.ByteArrayHexToInt(hiscoreData.Score5) * 10, ByteArrayToString(hiscoreData.Name5), System.Convert.ToInt32(hiscoreData.Round5.ToString("X2"))) + Environment.NewLine;

            return retString;
        }
开发者ID:Fyrecrypts,项目名称:HiToText,代码行数:15,代码来源:wb3.cs


注:本文中的HiscoreData类示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。