コード例 #1
0
        private void GetCatchSkinImage()
        {
            #region CatchFruitImage

            var lst = SkinTools.GetMultipleFileSkinObject(_files, "fruit-apple");
            if (lst.Count > 0)
            {
                SkinObjects.CatchSkinImages.Fruit.Apple = new CatchSkinImage(Path.GetFileName(lst[0]), lst[0]);
            }

            lst = SkinTools.GetMultipleFileSkinObject(_files, "fruit-grapes");
            if (lst.Count > 0)
            {
                SkinObjects.CatchSkinImages.Fruit.Grapes = new CatchSkinImage(Path.GetFileName(lst[0]), lst[0]);
            }

            lst = SkinTools.GetMultipleFileSkinObject(_files, "fruit-orange");
            if (lst.Count > 0)
            {
                SkinObjects.CatchSkinImages.Fruit.Orange = new CatchSkinImage(Path.GetFileName(lst[0]), lst[0]);
            }

            lst = SkinTools.GetMultipleFileSkinObject(_files, "fruit-pear");
            if (lst.Count > 0)
            {
                SkinObjects.CatchSkinImages.Fruit.Pear = new CatchSkinImage(Path.GetFileName(lst[0]), lst[0]);
            }

            lst = SkinTools.GetMultipleFileSkinObject(_files, "fruit-bananas");
            if (lst.Count > 0)
            {
                SkinObjects.CatchSkinImages.Fruit.Bananas = new CatchSkinImage(Path.GetFileName(lst[0]), lst[0]);
            }

            lst = SkinTools.GetMultipleFileSkinObject(_files, "fruit-drop");
            if (lst.Count > 0)
            {
                SkinObjects.CatchSkinImages.Fruit.Drop = new CatchSkinImage(Path.GetFileName(lst[0]), lst[0]);
            }

            #endregion

            #region FruitCatcherImage

            lst = SkinTools.GetMultipleFileSkinObject(_files, "fruit-catcher-idle");
            if (lst.Count > 0)
            {
                foreach (var file in lst)
                {
                    SkinObjects.CatchSkinImages.FruitCatcher.Idle.Add(new CatchSkinImage(Path.GetFileName(file), file));
                }
            }

            lst = SkinTools.GetMultipleFileSkinObject(_files, "fruit-catcher-fail");
            if (lst.Count > 0)
            {
                foreach (var file in lst)
                {
                    SkinObjects.CatchSkinImages.FruitCatcher.Fail.Add(new CatchSkinImage(Path.GetFileName(file), file));
                }
            }

            lst = SkinTools.GetMultipleFileSkinObject(_files, "fruit-catcher-kiai");
            if (lst.Count > 0)
            {
                foreach (var file in lst)
                {
                    SkinObjects.CatchSkinImages.FruitCatcher.Kiai.Add(new CatchSkinImage(Path.GetFileName(file), file));
                }
            }

            #endregion

            #region CatchFruitOverlay

            lst = SkinTools.GetMultipleFileSkinObject(_files, "fruit-apple-overlay");
            if (lst.Count > 0)
            {
                SkinObjects.CatchSkinImages.Fruit.AppleOverlay = new CatchSkinImage(Path.GetFileName(lst[0]), lst[0]);
            }

            lst = SkinTools.GetMultipleFileSkinObject(_files, "fruit-pear-overlay");
            if (lst.Count > 0)
            {
                SkinObjects.CatchSkinImages.Fruit.PearOverlay = new CatchSkinImage(Path.GetFileName(lst[0]), lst[0]);
            }

            lst = SkinTools.GetMultipleFileSkinObject(_files, "fruit-grapes-overlay");
            if (lst.Count > 0)
            {
                SkinObjects.CatchSkinImages.Fruit.GrapesOverlay = new CatchSkinImage(Path.GetFileName(lst[0]), lst[0]);
            }

            lst = SkinTools.GetMultipleFileSkinObject(_files, "fruit-orange-overlay");
            if (lst.Count > 0)
            {
                SkinObjects.CatchSkinImages.Fruit.OrangeOverlay = new CatchSkinImage(Path.GetFileName(lst[0]), lst[0]);
            }

            lst = SkinTools.GetMultipleFileSkinObject(_files, "fruit-bananas-overlay");
            if (lst.Count > 0)
            {
                SkinObjects.CatchSkinImages.Fruit.BananasOverlay = new CatchSkinImage(Path.GetFileName(lst[0]), lst[0]);
            }

            lst = SkinTools.GetMultipleFileSkinObject(_files, "fruit-drop-overlay");
            if (lst.Count > 0)
            {
                SkinObjects.CatchSkinImages.Fruit.DropOverlay = new CatchSkinImage(Path.GetFileName(lst[0]), lst[0]);
            }

            #endregion
        }
コード例 #2
0
        private void GetTaikoSkinImage()
        {
            var files = Directory.GetFiles(ConfigFileDirectory.Replace("skin.ini", ""), "*.*",
                                           SearchOption.TopDirectoryOnly);

            #region TaikoSkinImages

            var lst = SkinTools.GetMultipleFileSkinObject(files, "taikobigcircle");
            if (lst.Count > 0)
            {
                SkinObjects.TaikoSkinImages.TaikoBigCircle = new TaikoSkinImage(Path.GetFileName(lst[0]), lst[0]);
            }

            lst = SkinTools.GetMultipleFileSkinObject(files, "taikocircle");
            if (lst.Count > 0)
            {
                SkinObjects.TaikoSkinImages.TaikoHitCircle = new TaikoSkinImage(Path.GetFileName(lst[0]), lst[0]);
            }

            lst = SkinTools.GetMultipleFileSkinObject(files, "sliderscorepoint");
            if (lst.Count > 0)
            {
                SkinObjects.TaikoSkinImages.SliderScorePoint = new TaikoSkinImage(Path.GetFileName(lst[0]), lst[0]);
            }

            lst = SkinTools.GetMultipleFileSkinObject(files, "taiko-roll-middle");
            if (lst.Count > 0)
            {
                SkinObjects.TaikoSkinImages.TaikoRollMiddle = new TaikoSkinImage(Path.GetFileName(lst[0]), lst[0]);
            }

            lst = SkinTools.GetMultipleFileSkinObject(files, "taiko-roll-end");
            if (lst.Count > 0)
            {
                SkinObjects.TaikoSkinImages.TaikoRollEnd = new TaikoSkinImage(Path.GetFileName(lst[0]), lst[0]);
            }

            lst = SkinTools.GetMultipleFileSkinObject(files, "spinner-warning");
            if (lst.Count > 0)
            {
                SkinObjects.TaikoSkinImages.SpinnerWarning = new TaikoSkinImage(Path.GetFileName(lst[0]), lst[0]);
            }

            #endregion

            #region TaikoSkinImagesOverlay

            lst = SkinTools.GetMultipleFileSkinObject(files, "taikobigcircleoverlay");
            if (lst.Count > 0)
            {
                foreach (var file in lst)
                {
                    SkinObjects.TaikoSkinImages.TaikoBigCircleOverlay.Add(new TaikoSkinImage(Path.GetFileName(file),
                                                                                             file));
                }
            }

            lst = SkinTools.GetMultipleFileSkinObject(files, "taikohitcircleoverlay");
            if (lst.Count > 0)
            {
                foreach (var file in lst)
                {
                    SkinObjects.TaikoSkinImages.TaikoHitCircleOverlay.Add(new TaikoSkinImage(Path.GetFileName(file),
                                                                                             file));
                }
            }

            #endregion

            #region TaikoHitBurstImages

            lst = SkinTools.GetMultipleFileSkinObject(files, "taiko-hit0");
            if (lst.Count > 0)
            {
                foreach (var file in lst)
                {
                    SkinObjects.TaikoSkinImages.HitBurstImages.Hit0.Add(
                        new TaikoSkinImage(Path.GetFileName(file), file));
                }
            }

            lst = SkinTools.GetMultipleFileSkinObject(files, "taiko-hit100");
            if (lst.Count > 0)
            {
                foreach (var file in lst)
                {
                    SkinObjects.TaikoSkinImages.HitBurstImages.Hit100.Add(new TaikoSkinImage(Path.GetFileName(file),
                                                                                             file));
                }
            }

            lst = SkinTools.GetMultipleFileSkinObject(files, "taiko-hit100k");
            if (lst.Count > 0)
            {
                foreach (var file in lst)
                {
                    SkinObjects.TaikoSkinImages.HitBurstImages.Hit100k.Add(new TaikoSkinImage(Path.GetFileName(file),
                                                                                              file));
                }
            }

            lst = SkinTools.GetMultipleFileSkinObject(files, "taiko-hit300");
            if (lst.Count > 0)
            {
                foreach (var file in lst)
                {
                    SkinObjects.TaikoSkinImages.HitBurstImages.Hit300.Add(new TaikoSkinImage(Path.GetFileName(file),
                                                                                             file));
                }
            }

            lst = SkinTools.GetMultipleFileSkinObject(files, "taiko-hit300k");
            if (lst.Count > 0)
            {
                foreach (var file in lst)
                {
                    SkinObjects.TaikoSkinImages.HitBurstImages.Hit300k.Add(new TaikoSkinImage(Path.GetFileName(file),
                                                                                              file));
                }
            }

            #endregion

            #region TaikoPipidonImages

            lst = SkinTools.GetMultipleFileSkinObject(files, "pippidonclear");
            if (lst.Count > 0)
            {
                foreach (var file in lst)
                {
                    SkinObjects.TaikoSkinImages.PippidonImages.PippidonClear.Add(
                        new TaikoSkinImage(Path.GetFileName(file), file));
                }
            }

            lst = SkinTools.GetMultipleFileSkinObject(files, "pippidonfail");
            if (lst.Count > 0)
            {
                foreach (var file in lst)
                {
                    SkinObjects.TaikoSkinImages.PippidonImages.PippidonFail.Add(
                        new TaikoSkinImage(Path.GetFileName(file), file));
                }
            }

            lst = SkinTools.GetMultipleFileSkinObject(files, "pippidonidle");
            if (lst.Count > 0)
            {
                foreach (var file in lst)
                {
                    SkinObjects.TaikoSkinImages.PippidonImages.PippidonIdle.Add(
                        new TaikoSkinImage(Path.GetFileName(file), file));
                }
            }

            lst = SkinTools.GetMultipleFileSkinObject(files, "pippidonkiai");
            if (lst.Count > 0)
            {
                foreach (var file in lst)
                {
                    SkinObjects.TaikoSkinImages.PippidonImages.PipidonKiai.Add(
                        new TaikoSkinImage(Path.GetFileName(file), file));
                }
            }

            #endregion
        }
