Exemple #1
0
 void doIdentToolStripMenuItem_Click(object sender, EventArgs e)
 {
     try
     {
         string[] arrName = new string[arrTranSmp.Length];
         for (int i = 0; i < arrName.Length; i++)
         {
             arrName[i] = arrTranSmp[i].GetName();
         }
         SelFactorForm sFormY = new SelFactorForm(arrName, null);
         if (sFormY.ShowDialog() != DialogResult.OK)
         {
             return;
         }
         SelFactorForm sFormX = new SelFactorForm(arrName,
                                                  "Выберете влияющий признак");
         if (sFormX.ShowDialog() != DialogResult.OK)
         {
             return;
         }
         int       indexX = sFormX.GetIndex(), indexY = sFormY.GetIndex();
         IdentForm iForm = new IdentForm(arrSmp[indexX],
                                         arrSmp[indexY]);
         if (iForm.ShowDialog() != DialogResult.OK)
         {
             return;
         }
         arrTranSmp[indexX] = new TranSample(arrSmp[indexX], iForm.GetTransform());
         lvSample.Items[indexX].SubItems[1].Text = iForm.GetTransform();
         arrTranSmp[indexX].DoHistogram(useSturgess);
     }
     catch { }
 }
Exemple #2
0
 void doIdentToolStripMenuItem_Click(object sender, EventArgs e)
 {
     try
     {
         string[] arrName = new string[arrTSmp.Length];
         for (int i = 0; i < arrName.Length; i++)
         {
             arrName[i] = arrTSmp[i].name;
         }
         SelFactorForm sFormY = new SelFactorForm(arrName, null);
         if (sFormY.ShowDialog() != DialogResult.OK)
         {
             return;
         }
         SelFactorForm sFormX = new SelFactorForm(arrName,
                                                  "Выберете влияющий признак");
         if (sFormX.ShowDialog() != DialogResult.OK)
         {
             return;
         }
         int       indexX = sFormX.index, indexY = sFormY.index;
         IdentForm iForm = new IdentForm(arrSmp[indexX],
                                         arrSmp[indexY]);
         if (iForm.ShowDialog() != DialogResult.OK)
         {
             return;
         }
         arrTSmp[indexX] = (Sample)arrSmp[indexX].Clone();
         arrTSmp[indexX].Transform(iForm.transform);
         lvSample.Items[indexX].SubItems[1].Text = iForm.transform;
     }
     catch { }
 }