示例#1
0
 public bool FindScore(ScoreHistory SH) => SH.Rank.ToString() == MenuItemList[MenuSelectIndex].Name.Replace("History_", string.Empty) && SH.MyPlaneFullName == MenuItemListPlane[MenuPlaneSelectIndex].Name.Replace("History_", string.Empty);
示例#2
0
 public bool FindScore(ScoreHistory SH)
 {
     return(SH.Rank == this.Difficulty && SH.MyPlaneFullName == this.MyPlane.FullName);
 }
示例#3
0
        public MenuGroup_ScoreSaver(StageDataPackage StageData, PointF OriginalPosition)
            : base(StageData)
        {
            this.OriginalPosition = OriginalPosition;
            this.ScoreHistorys    = new List <BaseMenuItem>();
            for (int index = 0; index < 10; ++index)
            {
                this.ScoreHistorys.Add((BaseMenuItem) new DescriptionMenuItem(StageData, string.Format("{0:00}", (object)(index + 1))));
            }
            StageDataPackage stageData = StageData.GlobalData.LastState.StageData;

            for (int index1 = 0; index1 < stageData.S_History.Count; ++index1)
            {
                if (stageData.MyPlane.Score > stageData.S_History[index1].Score)
                {
                    ScoreHistory scoreHistory1 = new ScoreHistory();
                    scoreHistory1.MyPlaneFullName = stageData.MyPlane.FullName;
                    scoreHistory1.Rank            = stageData.Difficulty;
                    scoreHistory1.PlayerName      = "";
                    scoreHistory1.Score           = stageData.MyPlane.Score;
                    ScoreHistory scoreHistory2 = scoreHistory1;
                    DateTime     dateTime      = DateTime.Now;
                    dateTime = dateTime.Date;
                    string str = dateTime.ToString("yyyy'/'MM'/'dd");
                    scoreHistory2.Date     = str;
                    scoreHistory1.Time     = DateTime.Now.ToShortTimeString();
                    scoreHistory1.Stage    = stageData.CurrentStageName;
                    scoreHistory1.SlowRate = stageData.SlowRate;
                    ScoreHistory SH = scoreHistory1;
                    for (int index2 = stageData.S_History.Count - 1; index2 > index1; --index2)
                    {
                        stageData.S_History[index2].Copy(stageData.S_History[index2 - 1]);
                    }
                    stageData.S_History[index1].Copy(SH);
                    this.HistorySelectIndex = index1;
                    break;
                }
            }
            float x   = OriginalPosition.X + 12f;
            float y   = OriginalPosition.Y + 30f;
            int   num = 0;

            foreach (BaseMenuItem scoreHistory in this.ScoreHistorys)
            {
                scoreHistory.Position  = new PointF(x, (float)(this.BoundRect.Top + 40));
                scoreHistory.DestPoint = new PointF(x, y);
                y += 17f;
                if (stageData.CurrentStageName.Contains("St"))
                {
                    ((DescriptionMenuItem)scoreHistory).Description = stageData.S_History[num++].Data2DrawStringSimple();
                }
                else
                {
                    ((DescriptionMenuItem)scoreHistory).Description = stageData.S_History[num++].Data2DrawString();
                }
            }
            if (this.HistorySelectIndex >= 0)
            {
                this.ScoreHistorys[this.HistorySelectIndex].Selected = true;
            }
            string[,] strArray = new string[7, 13]
            {
                {
                    "A",
                    "B",
                    "C",
                    "D",
                    "E",
                    "F",
                    "G",
                    "H",
                    "I",
                    "J",
                    "K",
                    "L",
                    "M"
                },
                {
                    "N",
                    "O",
                    "P",
                    "Q",
                    "R",
                    "S",
                    "T",
                    "U",
                    "V",
                    "W",
                    "X",
                    "Y",
                    "Z"
                },
                {
                    "a",
                    "b",
                    "c",
                    "d",
                    "e",
                    "f",
                    "g",
                    "h",
                    "i",
                    "j",
                    "k",
                    "l",
                    "m"
                },
                {
                    "n",
                    "o",
                    "p",
                    "q",
                    "r",
                    "s",
                    "t",
                    "u",
                    "v",
                    "w",
                    "x",
                    "y",
                    "z"
                },
                {
                    "0",
                    "1",
                    "2",
                    "3",
                    "4",
                    "5",
                    "6",
                    "7",
                    "8",
                    "9",
                    "+",
                    "-",
                    "="
                },
                {
                    ".",
                    ",",
                    "!",
                    "?",
                    "@",
                    ":",
                    ";",
                    "[",
                    "]",
                    "(",
                    ")",
                    "_",
                    "/"
                },
                {
                    "{",
                    "}",
                    "|",
                    "~",
                    "^",
                    "#",
                    "$",
                    "%",
                    "&",
                    "*",
                    " ",
                    "BS",
                    "OK"
                }
            };
            this.MenuItemList = new List <BaseMenuItem>();
            for (int index1 = 0; index1 < 7; ++index1)
            {
                for (int index2 = 0; index2 < 13; ++index2)
                {
                    BaseMenuItem baseMenuItem = (BaseMenuItem) new DescriptionMenuItem(StageData, strArray[index1, index2]);
                    baseMenuItem.OriginalPosition = new PointF((float)(stageData.BoundRect.Left + stageData.BoundRect.Width / 2 - 138), 300f);
                    baseMenuItem.DestPoint        = new PointF((float)(stageData.BoundRect.Left + stageData.BoundRect.Width / 2 - 138 + index2 * 22), (float)(270 + index1 * 22));
                    this.MenuItemList.Add(baseMenuItem);
                }
            }
            this.MenuSelectIndex = this.MenuItemList.Count - 1;
            if (this.MenuSelectIndex >= 0)
            {
                this.MenuItemList[this.MenuSelectIndex].Selected = true;
            }
            for (char[] charArray = stageData.PData.PlayerName.ToCharArray(); this.NameIndex < charArray.Length; ++this.NameIndex)
            {
                this.PlayerName[this.NameIndex] = charArray[this.NameIndex].ToString();
            }
            this.ShowPlayerName();
        }
示例#4
0
 public void Copy(ScoreHistory SH)
 {
     this.String2Data(SH.Data2String().Replace("\r\n", string.Empty));
 }
示例#5
0
 public bool FindScore(ScoreHistory SH)
 {
     return(SH.Rank.ToString() == this.MenuItemList[this.MenuSelectIndex].Name.Replace("History_", string.Empty) && SH.MyPlaneFullName == this.MenuItemListPlane[this.MenuPlaneSelectIndex].Name.Replace("History_", string.Empty));
 }