Ejemplo n.º 1
0
        /// <summary>
        /// Routine to open a file
        /// </summary>
        /// <param name="entry"></param>
        /// <param name="filename"></param>
        /// <returns></returns>
        private bool OpenFile(IBioDataProvider entry, string filename)
        {
            IBioDataLoader dataLoader = entry.Create(filename);

            if (dataLoader != null)
            {
                var dvm = new OpenBioDataViewModel(filename, entry.SupportedTypes, dataLoader, entry);
                dvm.Load();
                dvm.CloseRequest += OnDataSourceClosing;

                OpenDataSources.Add(dvm);
                return(true);
            }
            return(false);
        }