Пример #1
0
 public Upload(Classes.NetworkSession uptboxSession, Classes.NetworkSession megaSession, Classes.NetworkSession dropboxSession, Classes.NetworkSession unFichierSession, Classes.NetworkSession turbotBitSession, Logger logger)
 {
     this.uptboxSession    = uptboxSession;
     this.megaSession      = megaSession;
     this.dropboxSession   = dropboxSession;
     this.unFichierSession = unFichierSession;
     this.turbotBitSession = turbotBitSession;
     this.logger           = logger;
 }
Пример #2
0
        public MassUploader(Classes.NetworkAccount uptoboxAccount, Classes.NetworkAccount megaAccount, Classes.NetworkAccount dropboxAccount, Classes.NetworkAccount unFichierAccount,Classes.NetworkAccount turbotBitAccount, bool enableLogs, Enums.LogLevel logLevel)
        {
            if (enableLogs) logger = new Logger(logLevel);

            if (uptoboxAccount != null)
            {
                uptboxSession = new Classes.NetworkSession(uptoboxAccount);
                uptboxSession.NetworkStatus = Enums.NetworkStatus.Enabled;

                if (logger != null) logger.WriteLog("Build", $"Uptobox is enabled, {uptoboxAccount.Id}:{uptoboxAccount.Password}");
            }
            if (megaAccount != null)
            {
                megaSession = new Classes.NetworkSession(megaAccount);
                megaSession.NetworkStatus = Enums.NetworkStatus.Enabled;
                if (logger != null) logger.WriteLog("Build", $"MEGA is enabled, {megaAccount.Id}:{megaAccount.Password}");

            }
            if (dropboxAccount != null)
            {
                dropboxSession = new Classes.NetworkSession(dropboxAccount);
                dropboxSession.NetworkStatus = Enums.NetworkStatus.Enabled;
                if (logger != null) logger.WriteLog("Build", $"Dropbox is enabled, {dropboxAccount.Id}:{dropboxAccount.Password}");

            }
            if (unFichierAccount != null)
            {
                unFichierSession = new Classes.NetworkSession(unFichierAccount);
                unFichierSession.NetworkStatus = Enums.NetworkStatus.Enabled;
                if (logger != null) logger.WriteLog("Build", $"1Fichier is enabled, {unFichierAccount.Id}:{unFichierAccount.Password}");

            }
            if (turbotBitAccount != null)
            {
                turbotBitSession = new NetworkSession(turbotBitAccount);
                turbotBitSession.NetworkStatus = Enums.NetworkStatus.Enabled;
                if (logger != null) logger.WriteLog("Build", $"TurbotBit is enabled, {turbotBitAccount.Id}:{turbotBitAccount.Password}");

            }

            upload = new Processor.Upload(uptboxSession, megaSession, dropboxSession, unFichierSession,turbotBitSession, logger);

        }