예제 #1
0
        public async void LoadData()
        {
            DataFiles.Clear();

            await Task.Run(delegate
            {
                try
                {
                    _subjectService.LoadSubjectData(DataFolder, _regionService.GetNodeCount());                      // TODO: Get the ROI number from somewhere else?!?

                    var subjects = _subjectService.GetSubjects();
                    foreach (var subject in subjects)
                    {
                        foreach (var graph in subject.Graphs)
                        {
                            var df       = IoC.Get <DataFileViewModel>();
                            df.Title     = graph.Value.DataSource;
                            df.SubjectId = subject.SubjectId;

                            DataFiles.Add(df);
                        }
                    }
                }
                catch (Exception)
                { }
            });
        }
예제 #2
0
 public override void HandlerThunkStr(string whence, string str)
 {
     if (Parent.FlushOnNextDataFile)
     {
         DataFiles.Clear();
         Parent.FlushOnNextDataFile = false;
     }
     DataFiles.Add(str);
 }
예제 #3
0
        private void readJsonDataFiles(JToken node, ReadingOptions options)
        {
            DataFiles.Clear();
            if (!options.DataFiles)
            {
                return;
            }
            JArray dataFilesArray = node.Value <JArray>("dataFiles");

            if (dataFilesArray == null)
            {
                return;
            }
            DataFiles.Capacity = dataFilesArray.Count;
            DataFiles.AddRange(dataFilesArray.Values <string>());
        }
예제 #4
0
        protected void readBinaryDataFiles(ArkArchive archive, bool dataFiles = true)
        {
            var count = archive.GetInt();

            if (dataFiles)
            {
                DataFiles.Clear();
                for (var n = 0; n < count; n++)
                {
                    DataFiles.Add(archive.GetString());
                }
            }
            else
            {
                for (var n = 0; n < count; n++)
                {
                    archive.SkipString();
                }
            }
        }
예제 #5
0
        private void readBinaryDataFiles(ArkArchive archive, ReadingOptions options)
        {
            int count = archive.ReadInt();

            DataFiles.Clear();
            if (options.DataFiles)
            {
                for (int n = 0; n < count; n++)
                {
                    DataFiles.Add(archive.ReadString());
                }
            }
            else
            {
                archive.HasUnknownData = true;
                for (int n = 0; n < count; n++)
                {
                    archive.SkipString();
                }
            }
        }