Esempio n. 1
0
 void openToolStripMenuItem_Click(object sender, EventArgs e)
 {
     try
     {
         ImportForm imForm = new ImportForm();
         if (imForm.ShowDialog() != DialogResult.OK)
         {
             return;
         }
         Sample[] arrSmp = imForm.GetSamples();
         DataForm daForm = new DataForm(arrSmp);
         if (daForm.ShowDialog() != DialogResult.OK)
         {
             return;
         }
         this.arrSmp = daForm.arrSmp;
         arrTSmp     = new Sample[arrSmp.Length];
         for (int i = 0; i < arrTSmp.Length; i++)
         {
             arrTSmp[i] = (Sample)arrSmp[i].Clone();
         }
         lvSample.Items.Clear();
         lvSample.SuspendLayout();
         foreach (Sample s in arrSmp)
         {
             lvSample.Items.Add(new ListViewItem(new string[] { s.name, "x" }));
         }
         lvSample.ResumeLayout();
     }
     catch { }
 }
Esempio n. 2
0
        void openToolStripMenuItem_Click(object sender, EventArgs e)
        {
            try
            {
                ImportForm imForm = new ImportForm();
                if (imForm.ShowDialog() != DialogResult.OK)
                {
                    return;
                }
                Sample[] arrSmp = imForm.GetSamples();
                DataForm daForm = new DataForm(arrSmp);
                if (daForm.ShowDialog() != DialogResult.OK)
                {
                    return;
                }
                this.arrSmp = daForm.GetSamples();
                foreach (Sample s in arrSmp)
                {
                    s.DoHistogram(useSturgess);
                }
                arrTranSmp = new TranSample[arrSmp.Length];
                for (int i = 0; i < arrTranSmp.Length; i++)
                {
                    arrTranSmp[i] = new TranSample(this.arrSmp[i], "Нет");
                    arrTranSmp[i].DoHistogram(useSturgess);
                }

                lvSample.Items.Clear();
                lvSample.SuspendLayout();
                foreach (Sample s in arrSmp)
                {
                    lvSample.Items.Add(new ListViewItem(new string[] { s.GetName(), "Нет" }));
                }
                lvSample.ResumeLayout();
            }
            catch { }
        }