Esempio n. 1
0
 /// <summary>
 /// Unselect if the device is selected.
 /// </summary>
 /// <param name="device">The device that is to be unselected</param>
 public void deSelectDevice(usbDevice device)
 {
     device.BorderStyle=BorderStyle.None;
    // device.BackgroundImage = SmartSync.Properties.Resources.usbDevicebg;
 }
Esempio n. 2
0
        /// <summary>
        /// Loads a UsbDevice to the applications
        /// </summary>
        /// <param name="driveletter">The name of the drive</param>
        private void loadDevice(string driveletter)
        {
            try
            {
                usbDevice device = new usbDevice(driveletter, drives, serial);
                device.AllowDrop = true;
                device.DragEnter += device_DragEnter;
                device.DragDrop += device_DragDrop;
                device.Anchor = AnchorStyles.Left;
                device.Name = driveletter;
                int number = panel1.Controls.Count;
                
               // device.Location = new Point(2, number * 50);
                device.Margin = new System.Windows.Forms.Padding(5);
                //device.Width = 350;
                panel1.Controls.Add(device);

            }
            catch (Exception e)
            {
                Helper.WriteLog(e);
            }
        
           
        }