* add new labels and buttons for records stantion console * add fingerprint fields for server * set buttons and updates for fingerPrints filters * set fingerprints filters * final set for finger prints filters * add new trhaslates for station records computer * some fix for the PR * refactor server side station record console system * add message for filters * add tranlates * add new ui with several filters * updetes prints with server side logic * resolve conflicts with DNA * resolve conflicts with DNA * deleted unused variable and rename some fields * added description for new state * added select for filter * set multiplay filters for the console * added new translates * add class filters & fixed issue with reset line edit * fix dublicate with set the selectId for option button * fixed review notes * fixed review notes forget changet fix name * add event TextEntered for better usability * fixed review notes 3 * fixed formating in xaml * fixed array with _filterTypes * fixed ui and made it in minimalistic style * fixed generalstationRecordFilter class, move method * delete margin after line edit * fix placeholder for lineEdit * fix placeholder for lineEdit, the review note * Revert "fixed generalstationRecordFilter class, move method" This reverts commit 1b35c6ac44e7dafe9a1f0560eb177152b822f20b. * impliment short swith in method IsSkippedRecord * fixed review notes, remaked method IsSkipped and fix casing * fixed the review note about check null record name
62 lines
2.2 KiB
C#
62 lines
2.2 KiB
C#
using Robust.Shared.Serialization;
|
|
|
|
namespace Content.Shared.StationRecords;
|
|
|
|
[Serializable, NetSerializable]
|
|
public enum GeneralStationRecordConsoleKey : byte
|
|
{
|
|
Key
|
|
}
|
|
|
|
/// <summary>
|
|
/// General station records console state. There are a few states:
|
|
/// - SelectedKey null, Record null, RecordListing null
|
|
/// - The station record database could not be accessed.
|
|
/// - SelectedKey null, Record null, RecordListing non-null
|
|
/// - Records are populated in the database, or at least the station has
|
|
/// the correct component.
|
|
/// - SelectedKey non-null, Record null, RecordListing non-null
|
|
/// - The selected key does not have a record tied to it.
|
|
/// - SelectedKey non-null, Record non-null, RecordListing non-null
|
|
/// - The selected key has a record tied to it, and the record has been sent.
|
|
///
|
|
/// - there is added new filters and so added new states
|
|
/// -SelectedKey null, Record null, RecordListing null, filters non-null
|
|
/// the station may have data, but they all did not pass through the filters
|
|
///
|
|
/// Other states are erroneous.
|
|
/// </summary>
|
|
[Serializable, NetSerializable]
|
|
public sealed class GeneralStationRecordConsoleState : BoundUserInterfaceState
|
|
{
|
|
/// <summary>
|
|
/// Current selected key.
|
|
/// </summary>
|
|
public StationRecordKey? SelectedKey { get; }
|
|
public GeneralStationRecord? Record { get; }
|
|
public Dictionary<StationRecordKey, string>? RecordListing { get; }
|
|
public GeneralStationRecordsFilter? Filter { get; }
|
|
public GeneralStationRecordConsoleState(StationRecordKey? key, GeneralStationRecord? record,
|
|
Dictionary<StationRecordKey, string>? recordListing, GeneralStationRecordsFilter? newFilter)
|
|
{
|
|
SelectedKey = key;
|
|
Record = record;
|
|
RecordListing = recordListing;
|
|
Filter = newFilter;
|
|
}
|
|
|
|
public bool IsEmpty() => SelectedKey == null
|
|
&& Record == null && RecordListing == null;
|
|
}
|
|
|
|
[Serializable, NetSerializable]
|
|
public sealed class SelectGeneralStationRecord : BoundUserInterfaceMessage
|
|
{
|
|
public StationRecordKey? SelectedKey { get; }
|
|
|
|
public SelectGeneralStationRecord(StationRecordKey? selectedKey)
|
|
{
|
|
SelectedKey = selectedKey;
|
|
}
|
|
}
|