Ejemplo n.º 1
0
 public CreateProfile(String deviceID, USBBackup usb, MainWindow mw, USBListener usbl)
 {
     InitializeComponent();
     this.deviceID = deviceID;
     this.usb      = usb;
     this.mw       = mw;
     this.usbl     = usbl;
 }
Ejemplo n.º 2
0
 public MainWindow(USBBackup usb, USBListener usbListener)
 {
     InitializeComponent();
     availableDrives             = new List <DriveInfo>();
     this.usb                    = usb;
     this.usbListener            = usbListener;
     this.Shown                 += MainWindow_Shown;
     this.notifyIcon1.MouseMove += NotifyIcon1_MouseMove;
     this.FormClosing           += MainWindow_FormClosing;
 }
Ejemplo n.º 3
0
        static void Main(string[] args)
        {
            AppDomain.CurrentDomain.ProcessExit += new EventHandler(OnProcessExit);
            AttachConsole(ATTACH_PARENT_PROCESS);
            //USBBackup usb = new USBBackup(CURRENT_DIR);
            //foreach(SettingsFile p in usb.GetProfiles().Values)
            //{

            //}
            //USBListener usbl = new USBListener();
            //HashSet<string> temp = new HashSet<string>() { "#DB","Microsoft VS Code","MySQL","PrintScreen", "BscCompSci\\Year2\\DBDesignImplementation\\XAMPP" };
            //HashSet<string> temp2 = new HashSet<string>() {".png",".txt" };
            //usbl.Copy("C:\\Users\\Shaun\\Desktop\\test\\", "E:\\", temp,temp2);
            CURRENT_DIR = Path.GetDirectoryName(CURRENT_DIR);
            Log.WriteLine(CURRENT_DIR);

            USBBackup   usbBackup   = new USBBackup(CURRENT_DIR);
            USBListener usbListener = new USBListener();

            foreach (USBProfile p in usbBackup.GetActualProfiles())
            {
                usbListener.AddUSBProfile(p);
            }


            Application.EnableVisualStyles();
            MainWindow mw = new MainWindow(usbBackup, usbListener);

            Application.Run(mw);

            if (mw.meta.GetKeyBool("startMinimized", false))
            {
                mw.Hide();
            }

            //Log.Dump();
            Console.ReadLine();
        }
Ejemplo n.º 4
0
 public ProgressForm(USBListener usb)
 {
     InitializeComponent();
     this.usbListener = usb;
 }