public ActionResult AsciiMapPath(AsciiForm formData)
        {
            if (formData.AsciiMap == null || !ModelState.IsValid)
            {
                return(Json(new { ErrorMessage = "Txt file with ASCII map is required" }, @"application/json"));
            }

            var result = AsciiMapService.ProcessUploadedFile(formData.AsciiMap);

            return(Json(new { MapResult = result }, @"application/json"));
        }
예제 #2
0
        public void AsciiMapPath()
        {
            AsciiFormController controller = new AsciiFormController();
            AsciiForm           formData   = new AsciiForm()
            {
                AsciiMap = null
            };

            var result = controller.AsciiMapPath(formData);

            Assert.IsInstanceOfType(result, typeof(ActionResult));
        }
예제 #3
0
 public static void Run(AsciiForm asciiForm)
 {
     var app = new AsciiApplication(asciiForm);
 }
예제 #4
0
 private AsciiApplication(AsciiForm asciiForm)
 {
     m_asciiForm = asciiForm;
     m_asciiForm.Invalidate();
 }