예제 #1
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>();
        }
 public BoundedLSHService(ILSHService lshAlgorithm)
 {
     this.lshAlgorithm = lshAlgorithm;
 }
 public CombinedHashingAlgorithm(
     IMinHashService minHashService, ILSHService lshService)
 {
     this.minHashService = minHashService;
     this.lshService = lshService;
 }
 public ModelServiceTest()
 {
     fingerprintUnitBuilder = DependencyResolver.Current.Get<IFingerprintUnitBuilder>();
     tagService = DependencyResolver.Current.Get<ITagService>();
     lshService = DependencyResolver.Current.Get<ILSHService>();
 }