Ejemplo n.º 1
0
        public MainForm()
        {
            //
            // The InitializeComponent() call is required for Windows Forms designer support.
            //
            InitializeComponent();

            //
            // TODO: Add constructor code after the InitializeComponent() call.
            //

            try {
                devmanager = new DevManager(Path.Combine(Application.StartupPath,FNAME));

                taskmanager = new TaskManager(devmanager);
                fillLbDrives();

                if (Application.UserAppDataRegistry.GetValue("Autostart") != null) {
                    checkBox1.Checked = true;
                }
            } catch (Exception e) {
                MessageBox.Show(e.ToString() + "\n" + e.Message, "Error",
                                MessageBoxButtons.OK, MessageBoxIcon.Error);
            }
        }
Ejemplo n.º 2
0
 public TaskManager(DevManager dm)
 {
     this.dm = dm;
     foreach (char drv in dm.drives) {
         if (Directory.Exists(drv + ":\\")) {
             ExecuteForDrive(drv);
         }
     }
 }