private void AddDeviceToList(string drive, string status) { this.BeginInvoke(new MethodInvoker(delegate() { DriveStatusControl ctl = statusControls[drive[0]]; ctl.Reset(); ctl.Set(drive[0]); ctl.StatusMessage = status; })); }
private void ChangeDeviceTextFromList(char drive, string message, double status, int current, int count, Color newColor) { this.BeginInvoke(new MethodInvoker(delegate() { DriveStatusControl ctl = statusControls[drive]; ctl.StatusMessage = message; if (status >= 0) { ctl.Progress = status; ctl.Current = current; ctl.Count = count; } if (newColor != Color.Empty) { ctl.SignalColor = newColor; } })); }
/// <summary> /// Initializes a new instance of the <see cref="MainForm"/> class. /// </summary> /// <remarks>Documented by Dev08, 2008-10-08</remarks> public MainForm() { DoubleBuffered = true; InitializeComponent(); DriveStatusControl ctl; char[] letters = new char[] { 'D', 'E', 'F', 'G', 'H', 'I', 'J', 'K', 'L', 'M', 'N', 'O', 'P', 'Q', 'R', 'S', 'T', 'U', 'V', 'W', 'X', 'Y', 'Z', 'A', 'B' }; foreach (char c in letters) { ctl = new DriveStatusControl(); ctl.Drive = c; statusControls[c] = ctl; tableLayoutPanelStatus.Controls.Add(ctl); ctl.Dock = DockStyle.Fill; } textBoxInputFilePath.Text = Properties.Settings.Default.InputPath; Text += " V" + System.Reflection.Assembly.GetExecutingAssembly().GetName().Version.ToString(); }