コード例 #3
0
ファイル: SkinParser.cs プロジェクト: Someone999/osuTools
        private void GetGenericSkinImage()
        {
            #region Background

            var lst = SkinTools.GetMultipleFileSkinObject(_files, "menu-background");
            if (lst.Count > 0)
            {
                SkinObjects.GeneralSkinObjects.MenuBackground = new GeneralSkinImage(Path.GetFileName(lst[0]), lst[0]);
            }

            #endregion

            #region Cursor

            lst = SkinTools.GetMultipleFileSkinObject(_files, "cursor");
            if (lst.Count > 0)
            {
                SkinObjects.GeneralSkinObjects.Cursor = new GeneralSkinImage(Path.GetFileName(lst[0]), lst[0]);
            }
            lst = SkinTools.GetMultipleFileSkinObject(_files, "cursortrail");
            if (lst.Count > 0)
            {
                SkinObjects.GeneralSkinObjects.CursorTrail = new GeneralSkinImage(Path.GetFileName(lst[0]), lst[0]);
            }

            #endregion

            #region HitCircleNumber

            lst = SkinTools.GetMultipleFileSkinObject(_files, "default-");
            if (lst.Count > 0)
            {
                foreach (var file in lst)
                {
                    SkinObjects.GeneralSkinObjects.HitCircleNumberImages.Add(
                        new GeneralSkinImage(Path.GetFileName(file), file));
                }
            }

            #endregion

            #region Score

            lst = SkinTools.GetMultipleFileSkinObject(_files, "Score-dot");
            if (lst.Count > 0)
            {
                SkinObjects.GeneralSkinObjects.ScoreImages.Dot = new GeneralSkinImage(Path.GetFileName(lst[0]), lst[0]);
            }
            lst = SkinTools.GetMultipleFileSkinObject(_files, "Score-comma");
            if (lst.Count > 0)
            {
                SkinObjects.GeneralSkinObjects.ScoreImages.Coma =
                    new GeneralSkinImage(Path.GetFileName(lst[0]), lst[0]);
            }
            lst = SkinTools.GetMultipleFileSkinObject(_files, "Score-percent");
            if (lst.Count > 0)
            {
                SkinObjects.GeneralSkinObjects.ScoreImages.Percent =
                    new GeneralSkinImage(Path.GetFileName(lst[0]), lst[0]);
            }
            lst = SkinTools.GetMultipleFileSkinObject(_files, "score-x");
            if (lst.Count > 0)
            {
                SkinObjects.GeneralSkinObjects.ScoreImages.x = new GeneralSkinImage(Path.GetFileName(lst[0]), lst[0]);
            }
            lst = SkinTools.GetMultipleFileSkinObject(_files, "default-");
            if (lst.Count > 0)
            {
                foreach (var file in lst)
                {
                    SkinObjects.GeneralSkinObjects.HitCircleNumberImages.Add(
                        new GeneralSkinImage(Path.GetFileName(file), file));
                }
            }
            lst = SkinTools.GetMultipleFileSkinObject(_files, "Score-");
            if (lst.Count > 0)
            {
                foreach (var file in lst)
                {
                    SkinObjects.GeneralSkinObjects.ScoreImages.ScoreNumbers.Add(
                        new GeneralSkinImage(Path.GetFileName(file), file));
                }
            }

            #endregion

            #region MenuBack

            lst = SkinTools.GetMultipleFileSkinObject(_files, "menu-back-");
            if (lst.Count > 0)
            {
                foreach (var file in lst)
                {
                    SkinObjects.GeneralSkinObjects.MenuBackImages.Add(
                        new GeneralSkinImage(Path.GetFileName(file), file));
                }
            }

            #endregion

            #region MenuButtonBackground

            lst = SkinTools.GetMultipleFileSkinObject(_files, "menu-button-background");
            if (lst.Count > 0)
            {
                SkinObjects.GeneralSkinObjects.MenuButtonBackground =
                    new GeneralSkinImage(Path.GetFileName(lst[0]), lst[0]);
            }

            #endregion

            #region MenuSnow

            lst = SkinTools.GetMultipleFileSkinObject(_files, "menu-snow");
            if (lst.Count > 0)
            {
                SkinObjects.GeneralSkinObjects.MenuSnow = new GeneralSkinImage(Path.GetFileName(lst[0]), lst[0]);
            }

            #endregion

            #region Star

            lst = SkinTools.GetMultipleFileSkinObject(_files, "star");
            if (lst.Count > 0)
            {
                SkinObjects.GeneralSkinObjects.Star = new GeneralSkinImage(Path.GetFileName(lst[0]), lst[0]);
            }

            #endregion

            #region ModeList

            lst = SkinTools.GetMultipleFileSkinObject(_files, "mode-osu-med");
            if (lst.Count > 0)
            {
                SkinObjects.GeneralSkinObjects.ModeListImages.Osu =
                    new GeneralSkinImage(Path.GetFileName(lst[0]), lst[0]);
            }
            lst = SkinTools.GetMultipleFileSkinObject(_files, "mode-taiko-med");
            if (lst.Count > 0)
            {
                SkinObjects.GeneralSkinObjects.ModeListImages.Taiko =
                    new GeneralSkinImage(Path.GetFileName(lst[0]), lst[0]);
            }
            lst = SkinTools.GetMultipleFileSkinObject(_files, "mode-fruits-med");
            if (lst.Count > 0)
            {
                SkinObjects.GeneralSkinObjects.ModeListImages.Catch =
                    new GeneralSkinImage(Path.GetFileName(lst[0]), lst[0]);
            }
            lst = SkinTools.GetMultipleFileSkinObject(_files, "mode-mania-med");
            if (lst.Count > 0)
            {
                SkinObjects.GeneralSkinObjects.ModeListImages.Mania =
                    new GeneralSkinImage(Path.GetFileName(lst[0]), lst[0]);
            }

            #endregion

            #region Skip

            lst = SkinTools.GetMultipleFileSkinObject(_files, "play-skip-");
            if (lst.Count > 0)
            {
                foreach (var file in lst)
                {
                    SkinObjects.GeneralSkinObjects.SkipImages.Add(new GeneralSkinImage(Path.GetFileName(file), file));
                }
            }

            #endregion

            #region RankingImage

            lst = SkinTools.GetMultipleFileSkinObject(_files, "ranking-X");
            if (lst.Count > 0)
            {
                SkinObjects.GeneralSkinObjects.RankingImages.SS = new RankingImage(Path.GetFileName(lst[0]), lst[0]);
            }
            lst = SkinTools.GetMultipleFileSkinObject(_files, "ranking-XH");
            if (lst.Count > 0)
            {
                SkinObjects.GeneralSkinObjects.RankingImages.SSH = new RankingImage(Path.GetFileName(lst[0]), lst[0]);
            }
            lst = SkinTools.GetMultipleFileSkinObject(_files, "ranking-S");
            if (lst.Count > 0)
            {
                SkinObjects.GeneralSkinObjects.RankingImages.S = new RankingImage(Path.GetFileName(lst[0]), lst[0]);
            }
            lst = SkinTools.GetMultipleFileSkinObject(_files, "ranking-SH");
            if (lst.Count > 0)
            {
                SkinObjects.GeneralSkinObjects.RankingImages.SH = new RankingImage(Path.GetFileName(lst[0]), lst[0]);
            }
            lst = SkinTools.GetMultipleFileSkinObject(_files, "ranking-A");
            if (lst.Count > 0)
            {
                SkinObjects.GeneralSkinObjects.RankingImages.A = new RankingImage(Path.GetFileName(lst[0]), lst[0]);
            }
            lst = SkinTools.GetMultipleFileSkinObject(_files, "ranking-B");
            if (lst.Count > 0)
            {
                SkinObjects.GeneralSkinObjects.RankingImages.B = new RankingImage(Path.GetFileName(lst[0]), lst[0]);
            }
            lst = SkinTools.GetMultipleFileSkinObject(_files, "ranking-C");
            if (lst.Count > 0)
            {
                SkinObjects.GeneralSkinObjects.RankingImages.C = new RankingImage(Path.GetFileName(lst[0]), lst[0]);
            }
            lst = SkinTools.GetMultipleFileSkinObject(_files, "ranking-D");
            if (lst.Count > 0)
            {
                SkinObjects.GeneralSkinObjects.RankingImages.D = new RankingImage(Path.GetFileName(lst[0]), lst[0]);
            }

            #endregion

            #region ResultPage

            lst = SkinTools.GetMultipleFileSkinObject(_files, "ranking-accuracy");
            if (lst.Count > 0)
            {
                SkinObjects.GeneralSkinObjects.ResultPageImages.Accuracy =
                    new GeneralSkinImage(Path.GetFileName(lst[0]), lst[0]);
            }
            lst = SkinTools.GetMultipleFileSkinObject(_files, "ranking-panel");
            if (lst.Count > 0)
            {
                SkinObjects.GeneralSkinObjects.ResultPageImages.Panel =
                    new GeneralSkinImage(Path.GetFileName(lst[0]), lst[0]);
            }
            lst = SkinTools.GetMultipleFileSkinObject(_files, "ranking-graph");
            if (lst.Count > 0)
            {
                SkinObjects.GeneralSkinObjects.ResultPageImages.TimePerformanceBox =
                    new GeneralSkinImage(Path.GetFileName(lst[0]), lst[0]);
            }
            lst = SkinTools.GetMultipleFileSkinObject(_files, "ranking-perfect");
            if (lst.Count > 0)
            {
                SkinObjects.GeneralSkinObjects.ResultPageImages.Perfect =
                    new GeneralSkinImage(Path.GetFileName(lst[0]), lst[0]);
            }
            lst = SkinTools.GetMultipleFileSkinObject(_files, "ranking-maxcombo");
            if (lst.Count > 0)
            {
                SkinObjects.GeneralSkinObjects.ResultPageImages.MaxCombo =
                    new GeneralSkinImage(Path.GetFileName(lst[0]), lst[0]);
            }
            lst = SkinTools.GetMultipleFileSkinObject(_files, "ranking-title");
            if (lst.Count > 0)
            {
                SkinObjects.GeneralSkinObjects.ResultPageImages.Title =
                    new GeneralSkinImage(Path.GetFileName(lst[0]), lst[0]);
            }
            lst = SkinTools.GetMultipleFileSkinObject(_files, "pause-retry");
            if (lst.Count > 0)
            {
                SkinObjects.GeneralSkinObjects.ResultPageImages.Retry =
                    new GeneralSkinImage(Path.GetFileName(lst[0]), lst[0]);
            }
            lst = SkinTools.GetMultipleFileSkinObject(_files, "pause-replay");
            if (lst.Count > 0)
            {
                SkinObjects.GeneralSkinObjects.ResultPageImages.Replay =
                    new GeneralSkinImage(Path.GetFileName(lst[0]), lst[0]);
            }
            lst = SkinTools.GetMultipleFileSkinObject(_files, "ranking-retry");
            if (lst.Count > 0)
            {
                SkinObjects.GeneralSkinObjects.ResultPageImages.Retry =
                    new GeneralSkinImage(Path.GetFileName(lst[0]), lst[0]);
            }

            #endregion

            #region PauseMenu

            lst = SkinTools.GetMultipleFileSkinObject(_files, "pause-retry");
            if (lst.Count > 0)
            {
                SkinObjects.GeneralSkinObjects.PauseMenuImages.Retry =
                    new GeneralSkinImage(Path.GetFileName(lst[0]), lst[0]);
            }
            lst = SkinTools.GetMultipleFileSkinObject(_files, "pause-back");
            if (lst.Count > 0)
            {
                SkinObjects.GeneralSkinObjects.PauseMenuImages.Back =
                    new GeneralSkinImage(Path.GetFileName(lst[0]), lst[0]);
            }
            lst = SkinTools.GetMultipleFileSkinObject(_files, "pause-continue");
            if (lst.Count > 0)
            {
                SkinObjects.GeneralSkinObjects.PauseMenuImages.Continue =
                    new GeneralSkinImage(Path.GetFileName(lst[0]), lst[0]);
            }

            #endregion

            #region ReadyCountdown

            lst = SkinTools.GetMultipleFileSkinObject(_files, "ready");
            if (lst.Count > 0)
            {
                SkinObjects.GeneralSkinObjects.Countdown.Ready.Image =
                    new GeneralSkinImage(Path.GetFileName(lst[0]), lst[0]);
            }
            lst = SkinTools.GetMultipleFileSkinObject(_files, "count1");
            if (lst.Count > 0)
            {
                SkinObjects.GeneralSkinObjects.Countdown.One.Image =
                    new GeneralSkinImage(Path.GetFileName(lst[0]), lst[0]);
            }
            lst = SkinTools.GetMultipleFileSkinObject(_files, "count2");
            if (lst.Count > 0)
            {
                SkinObjects.GeneralSkinObjects.Countdown.Two.Image =
                    new GeneralSkinImage(Path.GetFileName(lst[0]), lst[0]);
            }
            lst = SkinTools.GetMultipleFileSkinObject(_files, "count3");
            if (lst.Count > 0)
            {
                SkinObjects.GeneralSkinObjects.Countdown.Three.Image =
                    new GeneralSkinImage(Path.GetFileName(lst[0]), lst[0]);
            }
            lst = SkinTools.GetMultipleFileSkinObject(_files, "go");
            if (lst.Count > 0)
            {
                SkinObjects.GeneralSkinObjects.Countdown.Go.Image =
                    new GeneralSkinImage(Path.GetFileName(lst[0]), lst[0]);
            }
            lst = SkinTools.GetMultipleFileSkinObject(_files, "readys");
            if (lst.Count > 0)
            {
                SkinObjects.GeneralSkinObjects.Countdown.Ready.Sound =
                    new GeneralSkinSound(Path.GetFileName(lst[0]), lst[0]);
            }
            lst = SkinTools.GetMultipleFileSkinObject(_files, "count1s");
            if (lst.Count > 0)
            {
                SkinObjects.GeneralSkinObjects.Countdown.One.Sound =
                    new GeneralSkinSound(Path.GetFileName(lst[0]), lst[0]);
            }
            lst = SkinTools.GetMultipleFileSkinObject(_files, "count2s");
            if (lst.Count > 0)
            {
                SkinObjects.GeneralSkinObjects.Countdown.Two.Sound =
                    new GeneralSkinSound(Path.GetFileName(lst[0]), lst[0]);
            }
            lst = SkinTools.GetMultipleFileSkinObject(_files, "count3s");
            if (lst.Count > 0)
            {
                SkinObjects.GeneralSkinObjects.Countdown.Three.Sound =
                    new GeneralSkinSound(Path.GetFileName(lst[0]), lst[0]);
            }
            lst = SkinTools.GetMultipleFileSkinObject(_files, "gos");
            if (lst.Count > 0)
            {
                SkinObjects.GeneralSkinObjects.Countdown.Go.Sound =
                    new GeneralSkinSound(Path.GetFileName(lst[0]), lst[0]);
            }

            #endregion

            #region ScoreBar

            lst = SkinTools.GetMultipleFileSkinObject(_files, "scorebar-bg");
            if (lst.Count > 0)
            {
                SkinObjects.GeneralSkinObjects.ScoreBarSkinImages.ScoreBarBackgorund =
                    new GeneralSkinImage(Path.GetFileName(lst[0]), lst[0]);
            }
            lst = SkinTools.GetMultipleFileSkinObject(_files, "ready");
            if (lst.Count > 0)
            {
                foreach (var file in lst)
                {
                    SkinObjects.GeneralSkinObjects.ScoreBarSkinImages.ScoreBarColour.Add(
                        new GeneralSkinImage(Path.GetFileName(file), file));
                }
            }
            lst = SkinTools.GetMultipleFileSkinObject(_files, "scorebar-ki");
            if (lst.Count > 0)
            {
                SkinObjects.GeneralSkinObjects.ScoreBarSkinImages.ScoreBarKi =
                    new GeneralSkinImage(Path.GetFileName(lst[0]), lst[0]);
            }
            lst = SkinTools.GetMultipleFileSkinObject(_files, "scorebar-kidanger");
            if (lst.Count > 0)
            {
                SkinObjects.GeneralSkinObjects.ScoreBarSkinImages.ScoreBarKiDanger =
                    new GeneralSkinImage(Path.GetFileName(lst[0]), lst[0]);
            }
            lst = SkinTools.GetMultipleFileSkinObject(_files, "scorebar-kidanger2");
            if (lst.Count > 0)
            {
                SkinObjects.GeneralSkinObjects.ScoreBarSkinImages.ScoreBarKiCritical =
                    new GeneralSkinImage(Path.GetFileName(lst[0]), lst[0]);
            }
            lst = SkinTools.GetMultipleFileSkinObject(_files, "scorebar-marker");
            if (lst.Count > 0)
            {
                SkinObjects.GeneralSkinObjects.ScoreBarSkinImages.ScoreBarMarker =
                    new GeneralSkinImage(Path.GetFileName(lst[0]), lst[0]);
            }

            #endregion
        }
