예제 #1
0
        public override void Call()
        {
            if (IsCanceled)
            {
                rename.Redo();
                return;
            }

            var tager = new Tager(new FileLoader());

            // _tager.Load(@"C:\Users\Alexandr\Desktop\TEST\песня.mp3");
            if (!tager.Load(Menu.GetUserInput("path:")))
            {
                throw new FileNotFoundException("File does not exist");
            }



            Menu.PrintHelp();



            rename = new Rename();
            rename.Call(new Mask(Menu.GetUserInput("mask:")), tager, tager.CurrentFile);
            rename.Save();



            Menu.PrintSuccessMessage();
        }
예제 #2
0
        public override void Call()
        {
            if (IsCanceled)
            {
                retag.Redo();
                return;
            }

            var tager = new Tager(new FileLoader());


            if (!tager.Load(Menu.GetUserInput("path:")))
            {
                throw new FileNotFoundException("File does not exist");
            }



            Menu.PrintHelp();
            Menu.PrintCurrentFile(tager.CurrentFile);



            var tags = GetTagsFromFileName(tager.CurrentFile);



            retag = new Retag();
            retag.Call(tags, tager);
            retag.Save();


            Menu.PrintSuccessMessage();
        }
예제 #3
0
 public void Sync(SyncPlan plan)
 {
     foreach (var item in plan)
     {
         if (_tager.Load(item.FilePath))
         {
             Sync(_tager.CurrentFile, item.Mask, item.Rule);
         }
         else
         {
             ErrorFiles.Add(item.FilePath, "load error");
         }
     }
 }
예제 #4
0
 public void LoadTest()
 {
     _testTager.Load("TEST");
     Assert.IsNotNull(_testTager.CurrentFile);
 }