mirror of
https://github.com/corvax-team/ss14-wl.git
synced 2026-02-15 03:31:38 +01:00
* теперь факсам нужна бумага, чтоб копировать документы(и получать их) * очепяточка * фиксы от кодрэббита
100 lines
2.4 KiB
C#
100 lines
2.4 KiB
C#
using Robust.Shared.Serialization;
|
|
|
|
namespace Content.Shared.Fax;
|
|
|
|
[Serializable, NetSerializable]
|
|
public enum FaxUiKey : byte
|
|
{
|
|
Key
|
|
}
|
|
|
|
[Serializable, NetSerializable]
|
|
public sealed class FaxUiState : BoundUserInterfaceState
|
|
{
|
|
public string DeviceName { get; }
|
|
public Dictionary<string, string> AvailablePeers { get; }
|
|
public string? DestinationAddress { get; }
|
|
public bool IsPaperInserted { get; }
|
|
public bool CanSend { get; }
|
|
public bool CanCopy { get; }
|
|
|
|
// WL-Changes-start
|
|
public bool IsStorageOpen { get; }
|
|
public bool IsNotifyEnable { get; }
|
|
public int PapersInStorageCount { get; }
|
|
// WL-Changes-end
|
|
|
|
public FaxUiState(string deviceName,
|
|
Dictionary<string, string> peers,
|
|
bool canSend,
|
|
bool canCopy,
|
|
bool isPaperInserted,
|
|
string? destAddress,
|
|
/*WL-Changes-start*/
|
|
bool isStorageOpen,
|
|
bool isNotifyEnable,
|
|
int papersInStorageCount
|
|
/*WL-Changes-end*/)
|
|
{
|
|
DeviceName = deviceName;
|
|
AvailablePeers = peers;
|
|
IsPaperInserted = isPaperInserted;
|
|
CanSend = canSend;
|
|
CanCopy = canCopy;
|
|
DestinationAddress = destAddress;
|
|
|
|
// WL-Changes-start
|
|
IsStorageOpen = isStorageOpen;
|
|
IsNotifyEnable = isNotifyEnable;
|
|
PapersInStorageCount = papersInStorageCount;
|
|
// WL-Changes-end
|
|
}
|
|
}
|
|
|
|
[Serializable, NetSerializable]
|
|
public sealed class FaxFileMessage : BoundUserInterfaceMessage
|
|
{
|
|
public string? Label;
|
|
public string Content;
|
|
public bool OfficePaper;
|
|
|
|
public FaxFileMessage(string? label, string content, bool officePaper)
|
|
{
|
|
Label = label;
|
|
Content = content;
|
|
OfficePaper = officePaper;
|
|
}
|
|
}
|
|
|
|
public static class FaxFileMessageValidation
|
|
{
|
|
public const int MaxLabelSize = 50; // parity with Content.Server.Labels.Components.HandLabelerComponent.MaxLabelChars
|
|
public const int MaxContentSize = 10000;
|
|
}
|
|
|
|
[Serializable, NetSerializable]
|
|
public sealed class FaxCopyMessage : BoundUserInterfaceMessage
|
|
{
|
|
}
|
|
|
|
[Serializable, NetSerializable]
|
|
public sealed class FaxSendMessage : BoundUserInterfaceMessage
|
|
{
|
|
}
|
|
|
|
[Serializable, NetSerializable]
|
|
public sealed class FaxRefreshMessage : BoundUserInterfaceMessage
|
|
{
|
|
}
|
|
|
|
[Serializable, NetSerializable]
|
|
public sealed class FaxDestinationMessage : BoundUserInterfaceMessage
|
|
{
|
|
public string Address { get; }
|
|
|
|
public FaxDestinationMessage(string address)
|
|
{
|
|
Address = address;
|
|
}
|
|
}
|