コード例 #4
0
        private void GetOsuSkinImage()
        {
            #region OsuRelatedImages

            var lst = SkinTools.GetMultipleFileSkinObject(_files, "approachcircle");
            if (lst.Count > 0)
            {
                SkinObjects.OsuSkinImages.ApproachCircle = new OsuSkinImage(Path.GetFileName(lst[0]), lst[0]);
            }

            lst = SkinTools.GetMultipleFileSkinObject(_files, "hitcircle");
            if (lst.Count > 0)
            {
                SkinObjects.OsuSkinImages.HitCircle = new OsuSkinImage(Path.GetFileName(lst[0]), lst[0]);
            }

            lst = SkinTools.GetMultipleFileSkinObject(_files, "hitcircleselect");
            if (lst.Count > 0)
            {
                SkinObjects.OsuSkinImages.HitCircleSelect = new OsuSkinImage(Path.GetFileName(lst[0]), lst[0]);
            }

            lst = SkinTools.GetMultipleFileSkinObject(_files, "followpoint");
            if (lst.Count > 0)
            {
                SkinObjects.OsuSkinImages.FollowPoint = new OsuSkinImage(Path.GetFileName(lst[0]), lst[0]);
            }

            lst = SkinTools.GetMultipleFileSkinObject(_files, "reversearrow");
            if (lst.Count > 0)
            {
                SkinObjects.OsuSkinImages.SliderSkinImages.ReverseArrow =
                    new OsuSkinImage(Path.GetFileName(lst[0]), lst[0]);
            }

            lst = SkinTools.GetMultipleFileSkinObject(_files, "sliderendcircle");
            if (lst.Count > 0)
            {
                SkinObjects.OsuSkinImages.SliderSkinImages.SliderEndCircle =
                    new OsuSkinImage(Path.GetFileName(lst[0]), lst[0]);
            }

            lst = SkinTools.GetMultipleFileSkinObject(_files, "sliderstartcircle");
            if (lst.Count > 0)
            {
                SkinObjects.OsuSkinImages.SliderSkinImages.SliderStartCircle =
                    new OsuSkinImage(Path.GetFileName(lst[0]), lst[0]);
            }

            lst = SkinTools.GetMultipleFileSkinObject(_files, "sliderscorepoint");
            if (lst.Count > 0)
            {
                SkinObjects.OsuSkinImages.SliderSkinImages.SliderScorePoint =
                    new OsuSkinImage(Path.GetFileName(lst[0]), lst[0]);
            }

            lst = SkinTools.GetMultipleFileSkinObject(_files, "spinner-circle");
            if (lst.Count > 0)
            {
                SkinObjects.OsuSkinImages.SpinnerSkinImages.SpinnerCircle =
                    new OsuSkinImage(Path.GetFileName(lst[0]), lst[0]);
            }

            lst = SkinTools.GetMultipleFileSkinObject(_files, "spinner-background");
            if (lst.Count > 0)
            {
                SkinObjects.OsuSkinImages.SpinnerSkinImages.SpinnerBackground =
                    new OsuSkinImage(Path.GetFileName(lst[0]), lst[0]);
            }

            lst = SkinTools.GetMultipleFileSkinObject(_files, "spinner-metre");
            if (lst.Count > 0)
            {
                SkinObjects.OsuSkinImages.SpinnerSkinImages.SpinnerMeter =
                    new OsuSkinImage(Path.GetFileName(lst[0]), lst[0]);
            }

            lst = SkinTools.GetMultipleFileSkinObject(_files, "spinner-bottom");
            if (lst.Count > 0)
            {
                SkinObjects.OsuSkinImages.SpinnerSkinImages.SpinnerBottom =
                    new OsuSkinImage(Path.GetFileName(lst[0]), lst[0]);
            }

            lst = SkinTools.GetMultipleFileSkinObject(_files, "spinner-glow");
            if (lst.Count > 0)
            {
                SkinObjects.OsuSkinImages.SpinnerSkinImages.SpinnerGlow =
                    new OsuSkinImage(Path.GetFileName(lst[0]), lst[0]);
            }

            lst = SkinTools.GetMultipleFileSkinObject(_files, "spinner-middle");
            if (lst.Count > 0)
            {
                SkinObjects.OsuSkinImages.SpinnerSkinImages.SpinnerMiddle =
                    new OsuSkinImage(Path.GetFileName(lst[0]), lst[0]);
            }

            lst = SkinTools.GetMultipleFileSkinObject(_files, "spinner-middle2");
            if (lst.Count > 0)
            {
                SkinObjects.OsuSkinImages.SpinnerSkinImages.SpinnerMiddle2 =
                    new OsuSkinImage(Path.GetFileName(lst[0]), lst[0]);
            }

            lst = SkinTools.GetMultipleFileSkinObject(_files, "spinner-top");
            if (lst.Count > 0)
            {
                SkinObjects.OsuSkinImages.SpinnerSkinImages.SpinnerTop =
                    new OsuSkinImage(Path.GetFileName(lst[0]), lst[0]);
            }

            lst = SkinTools.GetMultipleFileSkinObject(_files, "spinner-approachcircle");
            if (lst.Count > 0)
            {
                SkinObjects.OsuSkinImages.SpinnerSkinImages.SpinnerApproachCircle =
                    new OsuSkinImage(Path.GetFileName(lst[0]), lst[0]);
            }

            lst = SkinTools.GetMultipleFileSkinObject(_files, "spinner-clear");
            if (lst.Count > 0)
            {
                SkinObjects.OsuSkinImages.SpinnerSkinImages.SpinnerClear =
                    new OsuSkinImage(Path.GetFileName(lst[0]), lst[0]);
            }

            lst = SkinTools.GetMultipleFileSkinObject(_files, "spinner-spin");
            if (lst.Count > 0)
            {
                SkinObjects.OsuSkinImages.SpinnerSkinImages.SpinnerSpin =
                    new OsuSkinImage(Path.GetFileName(lst[0]), lst[0]);
            }

            lst = SkinTools.GetMultipleFileSkinObject(_files, "spinner-rpm");
            if (lst.Count > 0)
            {
                SkinObjects.OsuSkinImages.SpinnerSkinImages.SpinnerRPM =
                    new OsuSkinImage(Path.GetFileName(lst[0]), lst[0]);
            }

            #endregion

            #region OsuRelatedOverlay

            lst = SkinTools.GetMultipleFileSkinObject(_files, "hitcircleoverlay");
            if (lst.Count > 0)
            {
                foreach (var file in lst)
                {
                    SkinObjects.OsuSkinImages.HitCircleOverlay.Add(new OsuSkinImage(Path.GetFileName(file), file));
                }
            }

            lst = SkinTools.GetMultipleFileSkinObject(_files, "sliderstartcircleoverlay");
            if (lst.Count > 0)
            {
                foreach (var file in lst)
                {
                    SkinObjects.OsuSkinImages.SliderSkinImages.SliderStartCircleOverlay.Add(
                        new OsuSkinImage(Path.GetFileName(file), file));
                }
            }

            lst = SkinTools.GetMultipleFileSkinObject(_files, "sliderendcircleoverlay");
            if (lst.Count > 0)
            {
                foreach (var file in lst)
                {
                    SkinObjects.OsuSkinImages.SliderSkinImages.SliderEndCircleOverlay.Add(
                        new OsuSkinImage(Path.GetFileName(file), file));
                }
            }

            lst = SkinTools.GetMultipleFileSkinObject(_files, "sliderb");
            if (lst.Count > 0)
            {
                foreach (var file in lst)
                {
                    SkinObjects.OsuSkinImages.SliderSkinImages.SliderBall.Add(new OsuSkinImage(Path.GetFileName(file),
                                                                                               file));
                }
            }

            lst = SkinTools.GetMultipleFileSkinObject(_files, "sliderfollowcircle");
            if (lst.Count > 0)
            {
                foreach (var file in lst)
                {
                    SkinObjects.OsuSkinImages.SliderSkinImages.SliderFollowCircle.Add(
                        new OsuSkinImage(Path.GetFileName(file), file));
                }
            }

            #endregion

            #region HitBurst

            lst = SkinTools.GetMultipleFileSkinObject(_files, "hit300");
            if (lst.Count > 0)
            {
                foreach (var file in lst)
                {
                    SkinObjects.OsuSkinImages.HitBurstImages.Hit300.Add(new OsuSkinImage(Path.GetFileName(file), file));
                }
            }

            lst = SkinTools.GetMultipleFileSkinObject(_files, "hit100");
            if (lst.Count > 0)
            {
                foreach (var file in lst)
                {
                    SkinObjects.OsuSkinImages.HitBurstImages.Hit100.Add(new OsuSkinImage(Path.GetFileName(file), file));
                }
            }

            lst = SkinTools.GetMultipleFileSkinObject(_files, "hit50");
            if (lst.Count > 0)
            {
                foreach (var file in lst)
                {
                    SkinObjects.OsuSkinImages.HitBurstImages.Hit50.Add(new OsuSkinImage(Path.GetFileName(file), file));
                }
            }

            lst = SkinTools.GetMultipleFileSkinObject(_files, "hit0");
            if (lst.Count > 0)
            {
                foreach (var file in lst)
                {
                    SkinObjects.OsuSkinImages.HitBurstImages.Hit0.Add(new OsuSkinImage(Path.GetFileName(file), file));
                }
            }
            lst = SkinTools.GetMultipleFileSkinObject(_files, "hit300k");
            if (lst.Count > 0)
            {
                foreach (var file in lst)
                {
                    SkinObjects.OsuSkinImages.HitBurstImages.Hit300k.Add(new OsuSkinImage(Path.GetFileName(file),
                                                                                          file));
                }
            }
            lst = SkinTools.GetMultipleFileSkinObject(_files, "hit100k");
            if (lst.Count > 0)
            {
                foreach (var file in lst)
                {
                    SkinObjects.OsuSkinImages.HitBurstImages.Hit100k.Add(new OsuSkinImage(Path.GetFileName(file),
                                                                                          file));
                }
            }

            #endregion
        }
