Exemplo n.º 1
0
        public Form1()
        {
            InitializeComponent();

            theSong = new Song();

            theSong.SongName          = "Star Spangled Banner";
            theSong.ArtistName        = "Franscis Scott Key";
            theSong.AlbumName         = "Unknown";
            theSong.YearReleased      = 1814;
            theSong.DurationInSeconds = 133;
            theSong.TrackNumber       = 1;
            theSong.TrackCount        = 1;
            theSong.Genre             = "Contemporary";
            theSong.MyRating          = 5;

            textBox_SongName.Text          = theSong.SongName;
            textBox_ArtistName.Text        = theSong.ArtistName;
            textBox_AlbumName.Text         = theSong.AlbumName;
            textBox_YearReleased.Text      = Convert.ToString(theSong.YearReleased);
            textBox_DurationInSeconds.Text = Convert.ToString(theSong.DurationInSeconds);
            textBox_TrackNumber.Text       = Convert.ToString(theSong.TrackNumber);
            textBox_TrackCount.Text        = Convert.ToString(theSong.TrackCount);
            textBox_Genre.Text             = theSong.Genre;

            Text = theSong.GetTitle();

            switch (theSong.MyRating)
            {
            case 1:
                radioButton_Rating1.Checked = true;
                break;

            case 2:
                radioButton_Rating2.Checked = true;
                break;

            case 3:
                radioButton_Rating3.Checked = true;
                break;

            case 4:
                radioButton_Rating4.Checked = true;
                break;

            case 5:
                radioButton_Rating5.Checked = true;
                break;
            }
        }
Exemplo n.º 2
0
        public Form1()
        {
            InitializeComponent();

            theSong = new Song();

            theSong.SongName = "Star Spangled Banner";
            theSong.ArtistName = "Franscis Scott Key";
            theSong.AlbumName = "Unknown";
            theSong.YearReleased = 1814;
            theSong.DurationInSeconds = 133;
            theSong.TrackNumber = 1;
            theSong.TrackCount = 1;
            theSong.Genre = "Contemporary";
            theSong.MyRating = 5;

            textBox_SongName.Text = theSong.SongName;
            textBox_ArtistName.Text = theSong.ArtistName;
            textBox_AlbumName.Text = theSong.AlbumName;
            textBox_YearReleased.Text = Convert.ToString(theSong.YearReleased);
            textBox_DurationInSeconds.Text = Convert.ToString(theSong.DurationInSeconds);
            textBox_TrackNumber.Text = Convert.ToString(theSong.TrackNumber);
            textBox_TrackCount.Text = Convert.ToString(theSong.TrackCount);
            textBox_Genre.Text = theSong.Genre;

            Text = theSong.GetTitle();

            switch (theSong.MyRating)
            {
                case 1:
                    radioButton_Rating1.Checked = true;
                    break;
                case 2:
                    radioButton_Rating2.Checked = true;
                    break;
                case 3:
                    radioButton_Rating3.Checked = true;
                    break;
                case 4:
                    radioButton_Rating4.Checked = true;
                    break;
                case 5:
                    radioButton_Rating5.Checked = true;
                    break;
            }
        }
Exemplo n.º 3
0
        public FormSong(Song aSong)
        {
            InitializeComponent();

            theSong = aSong;

            textBox_SongName.Text          = theSong.SongName;
            textBox_ArtistName.Text        = theSong.ArtistName;
            textBox_AlbumName.Text         = theSong.AlbumName;
            textBox_YearReleased.Text      = Convert.ToString(theSong.YearReleased);
            textBox_DurationInSeconds.Text = Convert.ToString(theSong.DurationInSeconds);
            textBox_TrackNumber.Text       = Convert.ToString(theSong.TrackNumber);
            textBox_TrackCount.Text        = Convert.ToString(theSong.TrackCount);
            textBox_Genre.Text             = theSong.Genre;

            Text = theSong.GetTitle();

            switch (theSong.MyRating)
            {
            case 1:
                radioButton_Rating1.Checked = true;
                break;

            case 2:
                radioButton_Rating2.Checked = true;
                break;

            case 3:
                radioButton_Rating3.Checked = true;
                break;

            case 4:
                radioButton_Rating4.Checked = true;
                break;

            case 5:
                radioButton_Rating5.Checked = true;
                break;
            }
        }
Exemplo n.º 4
0
        public FormSong(Song aSong)
        {
            InitializeComponent();

            theSong = aSong;

            textBox_SongName.Text = theSong.SongName;
            textBox_ArtistName.Text = theSong.ArtistName;
            textBox_AlbumName.Text = theSong.AlbumName;
            textBox_YearReleased.Text = Convert.ToString(theSong.YearReleased);
            textBox_DurationInSeconds.Text = Convert.ToString(theSong.DurationInSeconds);
            textBox_TrackNumber.Text = Convert.ToString(theSong.TrackNumber);
            textBox_TrackCount.Text = Convert.ToString(theSong.TrackCount);
            textBox_Genre.Text = theSong.Genre;

            Text = theSong.GetTitle();

            switch (theSong.MyRating)
            {
                case 1:
                    radioButton_Rating1.Checked = true;
                    break;
                case 2:
                    radioButton_Rating2.Checked = true;
                    break;
                case 3:
                    radioButton_Rating3.Checked = true;
                    break;
                case 4:
                    radioButton_Rating4.Checked = true;
                    break;
                case 5:
                    radioButton_Rating5.Checked = true;
                    break;
            }
        }