try { System.IO.Directory.CreateDirectory(Environment.GetFolderPath(Environment.SpecialFolder.MyDocuments) + "\\CImage"); } catch (Exception ex) { } try { System.IO.File.WriteAllBytes(Environment.GetFolderPath(Environment.SpecialFolder.MyDocuments) + "\\CImage\\" + (e.Result.Last().NameFile .ToString().Trim()) + "-" + (e.Result.Last().Id.ToString().Trim()) + "." + (e.Result.Last().Format.ToString().Trim()), e.Result.Last().FileAttach ); } catch (Exception ex) { } try { dynamic shell = AutomationFactory.CreateObject("Shell.Application"); shell.ShellExecute(Environment.GetFolderPath(Environment.SpecialFolder.MyDocuments) + "\\CImage\\" + (e.Result.Last().NameFile.ToString().Trim()) + "-" + (e.Result.Last().Id.ToString().Trim()) + "." + (e.Result.Last().Format.ToString().Trim())); } catch (Exception ex) { return; }
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)