перенос файлов клиента из папки White в _White

This commit is contained in:
Remuchi
2024-01-28 17:32:55 +07:00
parent c80b10a688
commit 21dbccfec9
139 changed files with 345 additions and 434 deletions

View File

@@ -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();
}
}
}