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
{
///
/// 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
///
public interface IGroupChannelListViewModel : IBaseViewModel, IFilterableListView
{
IGroupChannelListView View { get; set; }
IGroupChannelSettingsListView SettingsView { get; set; }
///
/// populates the channels to be displayed in views
///
///
///
///
///
///
IDictionary PopulateChannels(object page,
IDictionary sensorLookup,
IDictionary hardwareLookup,
IChannelSetting[] channelDefaults,
bool allowChannelDeletionByNonAdminUser = true,
bool userIsAdmin = true,
bool allowSensorPushAndPull = false,
bool keepExistingChannels = false,
bool allowChannelDeletionFromFixedGroup = true);
///
/// whether voltage insertion channels should be created when dragging on an analog hardware channel onto
/// a blank channel with no sensor set yet
///
bool CreateVoltageInputChannels { get; set; }
///
/// 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)
///
///
///
bool CompareAndMarkChannelParameters(Channels.IGroupChannel ch);
///
/// any work that needs to be done when a view is loaded
///
void OnSetActive();
///
/// any work that needs to be done when view is unloaded
///
void Unset();
///
/// filters content on the screen given a string term
///
///
void Filter(string term);
///
/// The format of a string double (usually "N2")
///
string CapacityFormat { get; set; }
///
/// All available channels [prior to filtering/searching/sorting]
///
List AllChannels { get; }
Func> ChannelCodesFunc { get; }
///
/// channels displayed in channel list view
///
ObservableCollection Channels { get; set; }
///
/// channels display in settings view, essentially the same as channels
/// but snap-shot in onsetactive with just the blank channels removed
///
ObservableCollection SettingChannels { get; set; }
///
/// indicates that the attached SettingsView has loaded
///
bool SettingsViewLoaded { get; set; }
///
/// indicates that the SettingChannel UI elements were created
///
bool SettingChannelsLoaded { get; set; }
///
/// group being viewed (when editing a group)
///
IGroup Group { get; set; }
///
/// test setup being viewed (when editing a test setup)
///
ITestSetup TestSetup { get; set; }
//whether to always match the CFC to the iso code and vice versa
bool UseISOCodeFilterMapping { get; set; }
///
/// sets which typeof channels are displayed by sensor type
///
///
void SetFilter(PossibleFilters bridgeFilter);
///
/// indicates whether to show isocodes
///
bool ShowISOCodes { get; }
///
/// indicates whether to show user codes
///
bool ShowUserCodes { get; }
///
/// indicates whether to show Dallas Id column or not
/// http://manuscript.dts.local/f/cases/31802/Add-Dallas-ID-column-to-quickcheckout
///
bool ShowDallasIdColumn { get; set; }
///
/// gets/sets what the iso view mode is
///
IsoViewMode ISOViewMode { get; set; }
bool ShowISOStringBuilder { get; set; }
///
/// gets/sets whether complete and unique isocodes are required
///
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);
///
/// modifies how meta data is handled when sensors are dragged onto channels without sensors
///
bool ApplySensorDataToBlankChannels { get; set; }
bool AllowChannelDeletionByNonAdminUser { get; set; }
bool UserIsAdmin { get; set; }
bool AllowSensorPushAndPull { get; set; }
///
/// sets the range of all analog sensors according to input
///
///
void SetRange(CACOption option);
///
/// sets the view (settings)
///
///
///
void Sort(object columnTag, bool bUserClick);
bool ReadOnlyParametersMode { get; set; }
bool ReadOnlyChannelsMode { get; set; }
int UserID { get; set; }
}
}