-
Notifications
You must be signed in to change notification settings - Fork 3
Expand file tree
/
Copy pathHelpers.cs
More file actions
33 lines (31 loc) · 1.02 KB
/
Helpers.cs
File metadata and controls
33 lines (31 loc) · 1.02 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
using System.Diagnostics;
namespace HerculesZeusDfeDemo
{
public static class Helpers
{
public static void AbrirXml(string xml)
{
string caminho = Path.GetTempPath() + Guid.NewGuid().ToString() + ".xml";
File.WriteAllText(caminho, xml);
ProcessStartInfo startInfo = new ProcessStartInfo
{
FileName = caminho,
UseShellExecute = true,
WindowStyle = ProcessWindowStyle.Maximized
};
Process.Start(startInfo);
}
public static void AbrirPdf(byte[] bytes)
{
string caminho = Path.GetTempPath() + Guid.NewGuid().ToString() + ".pdf";
File.WriteAllBytes(caminho, bytes);
ProcessStartInfo startInfo = new ProcessStartInfo
{
FileName = caminho,
UseShellExecute = true,
WindowStyle = ProcessWindowStyle.Maximized
};
Process.Start(startInfo);
}
}
}