コード例 #5
0
        private void GetInfo()
        {
            var currentKey = 0;
            var block      = "";

            FontSettings  = new FontSetting();
            ColorSettings = new ColorSetting();
            CatchSettings = new CatchSkinSetting();
            ManiaSettings = new MultipleKeysSettings();
            foreach (var line in _data)
            {
                var val = line.Split(':');
                if (line.Trim().StartsWith("[") && line.Trim().EndsWith("]"))
                {
                    block = line.Trim().Trim('[', ']');
                }

                if (val.Length > 1)
                {
                    var v = val[1].Trim();
                    var k = val[0].Trim();
                    if (line.Trim().StartsWith("Name"))
                    {
                        Name = v;
                    }
                    if (line.Trim().StartsWith("Author"))
                    {
                        Author = v;
                    }
                    if (line.Trim().StartsWith("Version"))
                    {
                        Version = v;
                    }
                    if (line.Trim().StartsWith("AnimationFramerate"))
                    {
                        AnimationFrameRate = v.ToUInt32();
                    }
                    if (line.Trim().StartsWith("AllowSliderBallTint"))
                    {
                        SliderSettings.AllowSliderBallTint = v.ToBool();
                    }
                    if (line.Trim().StartsWith("ComboBurstRandom"))
                    {
                        ComboBurstSettings.ComboBurstRandom = v.ToBool();
                    }
                    if (line.Trim().StartsWith("CursorCentre"))
                    {
                        CursorSettings.CursorCenter = v.ToBool();
                    }
                    if (line.Trim().StartsWith("CursorExpand"))
                    {
                        CursorSettings.CursorExpand = v.ToBool();
                    }
                    if (line.Trim().StartsWith("CursorRotate"))
                    {
                        CursorSettings.CursorRotate = v.ToBool();
                    }
                    if (line.Trim().StartsWith("CursorTrailRotate"))
                    {
                        CursorSettings.CursorTrailRotate = v.ToBool();
                    }
                    if (line.Trim().StartsWith("CustomComboBurstSounds"))
                    {
                        ComboBurstSettings.CustomComboBurstSound = v;
                    }
                    if (line.Trim().StartsWith("HitCircleOverlayAboveNumber"))
                    {
                        HitCircleOverlayAboveNumber = v.ToBool();
                    }
                    if (line.Trim().StartsWith("LayeredHitSounds"))
                    {
                        LayeredHitSounds = v.ToBool();
                    }
                    if (line.Trim().StartsWith("LayeredHitSounds"))
                    {
                        LayeredHitSounds = v.ToBool();
                    }
                    if (line.Trim().StartsWith("SliderBallFlip"))
                    {
                        SliderSettings.SliderBallFlip = v.ToBool();
                    }
                    if (line.Trim().StartsWith("SliderBallFrames"))
                    {
                        SliderSettings.SliderBallFrames = v.ToUInt32();
                    }
                    if (line.Trim().StartsWith("SliderStyle"))
                    {
                        SliderSettings.SliderStyle = (SliderStyles)v.ToInt32();
                    }
                    if (line.Trim().StartsWith("SpinnerFadePlayfield"))
                    {
                        SpinnerSettings.SpinnerFadePlayfield = v.ToBool();
                    }
                    if (line.Trim().StartsWith("SpinnerFrequencyModulate"))
                    {
                        SpinnerSettings.SpinnerFrequencyModulate = v.ToBool();
                    }
                    if (line.Trim().StartsWith("SpinnerNoBlink"))
                    {
                        SpinnerSettings.SpinnerNoBlink = v.ToBool();
                    }
                    if (line.Trim().StartsWith("HyperDash"))
                    {
                        CatchSettings.HyperDash = v.ToRgbColor();
                    }
                    if (line.Trim().StartsWith("HyperDashFruit"))
                    {
                        CatchSettings.HyperDashFruit = v.ToRgbColor();
                    }
                    if (line.Trim().StartsWith("HyperDashAfterImage"))
                    {
                        CatchSettings.HyperDashAfterImage = v.ToRgbColor();
                    }
                    if (line.Trim().StartsWith("Combo1"))
                    {
                        ColorSettings.ComboColors.setColor(ComboNumber.Last, v.ToRgbColor() as ComboColor);
                    }
                    if (line.Trim().StartsWith("Combo2"))
                    {
                        ColorSettings.ComboColors.setColor(ComboNumber.First, v.ToRgbColor() as ComboColor);
                    }
                    if (line.Trim().StartsWith("Combo3"))
                    {
                        ColorSettings.ComboColors.setColor(ComboNumber.Second, v.ToRgbColor() as ComboColor);
                    }
                    if (line.Trim().StartsWith("Combo4"))
                    {
                        ColorSettings.ComboColors.setColor(ComboNumber.Third, v.ToRgbColor() as ComboColor);
                    }
                    if (line.Trim().StartsWith("Combo5"))
                    {
                        ColorSettings.ComboColors.setColor(ComboNumber.Fourth, v.ToRgbColor() as ComboColor);
                    }
                    if (line.Trim().StartsWith("Combo6"))
                    {
                        ColorSettings.ComboColors.setColor(ComboNumber.Fifth, v.ToRgbColor() as ComboColor);
                    }
                    if (line.Trim().StartsWith("Combo7"))
                    {
                        ColorSettings.ComboColors.setColor(ComboNumber.Sixth, v.ToRgbColor() as ComboColor);
                    }
                    if (line.Trim().StartsWith("Combo8"))
                    {
                        ColorSettings.ComboColors.setColor(ComboNumber.Seventh, v.ToRgbColor() as ComboColor);
                    }
                    if (line.Trim().StartsWith("InputOverlayText"))
                    {
                        ColorSettings.InputOverlayText = v.ToRgbColor() as TextColor;
                    }
                    if (line.Trim().StartsWith("MenuGlow"))
                    {
                        ColorSettings.MenuGlow = v.ToRgbColor() as OverlayColor;
                    }
                    if (line.Trim().StartsWith("SliderBall"))
                    {
                        ColorSettings.SliderBall = v.ToRgbColor();
                    }
                    if (line.Trim().StartsWith("SliderBorder"))
                    {
                        ColorSettings.SliderBorder = v.ToRgbColor();
                    }
                    if (line.Trim().StartsWith("SliderTrackOverride"))
                    {
                        ColorSettings.SliderTrackOverride = v.ToRgbColor();
                    }
                    if (line.Trim().StartsWith("SongSelectActiveText"))
                    {
                        ColorSettings.SongSelectActiveText = v.ToRgbColor() as TextColor;
                    }
                    if (line.Trim().StartsWith("SongSelectInactiveText"))
                    {
                        ColorSettings.SongSelectInactiveText = v.ToRgbColor() as TextColor;
                    }
                    if (line.Trim().StartsWith("SpinnerBackground"))
                    {
                        ColorSettings.SpinnerBackground = v.ToRgbColor() as OverlayColor;
                    }
                    if (line.Trim().StartsWith("StarBreakAdditive"))
                    {
                        ColorSettings.StarBreakAdditive = v.ToRgbColor() as OverlayColor;
                    }
                    if (line.Trim().StartsWith("HitCirclePrefix"))
                    {
                        FontSettings.HitCirclePrefix = v;
                    }
                    if (line.Trim().StartsWith("HitCircleOverlap"))
                    {
                        FontSettings.HitCircleOverlap = v.ToInt32();
                    }
                    if (line.Trim().StartsWith("ScorePrefix"))
                    {
                        FontSettings.ScorePrefix = v;
                    }
                    if (line.Trim().StartsWith("ScoreOverlap"))
                    {
                        FontSettings.ScoreOverlap = v.ToInt32();
                    }
                    if (line.Trim().StartsWith("ComboPrefix"))
                    {
                        FontSettings.ComboPrefix = v;
                    }
                    if (line.Trim().StartsWith("ComboOverlap"))
                    {
                        FontSettings.ComboOverlap = v.ToInt32();
                    }
                    if (block == "Mania")
                    {
                        if (line.Trim().StartsWith("Keys:"))
                        {
                            currentKey = v.ToInt32();
                        }
                        if (line.Trim().StartsWith("ColumnStart"))
                        {
                            ManiaSettings[currentKey].ColumnStart = v.ToInt32();
                        }
                        if (line.Trim().StartsWith("ColumnRight"))
                        {
                            ManiaSettings[currentKey].ColumnRight = v.ToInt32();
                        }
                        if (line.Trim().StartsWith("ColumnSpacing"))
                        {
                            ManiaSettings[currentKey].ColumnSpacing = v;
                        }
                        if (line.Trim().StartsWith("ColumnWidth"))
                        {
                            ManiaSettings[currentKey].ColumnWidth = v;
                        }
                        if (line.Trim().StartsWith("ColumnLineWidth"))
                        {
                            ManiaSettings[currentKey].ColumnLineWidth = v;
                        }
                        if (line.Trim().StartsWith("BarlineHeight"))
                        {
                            ManiaSettings[currentKey].BarlineHeight = v.ToDouble();
                        }
                        if (line.Trim().StartsWith("LightingNWidth"))
                        {
                            ManiaSettings[currentKey].LightingNWidth = v;
                        }
                        if (line.Trim().StartsWith("LightingLWidth"))
                        {
                            ManiaSettings[currentKey].LightingLWidth = v;
                        }
                        if (line.Trim().StartsWith("WidthForNoteHeightScale"))
                        {
                            ManiaSettings[currentKey].WidthForNoteHeightScale = v.ToNullableDouble();
                        }
                        if (line.Trim().StartsWith("HitPosition"))
                        {
                            ManiaSettings[currentKey].HitPosition = v.ToInt32();
                        }
                        if (line.Trim().StartsWith("LightPosition"))
                        {
                            ManiaSettings[currentKey].LightPosition = v.ToInt32();
                        }
                        if (line.Trim().StartsWith("ScorePosition"))
                        {
                            ManiaSettings[currentKey].ScorePosition = v.ToNullableInt32();
                        }
                        if (line.Trim().StartsWith("ComboPosition"))
                        {
                            ManiaSettings[currentKey].ScorePosition = v.ToNullableInt32();
                        }
                        if (line.Trim().StartsWith("JudgementLine"))
                        {
                            ManiaSettings[currentKey].JudgementLine = v.ToInt32();
                        }
                        if (line.Trim().StartsWith("SpecialStyle"))
                        {
                            var suc = int.TryParse(v, out var style);
                            if (suc)
                            {
                                ManiaSettings[currentKey].SpecialStyle = (SpecialStyles)style;
                            }
                            else
                            {
                                ManiaSettings[currentKey].SpecialStyle = SkinTools.StringToEnum <SpecialStyles>(v);
                            }
                        }

                        if (line.Trim().StartsWith("ComboBurstStyle"))
                        {
                            var suc = int.TryParse(v, out var style);
                            if (suc)
                            {
                                ManiaSettings[currentKey].ComboBurstStyle = (ComboBurstStyles)style;
                            }
                            else
                            {
                                ManiaSettings[currentKey].ComboBurstStyle = SkinTools.StringToEnum <ComboBurstStyles>(v);
                            }
                        }

                        if (line.Trim().StartsWith("SplitStages"))
                        {
                            ManiaSettings[currentKey].SplitStages = v.ToNullableBool();
                        }
                        if (line.Trim().StartsWith("StageSeparation"))
                        {
                            ManiaSettings[currentKey].StageSeparation = v.ToDouble();
                        }
                        if (line.Trim().StartsWith("KeysUnderNotes"))
                        {
                            ManiaSettings[currentKey].KeysUnderNotes = v.ToBool();
                        }
                        if (line.Trim().StartsWith("UpsideDown"))
                        {
                            ManiaSettings[currentKey].UpsideDown = v.ToBool();
                        }
                        int currentColumn;
                        if (line.Trim().StartsWith("KeyFlipWhenUpsideDown"))
                        {
                            if (k.Last().IsDigit())
                            {
                                currentColumn = k.Last() - '0';
                                ManiaSettings[currentKey].KeyFlipWhenUpsideDown.SetForColumn(currentColumn, v.ToBool());
                            }
                            else if (k.Last() == 'D')
                            {
                                if (k[k.Length - 2].IsDigit())
                                {
                                    currentColumn = k.Last() - '0';
                                    ManiaSettings[currentKey].KeyFlipWhenUpsideDownD
                                    .SetForColumn(currentColumn, v.ToBool());
                                }
                            }
                            else
                            {
                                ManiaSettings[currentKey].KeyFlipWhenUpsideDown.SetForAllColumns(v.ToBool());
                            }
                        }

                        if (line.Trim().StartsWith("NoteFlipWhenUpsideDown"))
                        {
                            if (k.Last().IsDigit())
                            {
                                currentColumn = k.Last() - '0';
                                ManiaSettings[currentKey].NoteFlipWhenUpsideDown
                                .SetForColumn(currentColumn, v.ToBool());
                            }
                            else if (k.Last() == 'H')
                            {
                                if (k[k.Length - 2].IsDigit())
                                {
                                    currentColumn = k.Last() - '0';
                                    ManiaSettings[currentKey].NoteFlipWhenUpsideDownH
                                    .SetForColumn(currentColumn, v.ToBool());
                                }
                                else
                                {
                                    throw new ArgumentException();
                                }
                            }
                            else if (k.Last() == 'L')
                            {
                                if (k[k.Length - 2].IsDigit())
                                {
                                    currentColumn = k.Last() - '0';
                                    ManiaSettings[currentKey].NoteFlipWhenUpsideDownL
                                    .SetForColumn(currentColumn, v.ToBool());
                                }
                                else
                                {
                                    throw new ArgumentException();
                                }
                            }
                            else if (k.Last() == 'T')
                            {
                                if (k[k.Length - 2].IsDigit())
                                {
                                    currentColumn = k.Last() - '0';
                                    ManiaSettings[currentKey].NoteFlipWhenUpsideDownT
                                    .SetForColumn(currentColumn, v.ToBool());
                                }
                                else
                                {
                                    throw new ArgumentException();
                                }
                            }
                        }

                        if (line.Trim().StartsWith("NoteBodyStyle"))
                        {
                            if (k.Last().IsDigit())
                            {
                                currentColumn = k.Last() - '0';
                                ManiaSettings[currentKey].NoteBodyStyle.SetForColumn(currentColumn, (HoldBodyStyle)v.ToInt32());
                            }
                            else
                            {
                                ManiaSettings[currentKey].NoteBodyStyle.SetForAllColumns((HoldBodyStyle)v.ToInt32());
                            }
                        }

                        if (line.Trim().StartsWith("Colour"))
                        {
                            var x = k.Replace("Colour", "");
                            if (k.Last().IsDigit())
                            {
                                currentColumn = k.Last() - '0';
                                ManiaSettings[currentKey].Color.SetForColumn(currentColumn, v.ToRgbaColor());
                            }
                            else if (k.StartsWith("Light") && x.Last().IsDigit())
                            {
                                currentColumn = k.Last() - '0';
                                ManiaSettings[currentKey].ColorLight.SetForColumn(currentColumn, v.ToRgbColor());
                            }
                            else if (k.EndsWith("Hold"))
                            {
                                ManiaSettings[currentKey].ColorHold = v.ToRgbaColor();
                            }
                            else if (k.EndsWith("ColumnLine"))
                            {
                                ManiaSettings[currentKey].ColorColumnLine = v.ToRgbaColor();
                            }
                            else if (k.EndsWith("JudgementLine"))
                            {
                                ManiaSettings[currentKey].ColorJudgementLine = v.ToRgbColor();
                            }
                            else if (k.EndsWith("KeyWarning"))
                            {
                                ManiaSettings[currentKey].ColorKeyWarning = v.ToRgbColor();
                            }
                            else if (k.EndsWith("Break"))
                            {
                                ManiaSettings[currentKey].ColorBreak = v.ToRgbaColor();
                            }
                            else
                            {
                                throw new ArgumentException();
                            }
                        }

                        if (line.Trim().StartsWith("KeyImage"))
                        {
                            if (k.Last().IsDigit())
                            {
                                currentColumn = k.Last() - '0';
                                ManiaSettings[currentKey].SkinImages.KeyImage
                                .SetForColumn(currentColumn, new ManiaSkinImage(this, v));
                                //Debug.WriteLine("A Numbered Key Image detected.At line:\"" + line + "\" at column " + currentColumn.ToString());
                            }
                            else if (k.Last() == 'D')
                            {
                                if (k[k.Length - 2].IsDigit())
                                {
                                    currentColumn = k[k.Length - 2] - '0';
                                    //Debug.WriteLine("A Numbered Key Down Image detected.At line:\"" + line + "\" at column " + currentColumn.ToString());
                                    ManiaSettings[currentKey].SkinImages.KeyImageD
                                    .SetForColumn(currentColumn, new ManiaSkinImage(this, v));
                                }
                                else
                                {
                                    throw new ArgumentException();
                                }
                            }

                            //Debug.WriteLine("CurrentColumn returned to zero. CurrentColumn:"+currentColumn.ToString());
                        }

                        if (line.Trim().StartsWith("NoteImage"))
                        {
                            //Debug.WriteLine("Note Image detected.At line:\"" + line + "\"");
                            if (k.Last().IsDigit())
                            {
                                currentColumn = k.Last() - '0';
                                ManiaSettings[currentKey].SkinImages.NoteImage
                                .SetForColumn(currentColumn, new ManiaSkinImage(this, v));
                            }
                            else if (k.Last() == 'H')
                            {
                                if (k[k.Length - 2].IsDigit())
                                {
                                    currentColumn = k[k.Length - 2] - '0';
                                    ManiaSettings[currentKey].SkinImages.NoteImageH
                                    .SetForColumn(currentColumn, new ManiaSkinImage(this, v));
                                }
                                else
                                {
                                    throw new ArgumentException();
                                }
                            }
                            else if (k.Last() == 'L')
                            {
                                if (k[k.Length - 2].IsDigit())
                                {
                                    currentColumn = k[k.Length - 2] - '0';
                                    ManiaSettings[currentKey].SkinImages.NoteImageL
                                    .SetForColumn(currentColumn, new ManiaSkinImage(this, v));
                                }
                                else
                                {
                                    throw new ArgumentException();
                                }
                            }
                            else if (k.Last() == 'T')
                            {
                                if (k[k.Length - 2].IsDigit())
                                {
                                    currentColumn = k[k.Length - 2] - '0';
                                    ManiaSettings[currentKey].SkinImages.NoteImageT
                                    .SetForColumn(currentColumn, new ManiaSkinImage(this, v));
                                }
                                else
                                {
                                    throw new ArgumentException();
                                }
                            }
                        }

                        if (line.Trim().StartsWith("StageLeft"))
                        {
                            ManiaSettings[currentKey].SkinImages.StageLeft = new ManiaSkinImage(this, v);
                        }
                        if (line.Trim().StartsWith("StageRight"))
                        {
                            ManiaSettings[currentKey].SkinImages.StageRight = new ManiaSkinImage(this, v);
                        }
                        if (line.Trim().StartsWith("StageHint"))
                        {
                            ManiaSettings[currentKey].SkinImages.StageHint = new ManiaSkinImage(this, v);
                        }
                        if (line.Trim().StartsWith("StageLight"))
                        {
                            ManiaSettings[currentKey].SkinImages.StageLight = new ManiaSkinImage(this, v);
                        }
                        if (line.Trim().StartsWith("LightingN"))
                        {
                            ManiaSettings[currentKey].SkinImages.LightingN = new ManiaSkinImage(this, v);
                        }
                        if (line.Trim().StartsWith("LightingL"))
                        {
                            ManiaSettings[currentKey].SkinImages.LightingL = new ManiaSkinImage(this, v);
                        }
                        if (line.Trim().StartsWith("WarningArrow"))
                        {
                            ManiaSettings[currentKey].SkinImages.WarningArrow = new ManiaSkinImage(this, v);
                        }
                        if (line.Trim().StartsWith("Hit0"))
                        {
                            SkinObjects.ManiaHitBurstImages.Hit0.Clear();
                            SkinObjects.ManiaHitBurstImages.Hit0.Add(new ManiaSkinImage(this, v));
                        }

                        if (line.Trim().StartsWith("Hit50"))
                        {
                            SkinObjects.ManiaHitBurstImages.Hit50.Clear();
                            SkinObjects.ManiaHitBurstImages.Hit50.Add(new ManiaSkinImage(this, v));
                        }

                        if (line.Trim().StartsWith("Hit100"))
                        {
                            SkinObjects.ManiaHitBurstImages.Hit100.Clear();
                            SkinObjects.ManiaHitBurstImages.Hit100.Add(new ManiaSkinImage(this, v));
                        }

                        if (line.Trim().StartsWith("Hit200"))
                        {
                            SkinObjects.ManiaHitBurstImages.Hit200.Clear();
                            SkinObjects.ManiaHitBurstImages.Hit200.Add(new ManiaSkinImage(this, v));
                        }

                        if (line.Trim().StartsWith("Hit300"))
                        {
                            SkinObjects.ManiaHitBurstImages.Hit300.Clear();
                            SkinObjects.ManiaHitBurstImages.Hit300.Add(new ManiaSkinImage(this, v));
                        }

                        if (line.Trim().StartsWith("Hit300g"))
                        {
                            SkinObjects.ManiaHitBurstImages.Hit300g.Clear();
                            SkinObjects.ManiaHitBurstImages.Hit300g.Add(new ManiaSkinImage(this, v));
                        }
                    }
                }
            }
        }
