перенос файлов клиента из папки White в _White
This commit is contained in:
@@ -0,0 +1,63 @@
|
||||
using Content.Shared.White.Medical.BodyScanner;
|
||||
using JetBrains.Annotations;
|
||||
|
||||
namespace Content.Client._White.Medical.BodyScanner
|
||||
{
|
||||
[UsedImplicitly]
|
||||
public sealed class BodyScannerConsoleBoundUserInterface : BoundUserInterface
|
||||
{
|
||||
[ViewVariables]
|
||||
private BodyScannerConsoleWindow? _window;
|
||||
|
||||
public BodyScannerConsoleBoundUserInterface(EntityUid owner, Enum uiKey) : base(owner, uiKey)
|
||||
{
|
||||
}
|
||||
|
||||
protected override void Open()
|
||||
{
|
||||
base.Open();
|
||||
_window = new BodyScannerConsoleWindow();
|
||||
|
||||
_window.OnClose += Close;
|
||||
_window.OpenCentered();
|
||||
|
||||
_window.OnScanButtonPressed += () => StartScanning();
|
||||
_window.OnPrintButtonPressed += () => StartPrinting();
|
||||
}
|
||||
|
||||
protected override void UpdateState(BoundUserInterfaceState state)
|
||||
{
|
||||
base.UpdateState(state);
|
||||
|
||||
switch(state)
|
||||
{
|
||||
case BodyScannerConsoleBoundUserInterfaceState msg:
|
||||
_window?.UpdateUserInterface(msg);
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
public void StartScanning()
|
||||
{
|
||||
SendMessage(new BodyScannerStartScanningMessage());
|
||||
}
|
||||
|
||||
public void StartPrinting()
|
||||
{
|
||||
SendMessage(new BodyScannerStartPrintingMessage());
|
||||
}
|
||||
|
||||
protected override void Dispose(bool disposing)
|
||||
{
|
||||
base.Dispose(disposing);
|
||||
|
||||
if (!disposing)
|
||||
return;
|
||||
|
||||
if (_window != null)
|
||||
_window.OnClose -= Close;
|
||||
|
||||
_window?.Dispose();
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user