public CreateLocationSourceCommand(Panel userListContainer, DetectorFactory detectorFactory) { this.userListContainer = userListContainer; this.detectorFactory = detectorFactory; }
private void setDetector(int detectorIndex) { switch(detectorIndex) { case 0: this.detectorFactory = new MarkerBasedDetectorFactory(); break; case 1: this.detectorFactory = new ColorBasedDetectorFactory(); break; } this.detector = this.detectorFactory.CreateDetector(); }