コード例 #6
0
        private void GetManiaSkinImages()
        {
            #region ManiaHitBurstImages

            var lst = SkinTools.GetMultipleFileSkinObject(_files, "mania-hit300g");
            if (lst.Count > 0)
            {
                foreach (var file in lst)
                {
                    SkinObjects.ManiaHitBurstImages.Hit300g.Add(new ManiaSkinImage(this, Path.GetFileName(file)));
                }
            }

            lst = SkinTools.GetMultipleFileSkinObject(_files, "mania-hit300");
            if (lst.Count > 0)
            {
                foreach (var file in lst)
                {
                    SkinObjects.ManiaHitBurstImages.Hit300.Add(new ManiaSkinImage(this, Path.GetFileName(file)));
                }
            }

            lst = SkinTools.GetMultipleFileSkinObject(_files, "mania-hit200");
            if (lst.Count > 0)
            {
                foreach (var file in lst)
                {
                    SkinObjects.ManiaHitBurstImages.Hit200.Add(new ManiaSkinImage(this, Path.GetFileName(file)));
                }
            }

            lst = SkinTools.GetMultipleFileSkinObject(_files, "mania-hit100");
            if (lst.Count > 0)
            {
                foreach (var file in lst)
                {
                    SkinObjects.ManiaHitBurstImages.Hit100.Add(new ManiaSkinImage(this, Path.GetFileName(file)));
                }
            }

            lst = SkinTools.GetMultipleFileSkinObject(_files, "mania-hit50");
            if (lst.Count > 0)
            {
                foreach (var file in lst)
                {
                    SkinObjects.ManiaHitBurstImages.Hit50.Add(new ManiaSkinImage(this, Path.GetFileName(file)));
                }
            }

            lst = SkinTools.GetMultipleFileSkinObject(_files, "mania-hit0");
            if (lst.Count > 0)
            {
                foreach (var file in lst)
                {
                    SkinObjects.ManiaHitBurstImages.Hit0.Add(new ManiaSkinImage(this, Path.GetFileName(file)));
                }
            }
            lst = SkinTools.GetMultipleFileSkinObject(_files, "comboburst-mania-");
            if (lst.Count > 0)
            {
                foreach (var file in lst)
                {
                    SkinObjects.ManiaComboBurstImages.ComboBurstImages.Add(new ManiaSkinImage(this, Path.GetFileName(file)));
                }
            }

            #endregion
        }