Пример #1
0
 public Renamer()
 {
     this.logger = new Logger();
     this.settings = new Settings(logger);
     this.fileSearcher = new FileSearcher(settings, logger);
     this.movieFileBot = new FileBot(settings, logger, true);
     this.seriesFileBot = new FileBot(settings, logger, false);
     this.cleaner = new Cleaner(settings, fileSearcher, logger);
     this.pathGenerator = new PathGenerator();
     this.fileMover = new FileMover(logger);
     this.cleaner = new Cleaner(settings, fileSearcher, logger);
     this.archiver = new Archiver(settings, fileMover);
 }
Пример #2
0
 private void applicationEvents_Archive(IArchiver sender)
 {
     sender.PushSection("main.form");
     try
     {
         sender.ArchiveProperty("Top", this, 50);
         sender.ArchiveProperty("Left", this, 50);
         sender.ArchiveProperty("Width", this, 500);
         sender.ArchiveProperty("Height", this, 500);
         sender.ArchiveProperty("Checked", this.acShowTools, true);
         tools.Archive(sender, "Tools");
     }
     finally { sender.PopSection(); }
 }
Пример #3
0
 private void applicationEvents_Archive(IArchiver sender)
 {
     sender.PushSection("main.form");         
     try
     {
         sender.ArchiveProperty("Top", this, 50);                
         sender.ArchiveProperty("Left", this, 50);
         sender.ArchiveProperty("Width", this, 600);
         sender.ArchiveProperty("Height", this, 400);
     }
     finally
     {
         sender.PopSection();
     }
 }
Пример #4
0
        static Archiver()
        {
            archiver = new SharpZip();

            /*try {
                archiver = new MiniSevenZip();
                return;
            }
            catch (Exception) { }
            try {
                archiver = new SevenZip();
                return;
            }
            catch (NullReferenceException) { }
            try {
                archiver = new WinRAR();
                return;
            }
            catch (NullReferenceException) { }*/
        }
Пример #5
0
 private void applicationEvents_Archive(IArchiver sender) {
   sender.PushSection( "Psl.Applications.ArchiverCluster" ) ;
   try {
     sender.ArchiveProperty( "ShowTools", acArchiverToolsVisible, "Checked", false ) ;
   } finally { sender.PopSection() ; }
 }
Пример #6
0
 /// <summary>
 /// Compléter l'initialisation du composant
 /// </summary>
 /// <remarks>
 /// Dans la majeure partie des cas, l'archiveur est déjà installé et enregistré dans le
 /// registre d'application lorsque le constructeur d'un composant ApplicationEvents est
 /// invoqué, de sorte que l'abonnement à l'archiveur pourrait être fait dans le constructeur.
 /// <br/>
 /// Il reste cependant le cas particulier de la fenêtre principale : si les plugins (dont l'archiveur)
 /// sont installés dans le constructeur de la fenêtre fincipale, un composant ApplicationEvents
 /// déposé sur la fenêtre principale sera initialisé avant l'installation du plugin d'archivage.
 /// D'où la nécessité de prévoir un complément d'installation dans l'événement ApplicationOpen.
 /// <br/>
 /// Mais, de manière à faire en sorte que la fenêtre principale soit toujours la première à 
 /// s'archiver, en particulier pour fixer les dimensions de la fenêtre principale, tous les
 /// composant ApplicationEvents s'abonnent à l'archiveur dans l'événement ApplicationOpen de
 /// sorte qu'ils s'abonnent à l'archiveur dans l'ordre où ils reçoivent l'événement ApplicationOpen,
 /// qui est en principe l'ordre de leur création.
 /// <br/>
 /// Il reste toutefois le cas des composants qui sont créés dynamiquement, à entendre ici
 /// comme créés pendant ou après le déclenchement de la méthode ApplicationState.OnOpen. 
 /// Pour ceux-là, l'événement ApplicationOpen ne se déclenchera pas (il est en cours ou il 
 /// est déjà passé), de sorte qu'il faut compléter l'enregistrement dans le constructeur 
 /// (d'où le test sur ApplicationState.IsCreate). 
 /// </remarks>
 private void TryFinishSubscriptions() {
   if ( archiver != null || !Registry.Has( MainKeys.KeyMainArchiver ) ) return;
   archiver = Registry.MainArchiver;
   archiver.Archive += new ArchiverEventHandler( OnArchive );
 }
Пример #7
0
 /// <summary>
 /// Déclenche les abonnés de l'événement local <see cref="Archive"/>. 
 /// </summary>
 /// <remarks>
 /// Handler de l'événement <see cref="IArchiver.Archive"/> de l'archiveur principal.
 /// </remarks>
 /// <param name="sender">Archiveur émetteur</param>
 protected virtual void OnArchive( IArchiver sender ) {
   if (Archive != null) Archive( sender ) ;
 }
