/// <summary> /// This initializes the view model and generates the appropriate view. /// </summary> /// <param name="data"></param> /// <returns></returns> public override bool Initialize(IBioDataLoader data) { _data = data as IBioDataLoader <IAlignedBioEntity>; Debug.Assert(_data != null); if (_data == null) { return(false); } IBioDataLoaderProperties bioProps = data as IBioDataLoaderProperties; if (bioProps != null) { bioProps.PropertiesChanged += OnLoaderPropertiesChanged; } var allData = _data.Entities; TotalColumns = allData != null && allData.Count > 0 ? allData.Max(seq => (seq.AlignedData != null) ? seq.AlignedData.Count : 0) : 0; ReloadSequences(); FocusedRow = VisibleData[0]; if (SupportsGrouping && Options.OpenWithGrouping) { IsGrouped = true; } return(base.Initialize(data)); }
/// <summary> /// This is used to change the properties of a connection /// </summary> private void OnChangeProperties() { IBioDataLoaderProperties bioProps = _bioData.Loader as IBioDataLoaderProperties; if (bioProps != null) { bioProps.ChangeProperties(); } }