public ManualPictureCombiner(PhotoModifier pm, FileWriter fw, IMessageDispatcher md) { log = FileLogger.CreateLogger("ManualPictureCombiner"); photoModifier = pm; fileWriter = fw; messageDispatcher = md; ChooseFrontPicCommand = new RelayCommand(() => { ChoosenFrontPicPath = UpdateChoosenFilePath() ?? ChoosenFrontPicPath; }); ChooseBackPicCommand = new RelayCommand(() => { ChoosenBackPicPath = UpdateChoosenFilePath() ?? ChoosenBackPicPath; }); ChooseOutputPicCommand = new RelayCommand(() => { ChoosenOutputPicPath = UpdateChoosenFilePath() ?? ChoosenOutputPicPath; }); CombinePicCommand = new RelayCommand(CombinePicture); }
public void Initialize(MessageProcessor messageHandler) { //ViewModel require Settings and ManualPictureCombiner this.SettingManager = new SettingManager(); SettingManager.ReadSettings(Settings); MessageDispatcher = new MessageDispatcher(); MessageDispatcher.MessageHandler += messageHandler; photoModifier = new PhotoModifier(Settings); fileWriter = new FileWriter(Settings, MessageDispatcher); ManualPictureCombiner = new ManualPictureCombiner(photoModifier, fileWriter, MessageDispatcher); FolderScanner = new FolderScanner(MessageDispatcher); FolderScanner.InitVisitors(Settings); FolderScanner.NewPhotoGoupHandler = HandlePictureGroup; }