Пример #1
0
        private void ReadFile(string fileName)
        {
            string[] lines = File.ReadAllLines(fileName);
            int      size  = lines.Count();

            UpdateScrollBar(size);

            if (size == 0)
            {
                MessageBox.Show("Error reading file " + fileName);
                return;
            }

            DataA      = new DataArrays(size + 1000);
            decomposer = ParseData(lines, DataA, 0);
            decomposer.CountViewArrays(lines.Length, Cfg.FilterOn);
            SetScale(size);
            foreach (GraphicsInfo gi in GInfoArr)
            {
                if (gi.Visible)
                {
                    gi.BufPanel.Refresh();
                }
            }
        }
Пример #2
0
 private ByteDecomposer ParseData(string[] lines, DataArrays a, int skip)
 {
     try
     {
         for (int i = skip; i < lines.Length; i++)
         {
             string[] s = lines[i].Split('\t');
             a.ECG1Array[i - skip]     = Convert.ToInt32(s[1]);
             a.ECG2Array[i - skip]     = Convert.ToInt32(s[2]);
             a.ReoArray[i - skip]      = Convert.ToInt32(s[3]);
             a.Sphigmo1Array[i - skip] = Convert.ToInt32(s[4]);
             a.Sphigmo2Array[i - skip] = Convert.ToInt32(s[5]);
             a.ApexArray[i - skip]     = Convert.ToInt32(s[6]);
         }
         var d = new ByteDecomposer(a);
         d.MainIndex = (uint)lines.Length;
         return(d);
     }
     catch (Exception)
     {
         MessageBox.Show("Invalid file format");
         return(null);
     }
 }
Пример #3
0
 private void InitArraysForFlow()
 {
     DataA      = new DataArrays(ByteDecomposer.DataArrSize);
     decomposer = new ByteDecomposer(DataA);
     decomposer.ConnectionBreakdown += ConnectionBreak;
 }