示例#1
0
        public ActionResult InsertWord(TextStorageModel model)
        {
            IModeHandler service = new ModeHandler(new WordService(new FileWrapper()), new Validator(), new WordInverter());
            UserMode mode = UserMode.INSERT;
            var path = Path.Combine(Environment.CurrentDirectory, "SavedWords.txt");

            service.OrchestrateMode(mode, model.WordToStore);
           
            return View("Index");

            
        }
示例#2
0
文件: Program.cs 项目: MacFinn/Ve.Mac
 static void Main(string[] args)
 {
     IModeHandler service = new ModeHandler(new WordService(new FileWrapper()), new Validator(), new WordInverter());
     UserMode mode = GetMode();
     if (mode == UserMode.INSERT)
     {
         service.OrchestrateMode(mode, GetWord());  
     }
     else
     {
         service.OrchestrateMode(mode, "");  
     }
 }