public void setEventStop(int index, EventHandler val)
        {
            StatusItems statusItems = (StatusItems)Windows[index];

            statusItems.EventStop = val;
            Windows[index]        = statusItems;
        }
        public void setDetails(int index, string val)
        {
            StatusItems statusItems = (StatusItems)Windows[index];

            statusItems.Details = val;
            Windows[index]      = statusItems;
        }
        public void setIcon(int index, Image val)
        {
            StatusItems statusItems = (StatusItems)Windows[index];

            statusItems.Icon = val;
            Windows[index]   = statusItems;
        }
        //???
        public void setShowStop(int index, bool val)
        {
            StatusItems statusItems = (StatusItems)Windows[index];

            statusItems.ShowStop = val;
            Windows[index]       = statusItems;
        }
        public void setShowProgress(int index, bool val)
        {
            StatusItems statusItems = (StatusItems)Windows[index];

            statusItems.ShowProgress = val;
            Windows[index]           = statusItems;
        }
        //update the name of a particular task
        public void setTask(int index, string val)
        {
            StatusItems statusItems = (StatusItems)Windows[index];

            statusItems.Task = val;
            Windows[index]   = statusItems;
        }
        //???
        public void setProgressStyle(int index, ProgressBarStyle val)
        {
            StatusItems statusItems = (StatusItems)Windows[index];

            statusItems.ProgressStyle = val;
            Windows[index]            = statusItems;
        }
        public void setProgress(int index, int val)
        {
            StatusItems statusItems = (StatusItems)Windows[index];

            statusItems.Progress = val;
            Windows[index]       = statusItems;
        }
 public int Add(StatusItems items)
 {
     Windows.Add(items);
     SwitchButton.Visible = (Windows.Count > 1);
     Next();
     return(Windows.Count - 1);
 }
 public void Refresh(int index)
 {
     if (index == Current)
     {
         StatusItems statusItems = (StatusItems)Windows[index];
         WindowLabel.Image   = statusItems.Icon;
         WindowLabel.Text    = statusItems.Task + Environment.NewLine + statusItems.Details;
         ProgressBAR.Visible = statusItems.ShowProgress;
         ProgressBAR.Style   = statusItems.ProgressStyle;
         ProgressBAR.Value   = statusItems.Progress;
         StopButton.Visible  = statusItems.ShowStop;
         StopButton.Click   += statusItems.EventStop;
     }
 }