コード例 #1
0
ファイル: SettingManager.cs プロジェクト: moxlive/MoxGitHub
 public void ReadSettings(Settings setting)
 {
     setting.ScanBasePath = ReadSettingString(Settings.ScanBasePathStr);
         setting.OverviewFolderBasePath = ReadSettingString(Settings.OverviewFolderBasePathStr);
         setting.FrontPictureName = ReadSettingString(Settings.FrontPictureNameStr);
         setting.BackPictureName = ReadSettingString(Settings.BackPictureNameStr);
         setting.FrontPictureRotate = ReadSettingString(Settings.FrontPictureRotateStr);
         setting.BackPictureRotate = ReadSettingString(Settings.BackPictureRotateStr);
 }
コード例 #2
0
ファイル: MainViewModel.cs プロジェクト: moxlive/MoxGitHub
        internal MainViewModel(MainWindow control)
        {
            view = control;
            control.DataContext = this;
            workflowController = new WorkFlowController();
            workflowController.Initialize(PopulateMessage);
            setting = workflowController.Settings;
            manualPictureCombiner = workflowController.ManualPictureCombiner;

            ApplySettingCommand = new RelayCommand(ApplySettingCommand_Executed);
            FullScanCommand = new RelayCommand(FullScanCommand_Executed, CanDoFullScan);
        }
コード例 #3
0
ファイル: FolderScanner.cs プロジェクト: moxlive/MoxGitHub
        public void InitVisitors(Settings settings)
        {
            this.settings = settings;
            visitors = new List<FolderVisitor>();
            List<IFolderMatchRule> rules = new List<IFolderMatchRule>();

            //Raw Scans
            FolderNameMatchRule rule = new FolderNameMatchRule();
            rule.RuleName = "Raw Scans";
            rule.RegExpPattern = "RAW Scans";
            rules.Add(rule);
            visitors.Add(new FolderVisitor(rules, visitorKey_RawScan));

            //date folder
            FolderNameMatchRule rule2 = new FolderNameMatchRule();
            rule2.RuleName = "Date";
            //Reg expression for yyyymmdd
            rule2.RegExpPattern = "^(?:(?:(?:(?:(?:[13579][26]|[2468][048])00)|(?:[0-9]{2}(?:(?:[13579][26])|(?:[2468][048]|0[48]))))(?:(?:(?:09|04|06|11)(?:0[1-9]|1[0-9]|2[0-9]|30))|(?:(?:01|03|05|07|08|10|12)(?:0[1-9]|1[0-9]|2[0-9]|3[01]))|(?:02(?:0[1-9]|1[0-9]|2[0-9]))))|(?:[0-9]{4}(?:(?:(?:09|04|06|11)(?:0[1-9]|1[0-9]|2[0-9]|30))|(?:(?:01|03|05|07|08|10|12)(?:0[1-9]|1[0-9]|2[0-9]|3[01]))|(?:02(?:[01][0-9]|2[0-8])))))$";
            rules = new List<IFolderMatchRule>();
            rules.Add(rule2);
            visitors.Add(new FolderVisitor(rules, visitorKey_ScanDate));

            //customer sequence folder
            FolderNameMatchRule rule3 = new FolderNameMatchRule();
            rule3.RuleName = "CustomerSeqNumber";
            rule3.RegExpPattern = @"(\b)?\d+";
            rules = new List<IFolderMatchRule>();
            rules.Add(rule3);
            visitors.Add(new FolderVisitor(rules, visitorKey_CustomSeqNum));

            //scan sequence folder
            FolderNameMatchRule rule4 = new FolderNameMatchRule();
            rule4.RuleName = "ScanSeqNum";
            //start with number, letter in middle is ok, but not end with "_mask"
            rule4.RegExpPattern = @"(^\d+\w+)(?<!_mask)$";
            rules = new List<IFolderMatchRule>();
            rules.Add(rule4);
            visitors.Add(new FolderVisitor(rules, visitorKey_ScanSeqNum));

            WatchChange();

        }
コード例 #4
0
ファイル: FileWriter.cs プロジェクト: moxlive/MoxGitHub
 public FileWriter(Settings settings, IMessageDispatcher msg)
 {
     log = FileLogger.CreateLogger("FileWriter");
     msgDispatcher = msg;
     this.setting = settings;
 }
コード例 #5
0
 public WorkFlowController()
 {
     Settings = new Settings();
 }
コード例 #6
0
ファイル: SettingManager.cs プロジェクト: moxlive/MoxGitHub
 public void SaveSettings(Settings setting)
 {
     SaveSetting(Settings.ScanBasePathStr, setting.ScanBasePath);
         SaveSetting(Settings.OverviewFolderBasePathStr, setting.OverviewFolderBasePath);
         SaveSetting(Settings.FrontPictureNameStr, setting.FrontPictureName);
         SaveSetting(Settings.BackPictureNameStr, setting.BackPictureName);
         SaveSetting(Settings.FrontPictureRotateStr, setting.FrontPictureRotate);
         SaveSetting(Settings.BackPictureRotateStr, setting.BackPictureRotate);
 }