예제 #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);
        }