Пример #1
0
        public MainWindow(string username, string password)
        {
            InitializeComponent();
            WindowStartupLocation     = WindowStartupLocation.CenterScreen;
            LstViewDrives.ItemsSource = _drives;
            this.Closing += new CancelEventHandler(MainWindow_Closing);
            _app          = new ApplicationManagement
            {
                Exit = () => Application.Current.Shutdown(-1),
                OpenDriveSettings = Show,
                ToggleMount       = ToggleMountDrive,
                UnmountAll        = UnmountAll
            };

            var logger = Utils.LogFactory.GetLogger("logger");

            _userConfig = new UserConfigHandler(username, password);
            var user = _userConfig.CreateOrDecrypUserConfig();

            _mounter = new Mounter.DriveMountManager(user, logger);
            user.Drives.ForEach(c => ShowDrive(c.Root[0]));
        }
Пример #2
0
 public static DriveNotifyIcon Create(char driveLetter, ApplicationManagement app)
 => new DriveNotifyIcon(driveLetter, app);
Пример #3
0
 DriveNotifyIcon(char driveLetter, ApplicationManagement app)
 {
     _app         = app;
     _driveLetter = driveLetter;
     SetupNotifyIcon();
 }