コード例 #1
0
 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;
     }));
 }
コード例 #2
0
 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;
         }
     }));
 }
コード例 #3
0
ファイル: MainForm.cs プロジェクト: Stoner19/Memory-Lifter
        /// <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();
        }
コード例 #4
0
        /// <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();
        }