Example #1
0
        public static void Main(string[] args)
        {
            if (Environment.Version.Major < 4)
            {
                MessageBox.Show("You need to install Microsoft .NET Framework Version 4 in order to use put.io mounter.");
                return;
            }

            WinMounter mounter = new WinMounter(WinMounter.GetAvailableDriveLetter('P'));

            AppDomain.CurrentDomain.UnhandledException += new UnhandledExceptionEventHandler(mounter.CrashLogger);
            //Application.EnableVisualStyles();
            //Application.SetCompatibleTextRenderingDefault(false);
            mounter.SettingsForm = new SettingsForm(mounter);
            mounter.MainWindow   = new MainWindow(mounter);
            mounter.MainWindow.InitializeTrayIcon();
            mounter.MainWindow.GoInvisible();
            mounter.Silent = args.Contains(@"/silent");

            try
            {
                mounter.TryMount(null, null);
                mounter.RefreshCacheSize();
                mounter.MainWindow.notify_icon.Visible = true;
                Application.Run();
                logger.Debug("Exiting.");
                mounter.MainWindow.notify_icon.Visible = false;
            }
            finally
            {
                PutioDokanOperations._DokanUnmount(mounter.DriveLetter);
            }
        }
Example #2
0
        public static void Main(string[] args)
        {
            if (Environment.Version.Major < 4)
            {
                MessageBox.Show("You need to install Microsoft .NET Framework Version 4 in order to use put.io mounter.");
                return;
            }

            WinMounter mounter = new WinMounter(WinMounter.GetAvailableDriveLetter('P'));
            AppDomain.CurrentDomain.UnhandledException += new UnhandledExceptionEventHandler(mounter.CrashLogger);
            //Application.EnableVisualStyles();
            //Application.SetCompatibleTextRenderingDefault(false);
            mounter.SettingsForm = new SettingsForm(mounter);
            mounter.MainWindow = new MainWindow(mounter);
            mounter.MainWindow.InitializeTrayIcon();
            mounter.MainWindow.GoInvisible();
            mounter.Silent = args.Contains(@"/silent");

            try
            {
                mounter.TryMount(null, null);
                mounter.RefreshCacheSize();
                mounter.MainWindow.notify_icon.Visible = true;
                Application.Run();
                logger.Debug("Exiting.");
                mounter.MainWindow.notify_icon.Visible = false;
            }
            finally
            {
                PutioDokanOperations._DokanUnmount(mounter.DriveLetter);
            }
        }
Example #3
0
        public static void _DokanMount(object _wm)
        {
            WinMounter           wm  = (WinMounter)_wm;
            DokanOptions         opt = new DokanOptions();
            PutioDokanOperations ops = new PutioDokanOperations(wm);

            opt.DebugMode   = false;
            opt.DriveLetter = ops.Mounter.DriveLetter;
            opt.ThreadCount = 5;
            opt.VolumeLabel = "put.io";
            // opt.NetworkDrive = true;
            DokanNet.DokanMain(opt, ops);
        }
Example #4
0
 public SettingsForm(WinMounter wm)
 {
     this.Mounter = wm;
     InitializeComponent();
     this.LoadUserInfo();
 }
Example #5
0
 public SettingsForm(WinMounter wm)
 {
     this.Mounter = wm;
     InitializeComponent();
     this.LoadUserInfo();
 }
Example #6
0
 public PutioDokanOperations(WinMounter wm)
 {
     this.Mounter = wm;
 }
Example #7
0
 public MainWindow(WinMounter wm)
 {
     this.Mounter = wm;
     InitializeComponent();
     this.AppContext = new ApplicationContext();
 }
Example #8
0
 public MainWindow(WinMounter wm)
 {
     this.Mounter = wm;
     InitializeComponent();
     this.AppContext = new ApplicationContext();
 }
Example #9
0
 public PutioDokanOperations(WinMounter wm)
 {
     this.Mounter = wm;
 }