Пример #8
0
 public Shtirlitz(IList<IReporter> reporters, IArchiver archiver, IList<ISender> senders)
 {
     this.reporters = reporters;
     this.archiver = archiver;
     this.senders = senders;
 }
Пример #9
0
 public void Setup()
 {
     _archiver = new Paq8lArchiver();
 }
Пример #10
0
 public ArchiverStage(string rootPath, string archiveFilename, IArchiver archiver, CancellationToken cancellationToken)
     : base(rootPath, Archiving, ArchivingType, cancellationToken, pc => archiver.Archive(rootPath, archiveFilename, cancellationToken, pc))
 {
 }
Пример #11
0
 public Archiver(IArchiver archiver)
 {
     Archiever = archiver;
 }
Пример #12
0
        private void NotifyArchiveTypes(IArchiver ar)
        {
            ar.NotifyType("CScript", typeof(Script));
            //			ar.NotifyType("CObList", typeof(CObList));
            ar.NotifyType("CCmdHighlightItem", typeof(CmdHighlightItem));
            ar.NotifyType("CIntegerParam", typeof(IntegerParam));
            ar.NotifyType("CRealParam", typeof(FloatParam));
            ar.NotifyType("CBooleanParam", typeof(BoolParam));
            ar.NotifyType("CStringParam", typeof(StringParam));
            ar.NotifyType("", typeof(CmdSoundClick));
            ar.NotifyType("", typeof(CmdBeep));
            ar.NotifyType("", typeof(CmdWait));
            ar.NotifyType("", typeof(CmdNormalItem));
            ar.NotifyType("", typeof(CmdFlashItem));
            ar.NotifyType("", typeof(CmdExec));
            ar.NotifyType("", typeof(CmdOpenApp));
            ar.NotifyType("", typeof(CmdParamApp));
            ar.NotifyType("", typeof(CmdAlternateApp));
            ar.NotifyType("", typeof(CmdSwitchToApp));
            ar.NotifyType("", typeof(CmdOpenDesktop));
            ar.NotifyType("", typeof(CmdSaveDesktop));
            ar.NotifyType("", typeof(CmdOpenSelectionSet));
            ar.NotifyType("", typeof(CmdOpenItemTemplateSet));
            ar.NotifyType("", typeof(CmdPreviousSelectionSet));
            ar.NotifyType("", typeof(CmdCloseSAW));
            ar.NotifyType("", typeof(CmdSetHideSAW));
            ar.NotifyType("", typeof(CmdPopupItem));
            ar.NotifyType("", typeof(CmdPopupLast));
            ar.NotifyType("", typeof(CmdPopupSave));
            ar.NotifyType("", typeof(CmdPopupRestore));
            ar.NotifyType("", typeof(CmdDisplayPromptText));
            ar.NotifyType("", typeof(CmdSawMove));
            ar.NotifyType("", typeof(CmdSawMoveToEdge));
            ar.NotifyType("", typeof(CmdSawSize));
            ar.NotifyType("", typeof(CmdOutText));
            ar.NotifyType("", typeof(CmdShowSAW));
            ar.NotifyType("", typeof(CmdPopupShow));
            ar.NotifyType("CEscapeItem", typeof(Item.EscapeItem));
            ar.NotifyType("CGroupItem", typeof(Item.GroupItem));
            ar.NotifyType("CItem", typeof(Item.LegacyItem));
            //ar.NotifyType("", typeof(WordPredictionControl));
            //ar.NotifyType("", typeof(GridControl));
            ar.NotifyType("", typeof(CmdKey));
            ar.NotifyType("", typeof(CmdKeyDelay));
            ar.NotifyType("CCmdSlowKey", typeof(CmdSlowKeys));
            ar.NotifyType("", typeof(CmdKeysOut));
            ar.NotifyType("", typeof(CmdMouseOut));
            ar.NotifyType("", typeof(CmdMouseMove));
            ar.NotifyType("", typeof(CmdMouseMoveTo));
            ar.NotifyType("", typeof(CmdGridScan));
            ar.NotifyType("", typeof(CmdSingle));
            ar.NotifyType("", typeof(CmdCoarse));
            ar.NotifyType("", typeof(CmdFine));
            ar.NotifyType("", typeof(CmdNormal));
            ar.NotifyType("", typeof(CmdContinuous));
            ar.NotifyType("", typeof(CmdStep));
            ar.NotifyType("", typeof(CmdAdjustMouse));
            ar.NotifyType("", typeof(CmdMessage));
            //ar.NotifyType("", typeof(CmdSet)); // bogus?
            ar.NotifyType("", typeof(CmdMoveTo));
            ar.NotifyType("", typeof(CmdMove));
            ar.NotifyType("", typeof(CmdSize));
            ar.NotifyType("", typeof(CmdWordListSet));
            ar.NotifyType("", typeof(CmdWordListSelect));
            ar.NotifyType("", typeof(CmdWordListScroll));
            ar.NotifyType("", typeof(CmdBladeSettings));
            ar.NotifyType("", typeof(CmdDockWindow));
            ar.NotifyType("", typeof(CmdLoadSettings));
            ar.NotifyType("", typeof(CmdSaveSettings));
            ar.NotifyType("", typeof(CmdOutTextOnOff));
            ar.NotifyType("", typeof(CmdAdjustScanTime));
            ar.NotifyType("", typeof(CmdAdjustRestart));
            ar.NotifyType("", typeof(CmdAdjustInputAcc));
            ar.NotifyType("", typeof(CmdAdjustPostAcc));
            ar.NotifyType("", typeof(CmdAdjustRepeatDelay));
            ar.NotifyType("", typeof(CmdAdjustRepeatTime));
            ar.NotifyType("", typeof(CmdPromptOnOff));
            ar.NotifyType("", typeof(CmdDDEExe));
            ar.NotifyType("", typeof(_CmdVisit.CmdVisitDown));
            ar.NotifyType("", typeof(_CmdVisit.CmdVisitFirst));
            ar.NotifyType("", typeof(_CmdVisit.CmdVisitItem));
            ar.NotifyType("", typeof(_CmdVisit.CmdVisitLast));
            ar.NotifyType("", typeof(_CmdVisit.CmdVisitMe));
            ar.NotifyType("", typeof(_CmdVisit.CmdVisitNext));
            ar.NotifyType("", typeof(_CmdVisit.CmdVisitPrevious));
            ar.NotifyType("", typeof(_CmdVisit.CmdVisitUp));
            ar.NotifyType("", typeof(CmdEditPredictionWords));
            ar.NotifyType("CCmdClickOnOff", typeof(CmdClickSoundOnOff));

            //ar.NotifyType("", typeof());
        }
