Example #1
0
        private void btnBrowse_Click(object sender, EventArgs e)
        {
            FirstTask f = new FirstTask();

            string[] path = f.showDialog();
            f.readFile(path[0], XnFF);
        }
        private void btnBrowse_Click(object sender, EventArgs e)
        {
            FirstTask f = new FirstTask();

            string[]     path = f.showDialog();
            FileStream   fs   = new FileStream(path[0], FileMode.Open);
            StreamReader sr   = new StreamReader(fs);

            while (sr.Peek() != -1)
            {
                string   tmp  = sr.ReadLine();
                string[] line = tmp.Split(',');
                string[] a    = line[0].Split('[');
                string[] t    = line[1].Split(']');
                amplitude.Add(double.Parse(a[1]));
                theta.Add(double.Parse(t[0]));
            }
            for (int i = 0; i < amplitude.Count; i++)
            {
                List <double> tmpXk = new List <double>();
                tmpXk.Add(amplitude[i] * Math.Cos(theta[i]));
                tmpXk.Add(amplitude[i] * Math.Sin(theta[i]));
                Xk.Add(tmpXk);
            }
        }
        private void btnBrowse_Click(object sender, EventArgs e)
        {
            FirstTask f = new FirstTask();

            string[] path = f.showDialog();
            f.readFile(path[0], x1);
            f.readFile(path[1], x2);
            for (int i = 0; i < x1.Count; i++)
            {
                result.Add(0);
            }
            for (int i = 0; i < x1.Count; i++)
            {
                KeyValuePair <double, double> tmp = new KeyValuePair <double, double>(i, x1[i]);
                pair.Add(tmp);
            }
        }
Example #4
0
 private void btnBrowse_Click(object sender, EventArgs e)
 {
     if (cmboxOperations.SelectedIndex == 0 || cmboxOperations.SelectedIndex == 1 || cmboxOperations.SelectedIndex == 3 || cmboxOperations.SelectedIndex == 5)
     {
         MessageBox.Show("Please Choose 2 Files", "Alert", MessageBoxButtons.OK);
         FirstTask f    = new FirstTask();
         string[]  path = f.showDialog();
         f.readFile(path[0], signal1);
         f.readFile(path[1], signal2);
     }
     else
     {
         MessageBox.Show("Please Choose only 1 File", "Alert", MessageBoxButtons.OK);
         FirstTask f    = new FirstTask();
         string[]  path = f.showDialog();
         f.readFile(path[0], signal1);
     }
 }
        private void btnBrowse_Click(object sender, EventArgs e)
        {
            FirstTask f = new FirstTask();

            string[]     path = f.showDialog();
            FileStream   fs   = new FileStream(path[0], FileMode.Open);
            StreamReader sr   = new StreamReader(fs);

            while (sr.Peek() != -1)
            {
                string        tmp  = sr.ReadLine();
                string[]      line = tmp.Split(',');
                List <double> t    = new List <double>();
                t.Add(double.Parse(line[0]));
                t.Add(double.Parse(line[1]));
                XkIFF.Add(t);
            }
            sr.Close();
            fs.Close();
        }
 private void btnBrowse_Click(object sender, EventArgs e)
 {
     string[] path = f.showDialog();
     f.readFile(path[0], x);
 }