Пример #1
0
        public MMEReports(MMEDataSet dataSet)
        {
            DataSet = dataSet;

            if (Directory.Exists(ReportsPath))
            {
                foreach (string file in Directory.EnumerateFiles(ReportsPath))
                {
                    MMEReport report = new MMEReport(ReportsPath, Path.GetFileName(file));
                    this.Add(report);
                }
            }
        }
Пример #2
0
        public MMEMovies(MMEDataSet parent)
        {
            DataSet = parent;

            if (!File.Exists(MovieInformationFilePath))
            {
                Comments = new List <string>();
            }
            else
            {
                LoadInformationFile();
            }
        }
Пример #3
0
        public MMEDocuments(MMEDataSet dataSet)
        {
            // TODO: refactor this function
            DataSet = dataSet;

            if (Directory.Exists(DocumentsPath))
            {
                foreach (string file in Directory.EnumerateFiles(DocumentsPath))
                {
                    MMEDocument document = new MMEDocument(DocumentsPath, Path.GetFileName(file));
                    this.Add(document);
                }
            }
        }
Пример #4
0
        public MMEChannels(MMEDataSet mME2Test)
        {
            DataSet = mME2Test;

            InitComments();
            InitAttributes();

            Clear();

            if (File.Exists(ChannelInformationFilePath))
            {
                LoadChannelsMetaData();
            }
        }
Пример #5
0
        public MMEDiagrams(MMEDataSet dataSet)
        {
            // TODO: refactor this function
            DataSet = dataSet;

            if (Directory.Exists(DiagramsPath))
            {
                foreach (string file in Directory.EnumerateFiles(DiagramsPath))
                {
                    MMEDiagram diagram = new MMEDiagram(DiagramsPath, Path.GetFileName(file));
                    this.Add(diagram);
                }
            }
        }
Пример #6
0
        public static MMEDataSet FromTDMS(string tdmsFilePath)
        {
            // TODO: refactor this function
            string fullFilePath = Path.GetFullPath(tdmsFilePath);

            MMEDataSet tdmsData = new MMEDataSet()
            {
                Name    = Path.GetFileNameWithoutExtension(fullFilePath),
                RootDir = Path.GetDirectoryName(fullFilePath)
            };

            tdmsData.Load();
            tdmsData.LoadTDMSChannels(fullFilePath);

            return(tdmsData);
        }