Example #1
0
        private void BtnAdd_Click(object sender, EventArgs e)
        {
            string tmpstatus = LbStatus.Text;

            LbStatus.Text = "Adding";
            //open new file
            try
            {
                OpenFileDialog d = new OpenFileDialog
                {
                    Filter = "MP3 file|*.mp3",
                    Title  = "Choose file"
                };

                if (d.ShowDialog() == DialogResult.Cancel)
                {
                    LbStatus.Text = tmpstatus;
                    return;
                }

                TrackUC frm = Program.Editer.Add(d.FileName);
                frm.Location = new Point(0, 0);// GetBarHigh() + (frm.Size.Height + 6) * (Program.Editer.GetTrackCount() - 1));
                metroPanel1.VerticalScroll.Value   = metroPanel1.VerticalScroll.Maximum;
                metroPanel1.HorizontalScroll.Value = metroPanel1.HorizontalScroll.Minimum;
                metroPanel1.Controls.Add(frm);
                RefrechTracksPosiotions();
                //RefrechTrackbarWidth();
            }
            catch (Exception ex) { MessageBox.Show(ex.Message, "Error", MessageBoxButtons.OK, MessageBoxIcon.Error); }
            LbStatus.Text = tmpstatus;
        }
Example #2
0
 public Track(int id)
 {
     this.Info = new Dictionary <string, string>();
     this.id   = id;
     UI        = new TrackUC(id);
     UI.SetName("Track " + id);
     //UI.track = this;
 }