JsonResult IDriver.Crop(string target, int x, int y, int width, int height)
 {
     FullPath path = ParsePath(target);
     RemoveThumbs(path);
     path.Root.PicturesEditor.Crop(path.File.FullName, x, y, width, height);
     var output = new ChangedResponse();
     output.Changed.Add((FileDTO)DTOBase.Create(path.File, path.Root));
     return Json(output);
 }
Esempio n. 2
0
 JsonResult IDriver.Rotate(string target, int degree)
 {
     FullPath path = ParsePath(target);
     RemoveThumbs(path);
     path.Root.PicturesEditor.Rotate(path.File.FullName, degree);
     var output = new ChangedResponse();
     output.Changed.Add((FileDTO)DTOBase.Create(path.File, path.Root));
     return Json(output);
 }
Esempio n. 3
0
 JsonResult IDriver.Put(string target, string content)
 {
     FullPath fullPath = ParsePath(target);
     ChangedResponse answer = new ChangedResponse();
     using (StreamWriter writer = new StreamWriter(fullPath.File.FullName, false))
     {
         writer.Write(content);
     }
     answer.Changed.Add((FileDTO)DTOBase.Create(fullPath.File, fullPath.Root));
     return Json(answer);
 }