示例#1
0
        private void AddJobToQueue(PlayoutJob job)
        {
            PlayoutItem item = new PlayoutItem(job);

            item.Width      = pnlQueue.Width - item.Margin.Left - item.Margin.Right;
            item.MouseDown += Item_MouseDown;

            pnlQueue.Controls.Add(item);
        }
示例#2
0
 public PlayoutItem(PlayoutJob job) : this()
 {
     m_job                 = job;
     lblTitle.Text         = job.Title;
     lblDescription.Text   = job.Description;
     btnStop.Enabled       = false;
     this.BackColor        = Color.LightGray;
     m_job.PlayingChanged += playing =>
     {
         this.Invoke((MethodInvoker) delegate
         {
             this.BackColor       = playing ? Color.LightGreen : Color.LightGray;
             this.btnStop.Enabled = playing;
             this.btnPlay.Enabled = !playing;
         });
     };
 }