forked from roydejong/EscPosEmulator
-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathApp.xaml.cs
More file actions
25 lines (21 loc) · 654 Bytes
/
App.xaml.cs
File metadata and controls
25 lines (21 loc) · 654 Bytes
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
using System.Windows;
using ReceiptPrinterEmulator.Emulator;
using ReceiptPrinterEmulator.Networking;
namespace ReceiptPrinterEmulator
{
public partial class App : Application
{
public static ReceiptPrinter? Printer = null;
public static NetServer? Server = null;
private void App_OnStartup(object sender, StartupEventArgs e)
{
Printer = new ReceiptPrinter(PaperConfiguration.Default);
Server = new NetServer(1234);
_ = Server.Run();
}
private void App_OnExit(object sender, ExitEventArgs e)
{
Server?.Stop();
}
}
}