Exemplo n.º 1
0
        public WinMisc(IFingerprintUnitBuilder fingerprintUnitBuilder)
        {
            this.fingerprintUnitBuilder = fingerprintUnitBuilder;

            InitializeComponent();
            Icon = Resources.Sound;
        }
Exemplo n.º 2
0
        public WinDrawningTool(
            IAudioService audioService,
            ITagService tagService,
            IFingerprintUnitBuilder fingerprintUnitBuilder,
            IFingerprintingConfiguration fingerprintingConfiguration,
            IImageService imageService,
            ISpectrumService spectrumService)
        {
            this.audioService = audioService;
            this.tagService = tagService;
            this.fingerprintUnitBuilder = fingerprintUnitBuilder;
            this.fingerprintingConfiguration = fingerprintingConfiguration;
            this.imageService = imageService;
            this.spectrumService = spectrumService;

            InitializeComponent();
            Icon = Resources.Sound;

            _lbImageTypes.Items.Add("Single file");
            _lbImageTypes.Items.Add("Separated images");
        }
Exemplo n.º 3
0
        public WinDbFiller(
            IFingerprintUnitBuilder fingerprintUnitBuilder,
            ITagService tagService,
            IModelService modelService,
            ILSHService lshService)
        {
            this.modelService = modelService;
            this.lshService = lshService;
            this.fingerprintUnitBuilder = fingerprintUnitBuilder;
            this.tagService = tagService;
            InitializeComponent();
            Icon = Resources.Sound;
            foreach (object item in ConfigurationManager.ConnectionStrings)
            {
                _cmbDBFillerConnectionString.Items.Add(item.ToString());
            }

            if (_cmbDBFillerConnectionString.Items.Count > 0)
            {
                _cmbDBFillerConnectionString.SelectedIndex = 0;
            }

            _btnStart.Enabled = false;
            _btnStop.Enabled = false;
            _nudThreads.Value = MaxThreadToProcessFiles;
            _pbTotalSongs.Visible = false;
            hashAlgorithm = 0;
            _lbAlgorithm.SelectedIndex = 0; /*Set default algorithm LSH*/

            if (hashAlgorithm == HashAlgorithm.LSH)
            {
                _nudHashKeys.ReadOnly = false;
                _nudHashTables.ReadOnly = false;
            }

            string[] items = Enum.GetNames(typeof(StrideType)); /*Add enumeration types in the combo box*/
            _cmbStrideType.Items.AddRange(items);
            _cmbStrideType.SelectedIndex = 0;
            fileList = new List<string>();
        }
Exemplo n.º 4
0
 public Repository(IFingerprintUnitBuilder fingerprintUnitBuilder, IStorage storage, ICombinedHashingAlgoritm combinedHashingAlgorithm)
 {
     this.combinedHashingAlgorithm = combinedHashingAlgorithm;
     this.storage = storage;
     this.fingerprintUnitBuilder = fingerprintUnitBuilder;
 }
 public ModelServiceTest()
 {
     fingerprintUnitBuilder = DependencyResolver.Current.Get<IFingerprintUnitBuilder>();
     tagService = DependencyResolver.Current.Get<ITagService>();
     lshService = DependencyResolver.Current.Get<ILSHService>();
 }
 public FingerprintQueryBuilder(IFingerprintUnitBuilder fingerprintUnitBuilder, IQueryFingerprintService queryFingerprintService, IMinHashService minHashService)
 {
     this.fingerprintUnitBuilder = fingerprintUnitBuilder;
     this.queryFingerprintService = queryFingerprintService;
     this.minHashService = minHashService;
 }
 public void SetUp()
 {
     modelService = new ModelService(new MsSqlDatabaseProviderFactory(new DefaultConnectionStringFactory()), new ModelBinderFactory());
     fingerprintService = new FingerprintService(new FingerprintDescriptor(), new SpectrumService(new CachedFFTWService(new FFTWService86())), new WaveletService(new StandardHaarWaveletDecomposition()));
     defaultConfiguration = new DefaultFingerprintingConfiguration();
     var mockedPermutations = new Mock<IPermutations>();
     mockedPermutations.Setup(perms => perms.GetPermutations()).Returns(new int[1][]);
     permutations = mockedPermutations.Object;
     fingerprintUnitBuilderWithBass = new FingerprintUnitBuilder(fingerprintService, new BassAudioService(), new MinHashService(permutations));
     #pragma warning disable 612,618
     fingerprintUnitBuilderWithDirectSound = new FingerprintUnitBuilder(fingerprintService, new DirectSoundAudioService(), new MinHashService(permutations));
     #pragma warning restore 612,618
 }