Esempio n. 1
0
        public void Driver(Previewer A, ChartValues <ObservablePoint> B, ChartValues <ObservablePoint> C)
        {
            foreach (Window window in Application.Current.Windows)
            {
                if (window.GetType() == typeof(Window1))
                {
                    (window as Window1).StatusBox.Text = (window as Window1).StatusBox.Text + "\n" + "Loading Data" + "\n";
                }
            }
            Char[][] qual1;
            A.fileselector();
            //qual1 = A.fileopener();
            //long avg = 0;
            //A.randomSampler();



            /*
             * for (int y = 0; y<100; y++)
             * {
             * for(int x = 0; x < 500; x++)
             *  {
             *      // I assume that its supposed to be
             *      // avg = avg + Convert.ToInt64(qual1[y][x]);
             *      avg = avg + Convert.ToInt64(qual1[x][y]);
             *  }
             *  avg = avg / 500;
             *  C.Add(new ObservablePoint(y,avg));
             *  foreach (Window window in Application.Current.Windows)
             *  {
             *      if (window.GetType() == typeof(Window1))
             *      {
             *          (window as Window1).StatusBox.Text = (window as Window1).StatusBox.Text + "\n" + "Average for nucleotide: " + y + " is "+ avg + "\n";
             *
             *      }
             *  }
             * }
             * String k = "";
             * for (int x = 0; x < 500; x++)
             * {
             *  for (int y = 0; y < 100; y++)
             *  {
             *      B.Add(new ObservablePoint(y, Convert.ToInt16(qual1[x][y])));
             *      k = k + qual1[x][y];
             *
             *  }
             *  foreach (Window window in Application.Current.Windows)
             *  {
             *      if (window.GetType() == typeof(Window1))
             *      {
             *          (window as Window1).StatusBox.Text = (window as Window1).StatusBox.Text + "\n" + "QualityString " + k + "\n";
             *
             *      }
             *  }
             *  k = "";
             *
             * }
             * //DataContext = this;
             */
        }
        private void Button_Click_1(object sender, RoutedEventArgs e)
        {
            Previewer pre = new Previewer(ValuesA, ValuesB, ValuesC, ValuesD);

            pre.runRandomSampler();
            DataContext = this;
            //ValuesA = selection.returnA();
            //ValuesB = selection.returnB();
        }