Files
DP44/Common/DTS.Common/.svn/pristine/65/65594d6520a56e454ecf431feb38e48db2aa3d2d.svn-base

183 lines
7.6 KiB
Plaintext
Raw Normal View History

2026-04-17 14:55:32 -04:00
using System;
using System.Collections.Generic;
using System.Collections.ObjectModel;
using DTS.Common.Base;
using DTS.Common.Enums;
using DTS.Common.Enums.Sensors;
using DTS.Common.Enums.Sensors.SensorsList;
using DTS.Common.Interface.Channels;
using DTS.Common.Interface.Channels.ChannelCodes;
using DTS.Common.Interface.DataRecorders;
using DTS.Common.Interface.Groups.GroupList;
using DTS.Common.Interface.Pagination;
using DTS.Common.Interface.Sensors;
using DTS.Common.Interface.TestSetups.TestSetupsList;
namespace DTS.Common.Interface.Groups.GroupChannelList
{
/// <summary>
/// this class describes the view module for the group import module
/// this handles interaction betweens the views and the application, as well as
/// the logic and intermediate data for the module
/// </summary>
public interface IGroupChannelListViewModel : IBaseViewModel, IFilterableListView
{
IGroupChannelListView View { get; set; }
IGroupChannelSettingsListView SettingsView { get; set; }
/// <summary>
/// populates the channels to be displayed in views
/// </summary>
/// <param name="page"></param>
/// <param name="sensorLookup"></param>
/// <param name="hardwareLookup"></param>
/// <param name="channelDefaults"></param>
/// <returns></returns>
IDictionary<IGroup, Channels.IGroupChannel[]> PopulateChannels(object page,
IDictionary<int, ISensorData> sensorLookup,
IDictionary<int, IDASHardware> hardwareLookup,
IChannelSetting[] channelDefaults,
bool allowChannelDeletionByNonAdminUser = true,
bool userIsAdmin = true,
bool allowSensorPushAndPull = false,
bool keepExistingChannels = false,
bool allowChannelDeletionFromFixedGroup = true);
/// <summary>
/// whether voltage insertion channels should be created when dragging on an analog hardware channel onto
/// a blank channel with no sensor set yet
/// </summary>
bool CreateVoltageInputChannels { get; set; }
/// <summary>
/// Check to see if any of the channel's values that can be modified
/// in the Parameters step are different than the corresponding
/// sensor's values in the sensor database, so that they can be
/// decorated, along with the Parameters step (FB 15245)
/// </summary>
/// <param name="ch"></param>
/// <returns></returns>
bool CompareAndMarkChannelParameters(Channels.IGroupChannel ch);
/// <summary>
/// any work that needs to be done when a view is loaded
/// </summary>
void OnSetActive();
/// <summary>
/// any work that needs to be done when view is unloaded
/// </summary>
void Unset();
/// <summary>
/// filters content on the screen given a string term
/// </summary>
/// <param name="term"></param>
void Filter(string term);
/// <summary>
/// The format of a string double (usually "N2")
/// </summary>
string CapacityFormat { get; set; }
/// <summary>
/// All available channels [prior to filtering/searching/sorting]
/// </summary>
List<Channels.IGroupChannel> AllChannels { get; }
Func<IList<IChannelCode>> ChannelCodesFunc { get; }
/// <summary>
/// channels displayed in channel list view
/// </summary>
ObservableCollection<Channels.IGroupChannel> Channels { get; set; }
/// <summary>
/// channels display in settings view, essentially the same as channels
/// but snap-shot in onsetactive with just the blank channels removed
/// </summary>
ObservableCollection<Channels.IGroupChannel> SettingChannels { get; set; }
/// <summary>
/// indicates that the attached SettingsView has loaded
/// </summary>
bool SettingsViewLoaded { get; set; }
/// <summary>
/// indicates that the SettingChannel UI elements were created
/// </summary>
bool SettingChannelsLoaded { get; set; }
/// <summary>
/// group being viewed (when editing a group)
/// </summary>
IGroup Group { get; set; }
/// <summary>
/// test setup being viewed (when editing a test setup)
/// </summary>
ITestSetup TestSetup { get; set; }
//whether to always match the CFC to the iso code and vice versa
bool UseISOCodeFilterMapping { get; set; }
/// <summary>
/// sets which typeof channels are displayed by sensor type
/// </summary>
/// <param name="bridgeFilter"></param>
void SetFilter(PossibleFilters bridgeFilter);
/// <summary>
/// indicates whether to show isocodes
/// </summary>
bool ShowISOCodes { get; }
/// <summary>
/// indicates whether to show user codes
/// </summary>
bool ShowUserCodes { get; }
/// <summary>
/// indicates whether to show Dallas Id column or not
/// http://manuscript.dts.local/f/cases/31802/Add-Dallas-ID-column-to-quickcheckout
/// </summary>
bool ShowDallasIdColumn { get; set; }
/// <summary>
/// gets/sets what the iso view mode is
/// </summary>
IsoViewMode ISOViewMode { get; set; }
bool ShowISOStringBuilder { get; set; }
/// <summary>
/// gets/sets whether complete and unique isocodes are required
/// </summary>
bool UniqueISOCodesRequired { get; set; }
bool ShowChannelCodeLookupHelper { get; set; }
bool UseTestSetupOrder { get; }
bool ShowSensorChannelUserValues { get; set; }
void MoveDown(Channels.IGroupChannel[] channel);
void MoveBottom(Channels.IGroupChannel[] channel);
void MoveUp(Channels.IGroupChannel[] channel);
void MoveTop(Channels.IGroupChannel[] channel);
void Filter(PossibleFilters filter);
void AddChannels(DTS.Common.Interface.Sensors.SensorsList.IDragAndDropItem[] sensors);
void AddChannels(IHardwareChannel[] hardwareChannels);
void AddChannels(Channels.IGroupChannel[] groupChannels);
void Remove(Channels.IGroupChannel channel, bool notifyChanged = true);
IGroup CreateGroupIfNeeded(ITestSetup testSetup, string groupName);
//used to count channels for the label at the top of the view
void SetIncludedHardware(IDASHardware[] hardwares);
/// <summary>
/// modifies how meta data is handled when sensors are dragged onto channels without sensors
/// </summary>
bool ApplySensorDataToBlankChannels { get; set; }
bool AllowChannelDeletionByNonAdminUser { get; set; }
bool UserIsAdmin { get; set; }
bool AllowSensorPushAndPull { get; set; }
/// <summary>
/// sets the range of all analog sensors according to input
/// </summary>
/// <param name="option"></param>
void SetRange(CACOption option);
/// <summary>
/// sets the view (settings)
/// </summary>
/// <param name="columnTag"></param>
/// <param name="bUserClick"></param>
void Sort(object columnTag, bool bUserClick);
bool ReadOnlyParametersMode { get; set; }
bool ReadOnlyChannelsMode { get; set; }
int UserID { get; set; }
}
}