示例#1
0
        private void läggTillLåtToolStripMenuItem_Click(object sender, EventArgs e)
        {
            using (SongForm form = new SongForm())
            {
                if (form.ShowDialog() == DialogResult.OK)
                {
                    WorkoutPart part = (WorkoutPart)WorkoutTreeView.SelectedNode.Tag;

                    part.Songs.Add(form.WorkoutSong);

                    RefreshWorkout();
                }
            }
        }
示例#2
0
        private void EditSong(WorkoutSong workoutSong)
        {
            using (SongForm form = new SongForm())
            {
                form.WorkoutSong = workoutSong;
                form.LoadPlacement(workout);

                if (form.ShowDialog() == System.Windows.Forms.DialogResult.OK)
                {
                    WorkoutSong song = form.WorkoutSong;

                    workoutSong.Title = song.Title;
                    workoutSong.Artist = song.Artist;
                    workoutSong.Album = song.Album;
                    workoutSong.Bpm1 = song.Bpm1;
                    workoutSong.Bpm2 = song.Bpm2;
                    workoutSong.OriginalLength = song.OriginalLength;
                    workoutSong.FromTime = song.FromTime;
                    workoutSong.ToTime = song.ToTime;
                    workoutSong.Description = song.Description;
                    workoutSong.Manequins = song.Manequins;

                    RefreshWorkout();
                }
            }
        }