示例#1
0
        private void button3_Click(object sender, EventArgs e)
        {
            DistanceMeasures measure = distanceControl1.distDef;

            List <string> refStructures = new List <string>();

            dirName = textBox2.Text;

            try
            {
                if (textBox1.Text != null && textBox1.Text.Length > 5 && File.Exists(textBox1.Text))
                {
                    string[] tmp = textBox1.Text.Split(Path.DirectorySeparatorChar);
                    native = tmp[tmp.Length - 1];
                }

                currentV = 0;
                ResultsForm fr = new ResultsForm();
                Progress    pr = new Progress(this, fr);
                pr.Start();
                pr.Show();
                pr.Focus();
                pr.BringToFront();
                Thread startProg = new Thread(CalcStat);
                startProg.Start();
            }
            catch (Exception ex)
            {
                MessageBox.Show("Exception: " + ex.Message);
            }
        }
        private void CalcBtn_Click(object sender, EventArgs e)
        {
            Thread      start = new Thread(CalcIndex);
            ResultsForm frRes = new ResultsForm();
            Progress    prog  = new Progress(this, frRes);

            prog.Start();
            prog.Show();
            prog.Focus();
            prog.BringToFront();
            start.Start();
        }
示例#3
0
        public void Show(List <KeyValuePair <string, DataTable> > t)
        {
            if (t == null)
            {
                return;
            }
            Show(t[0]);

            for (int i = 1; i < t.Count; i++)
            {
                ResultsForm f = new ResultsForm();
                f.Show(t[i]);
            }
        }
示例#4
0
        private void fractionToolStripMenuItem_Click(object sender, EventArgs e)
        {
            List <ClusterOutput> oo = new List <ClusterOutput>();

            if (manager.clOutput == null || manager.clOutput.Count == 0)
            {
                MessageBox.Show("No data! Nothing to be done!");
                return;
            }

            foreach (var item in manager.clOutput)
            {
                oo.Add(item.Value);
            }

            FormFraction f = new FormFraction(oo[0].juryLike != null);

            DialogResult res = f.ShowDialog();

            if (res == DialogResult.OK)
            {
                Fraction    fr    = new Fraction(oo);
                ResultsForm frRes = new ResultsForm();
                Progress    prog  = new Progress(fr, frRes);
                prog.Start();
                prog.Show();
                prog.Focus();
                prog.BringToFront();
                Thread         startProg = new Thread(fr.GetFraction);
                fractionParams p;
                p.clustersNum   = f.consideredClusters;
                p.distance      = f.dist;
                p.distThreshold = f.distThreshold;
                p.profileName   = f.profileName;
                startProg.Start(p);
                // fr.GetFraction(f.dist,f.profileName,f.distThreshold,f.consideredClusters);
                //prog.Close();
            }
        }