Пример #13
0
 public InstancesController(ILogic logic, IMapper mapper, IArchiver archiver)
 {
     this.logic    = logic;
     this.mapper   = mapper;
     this.archiver = archiver;
 }
Пример #14
0
 public Facade(INotifier notifier, IPublisher publisher, IArchiver archiver)
 {
     _notifier  = notifier;
     _publisher = publisher;
     _archiver  = archiver;
 }
Пример #15
0
 public GZipApplication(Parameters parameters)
 {
     _archiver   = new GZipArchiver(Environment.ProcessorCount, Constants.MemoryPageSize * 1024);
     _parameters = parameters;
 }
Пример #16
0
 public ViberFileSender(File file, IArchiver archiver)
 {
     File     = file;
     Archiver = archiver;
 }
Пример #17
0
        private Archiver RegisterArchiver(IArchiver provider, FourPartVersion asmVersion, IHostApi request) {
            string name = null;
            try {
                FourPartVersion ver = provider.GetProviderVersion();
                var version = ver == 0 ? asmVersion : ver;
                name = provider.GetArchiverName();
                if (String.IsNullOrWhiteSpace(name)) {
                    return null;
                }

                // Initialize the provider before locking the collection
                // that way we're not blocking others on non-deterministic actions.
                request.Debug("Initializing provider '{0}'".format(name));
                provider.InitializeProvider(request.As<IRequest>());
                request.Debug("Provider '{0}' Initialized".format(name));

                lock (Archivers) {
                    if (Archivers.ContainsKey(name)) {
                        if (version > Archivers[name].Version) {
                            // remove the old provider first.
                            // todo: this won't remove the plugin domain and unload the code yet
                            // we'll have to do that later.

                            Archivers.Remove(name);
                        }
                        else {
                            return null;
                        }
                    }
                    request.Debug("Using Archiver Provider {0}".format(name));
                    var archiver = new Archiver(provider) {
                        Version = version,
                        IsLoaded = true
                    };

                    archiver.Initialize(request);
                    Archivers.AddOrSet(name, archiver);
                    return archiver;
                }
            }
            catch (Exception e) {
                request.Debug("Provider '{0}' Failed".format(name));
                e.Dump();
            }
            return null;
        }
		internal DecompressZipCommand(IArchiver archiver)
		{
			this.archiver = archiver;
		}
Пример #19
0
 /// <summary>
 /// Archivage de l'état du conteneur de rafting.
 /// </summary>
 /// <param name="sender">référence sur l'archiveur</param>
 /// <param name="key">clés sous laquelle les données d'archivage seront enregistrées</param>
 public void Archive( IArchiver sender, string key ) {
   if ( sender.IsReading )
     CellsToLayout( StringToCells( sender.ReadString( key, string.Empty ) ) );
   else
     sender.WriteString( key, CellsToString( LayoutToCells() ), string.Empty );
 }
Пример #20
0
 public ImageApi(IDockerClient dockerClient, IArchiver archiver, ILogger?logger)
 {
     _dockerClient = dockerClient;
     _archiver     = archiver;
     _logger       = logger;
 }