public async Task <IActionResult> ConnectPen() { _penConnector.connectPen(); _penConnector.ClearImage(); ViewBag.Title = "Connecting..."; var id = Request.Path.ToString().Substring(Request.Path.ToString().LastIndexOf('/') + 1); AdminViewModel model = await DocumentDBRepository <AdminViewModel> .GetItemAsync(id); ViewBag.pdfURL = GetBlobSasUri(model.DocGuid); ViewBag.DocName = model.DocName; ViewBag.Id = model.Id; return(View("Client")); //return new EmptyResult(); }
/* Use a constructor to inject the services needed * */ public AppController(IMailService mailService, IHostingEnvironment environment, PenCommV1Callbacks penConnector, DocumentClient client) { _client = client; _penConnector = penConnector as PenConnector.PenConnector; _penConnector.ClearImage(); _hostingEnvironment = environment; _mailService = mailService; //_penConnector = new PenConnector.PenConnector(_hostingEnvironment); }
public IActionResult ClearImage() { if (_penConnector != null) { _penConnector.ClearImage(); } ViewBag.Title = "Clearing Image..."; return(RedirectToAction("Client", "App")); }
public PenController(IHostingEnvironment environment) { this._hostingEnvironment = environment; _penConnector = new PenConnector.PenConnector(_hostingEnvironment); _penConnector.ClearImage(); }