示例#1
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();
            }
        }
示例#2
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();
                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();
            }
        }