コード例 #1
0
ファイル: SongProperties.cs プロジェクト: no1mann/Open-GHTCP
        public GH3Song GetSongWithChanges()
        {
            this.Song.title               = this.TitleTxt.Text;
            this.Song.artist              = this.ArtistTxt.Text;
            this.Song.year                = this.YearTxt.Text;
            this.Song.original_artist     = this.chkOriginal.Checked;
            this.Song.no_rhythm_track     = !this.chkRhythm.Checked;
            this.Song.keyboard            = this.chkKeyboard.Checked;
            this.Song.use_coop_notetracks = this.chkCoop.Checked;
            this.Song.not_bass            = this.rBtnRhythm.Checked;
            if (this.CustomTxtBtn.Checked)
            {
                this.Song.artist_text = this.ArtistTextBox.Text;
            }
            else
            {
                this.Song.artist_text = this.ByBtn.Checked;
            }
            this.Song.guitar_vol   = (float)this.GuitarVolBox.Value;
            this.Song.band_vol     = (float)this.BandVolBox.Value;
            this.Song.hammer_on    = (float)this.HammerOnBox.Value;
            this.Song.input_offset = (this.Song.gem_offset = (int)this.OffsetBox.Value);
            this.Song.singer       = (new string[]
            {
                "",
                "male",
                "female",
                "bret"
            })[this.SingerBox.SelectedIndex];
            this.Song.countoff = (string)this.CountOffBox.SelectedItem;
            this.Song.bassist  = (string)this.BassistBox.SelectedItem;
            string a;

            if ((a = (string)this.BossBox.SelectedItem) != null)
            {
                if (!(a == "Tom Morello Props"))
                {
                    if (!(a == "Slash Props"))
                    {
                        if (!(a == "Lou Props"))
                        {
                            if (a == "Joe Perry Props")
                            {
                                this.Song.boss = "boss_joe_props";
                            }
                        }
                        else
                        {
                            this.Song.boss = "boss_devil_props";
                        }
                    }
                    else
                    {
                        this.Song.boss = "boss_slash_props";
                    }
                }
                else
                {
                    this.Song.boss = "boss_tommorello_props";
                }
            }
            if (this.Song is GHASong)
            {
                GHASong song = (GHASong)this.Song;
                song.covered_by               = this.CoveredTxt.Text;
                song.singer_anim_pak          = this.SingAnimPakTxt.Text;
                song.band                     = (string)this.BandBox.SelectedItem;
                this.BPM8NoteBox.Value        = song.thin_fretbar_8note_params_high_bpm;
                this.AeroGuitaristBox.Checked = song.guitarist_checksum;
                this.PerryMicBox.Checked      = song.perry_mic_stand;
            }
            return(this.Song);
        }
コード例 #2
0
ファイル: SongProperties.cs プロジェクト: no1mann/Open-GHTCP
 public SongProperties(GH3Song song) : this(song.name)
 {
     this.Song = song;
     if (this.Song is GHASong)
     {
         this.BassistBox.Enabled = false;
         this.BossBox.Items.Add("Joe Perry Props");
         this.BossBox.Items.Add("Tom Morello Props");
     }
     else
     {
         this.AeroGroupBox.Enabled = false;
         this.SingerBox.Items.Add("Bret Michaels");
         this.BossBox.Items.Add("Tom Morello Props");
         this.BossBox.Items.Add("Slash Props");
         this.BossBox.Items.Add("Lou Props");
     }
     this.btnApply.Enabled    = true; // this.gh3Song_0.editable;
     this.TitleTxt.Text       = this.Song.title;
     this.ArtistTxt.Text      = this.Song.artist;
     this.YearTxt.Text        = this.Song.year;
     this.chkOriginal.Checked = this.Song.original_artist;
     this.chkRhythm.Checked   = !this.Song.no_rhythm_track;
     this.chkKeyboard.Checked = this.Song.keyboard;
     this.chkCoop.Checked     = this.Song.use_coop_notetracks;
     this.rBtnBass.Checked    = !(this.rBtnRhythm.Checked = this.Song.not_bass);
     if (this.Song.artist_text is bool)
     {
         this.FamousByBtn.Checked = !(this.ByBtn.Checked = (bool)this.Song.artist_text);
     }
     else
     {
         this.ArtistTextBox.Text   = (string)this.Song.artist_text;
         this.CustomTxtBtn.Checked = true;
     }
     this.GuitarVolBox.Value = (decimal)this.Song.guitar_vol;
     this.BandVolBox.Value   = (decimal)this.Song.band_vol;
     this.HammerOnBox.Value  = (decimal)this.Song.hammer_on;
     this.OffsetBox.Value    = this.Song.gem_offset;
     if (this.Song.singer.Equals(""))
     {
         this.SingerBox.SelectedIndex = 0;
     }
     else if (this.Song.singer.Equals("male"))
     {
         this.SingerBox.SelectedIndex = 1;
     }
     else if (this.Song.singer.Equals("female"))
     {
         this.SingerBox.SelectedIndex = 2;
     }
     else if (this.Song.singer.Equals("bret"))
     {
         this.SingerBox.SelectedItem = "Bret Michaels";
     }
     this.CountOffBox.SelectedItem = this.Song.countoff.ToLower();
     this.BassistBox.SelectedItem  = this.Song.bassist;
     if (this.Song.boss.Equals(""))
     {
         this.BossBox.SelectedIndex = 0;
     }
     else if (this.Song.boss.Equals("boss_tommorello_props"))
     {
         this.BossBox.SelectedItem = "Tom Morello Props";
     }
     else if (this.Song.boss.Equals("boss_slash_props"))
     {
         this.BossBox.SelectedItem = "Slash Props";
     }
     else if (this.Song.boss.Equals("boss_devil_props"))
     {
         this.BossBox.SelectedItem = "Lou Props";
     }
     else if (this.Song.boss.Equals("boss_joe_props"))
     {
         this.BossBox.SelectedItem = "Joe Perry Props";
     }
     if (this.AeroGroupBox.Enabled)
     {
         GHASong gHASong = (GHASong)this.Song;
         this.CoveredTxt.Text          = gHASong.covered_by;
         this.SingAnimPakTxt.Text      = gHASong.singer_anim_pak;
         this.BandBox.SelectedItem     = gHASong.band;
         this.BPM8NoteBox.Value        = gHASong.thin_fretbar_8note_params_high_bpm;
         this.AeroGuitaristBox.Checked = gHASong.guitarist_checksum;
         this.PerryMicBox.Checked      = gHASong.perry_mic_stand;
     }
 }