Exemplo n.º 1
0
        private void FixSplits()
        {
            int  index   = 1;
            bool changed = false;

            if (Settings.Autosplits.Count == 0)
            {
                Settings.Autosplits.Add(new Split()
                {
                    Name = "Auto Start", Type = SplitType.GameStart
                });
                changed = true;
            }
            else
            {
                Settings.Autosplits[0].Name = "Auto Start";
            }

            foreach (ISegment segment in State.Run)
            {
                if (index < Settings.Autosplits.Count)
                {
                    Split split = Settings.Autosplits[index++];
                    if (split.Name != segment.Name)
                    {
                        split.Name = segment.Name;
                        changed    = true;
                    }
                }
                else
                {
                    index++;
                    if (State.Run.Count == 4)
                    {
                        Settings.Autosplits.Add(new Split()
                        {
                            Name = segment.Name, Type = SplitType.Album, Value = "Any"
                        });
                    }
                    else
                    {
                        Settings.Autosplits.Add(new Split()
                        {
                            Name = segment.Name, Type = SplitType.Track, Value = "Any"
                        });
                    }
                    changed = true;
                }
            }

            while (index < Settings.Autosplits.Count)
            {
                Settings.Autosplits.RemoveAt(Settings.Autosplits.Count - 1);
                changed = true;
            }

            if (changed)
            {
                flowMain.SuspendLayout();
                flowMain.Controls.Clear();

                foreach (Split split in Settings.Autosplits)
                {
                    UserSplitSettings setting = new UserSplitSettings();
                    setting.UserSplit = split;
                    setting.UpdateControls(true);
                    flowMain.Controls.Add(setting);
                }

                flowMain.ResumeLayout(true);
            }
        }
Exemplo n.º 2
0
        private void CheckTrack(Split split)
        {
            SplitTrack track = Utility.GetEnumValue <SplitTrack>(split.Value);

            switch (track)
            {
            case SplitTrack.Any: CheckAlbumTrack(Album.Any, -1); break;

            case SplitTrack.Album1_1Intro: CheckAlbumTrack(Album.Subject4, 0); break;

            case SplitTrack.Album1_2HeatingUp: CheckAlbumTrack(Album.Subject4, 1); break;

            case SplitTrack.Album1_3KnockKnock: CheckAlbumTrack(Album.Subject4, 2); break;

            case SplitTrack.Album1_4FalseAlarm: CheckAlbumTrack(Album.Subject4, 3); break;

            case SplitTrack.Album1_5PowerDown: CheckAlbumTrack(Album.Subject4, 4); break;

            case SplitTrack.Album1_6LongShadows: CheckAlbumTrack(Album.Subject4, 5); break;

            case SplitTrack.Album1_7Ding: CheckAlbumTrack(Album.Subject4, 6); break;

            case SplitTrack.Album1_8BlownOut: CheckAlbumTrack(Album.Subject4, 7); break;

            case SplitTrack.Album2_1ToTheTop: CheckAlbumTrack(Album.HighRise, 0); break;

            case SplitTrack.Album2_2FullSwing: CheckAlbumTrack(Album.HighRise, 1); break;

            case SplitTrack.Album2_3AimHigh: CheckAlbumTrack(Album.HighRise, 2); break;

            case SplitTrack.Album2_4OverIt: CheckAlbumTrack(Album.HighRise, 3); break;

            case SplitTrack.Album2_5ConcreteJungle: CheckAlbumTrack(Album.HighRise, 4); break;

            case SplitTrack.Album2_6CircleBack: CheckAlbumTrack(Album.HighRise, 5); break;

            case SplitTrack.Album2_7LowPressure: CheckAlbumTrack(Album.HighRise, 6); break;

            case SplitTrack.Album2_8DownAndOut: CheckAlbumTrack(Album.HighRise, 7); break;

            case SplitTrack.Album3_1Contact: CheckAlbumTrack(Album.Fugue, 0); break;

            case SplitTrack.Album3_2Crossfire: CheckAlbumTrack(Album.Fugue, 1); break;

            case SplitTrack.Album3_3RedAlert: CheckAlbumTrack(Album.Fugue, 2); break;

            case SplitTrack.Album3_4Incoming: CheckAlbumTrack(Album.Fugue, 3); break;

            case SplitTrack.Album3_5FireInTheHole: CheckAlbumTrack(Album.Fugue, 4); break;

            case SplitTrack.Album3_6NoMansLand: CheckAlbumTrack(Album.Fugue, 5); break;

            case SplitTrack.Album3_7Fury: CheckAlbumTrack(Album.Fugue, 6); break;

            case SplitTrack.Album3_8BurnOut: CheckAlbumTrack(Album.Fugue, 7); break;

            case SplitTrack.Album4_1HoldFast: CheckAlbumTrack(Album.Adrift, 0); break;

            case SplitTrack.Album4_2RoughSeas: CheckAlbumTrack(Album.Adrift, 1); break;

            case SplitTrack.Album4_3NoQuarter: CheckAlbumTrack(Album.Adrift, 2); break;

            case SplitTrack.Album4_4HitTheDeck: CheckAlbumTrack(Album.Adrift, 3); break;

            case SplitTrack.Album4_5AbandonShip: CheckAlbumTrack(Album.Adrift, 4); break;

            case SplitTrack.Album4_6Wreck: CheckAlbumTrack(Album.Adrift, 5); break;

            case SplitTrack.Album4_7Outro: CheckAlbumTrack(Album.Adrift, 6); break;
            }
        }