Multiprocotol Terminalprogram (BAT)
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
MultiTerm/MultiTerm.Core/ViewModel/ICommunicationDataViewModel.cs

41 lines
1.3 KiB

using CommunityToolkit.Mvvm.Input;
using MultiTerm.Core.Types;
using System.Collections.ObjectModel;
namespace MultiTerm.Core.ViewModel;
public interface ICommunicationDataViewModel<T_Data, T_Raw> where T_Data : IDataViewModel
{
/// <summary>
/// Collection of data in context of a communication protocol.
/// </summary>
ObservableCollection<T_Data> Data { get; }
/// <summary>
/// String representation of <see cref="Data"/>.
/// </summary>
string DataAsString { get; }
/// <summary>
/// Collection of selected items of the <see cref="Data"/>.
/// May be set externally.
/// </summary>
ObservableCollection<T_Data> Selected { get; set; }
/// <summary>
/// Currently selected NewlineSeparator to group the <see cref="Data"/> into lines.
/// </summary>
NewlineSeparatorType NewlineSeparator { get; set; }
/// <summary>
/// Method to insert raw data into the <see cref="Data"/> Collection.
/// Also updates the <see cref="DataAsString"/> property.
/// </summary>
/// <param name="data">collection of new data to insert</param>
void HandleNewData(IEnumerable<T_Raw> data);
/// <summary>
/// Allows to clear the data.
/// </summary>
IRelayCommand ClearCommand { get; }
}