Exemplo n.º 1
0
 public void SetAnalysisParameters(Bitmap picture, AnalysisUI analysis)
 {
     histogram = (AnalysisHistogram)analysis;
     histogram.SetBitmap(picture);
     histogram.SetChart(analisisHistogram);
     histogram.Clear();
     histogram.SetHistogrammProperties();
 }
Exemplo n.º 2
0
        private void AnalisysThread(AnalysisUI hist)
        {
            SetAnalisysText("Analysis is started");
            AnalysisFormInterface form = (AnalysisFormInterface)Reflection.CreateObjectByName(hist.GetFormName());

            form.SetAnalysisParameters(new Bitmap(container.Image), hist);
            Application.Run((Form)form);
            SetAnalisysText("Analysis is over");
        }
Exemplo n.º 3
0
 private void Analisys_Click(object sender, EventArgs e)
 {
     if (container.Image == null)
     {
         analisysText.Text = "Picture is not set";
     }
     else
     {
         AnalysisUI hist      = (AnalysisUI)analysis.Clone();
         Thread     newThread = new Thread(parametrs => this.AnalisysThread(hist));
         newThread.Start();
     }
 }
Exemplo n.º 4
0
        private void analysisList_SelectedIndexChanged(object sender, EventArgs e)
        {
            ComboBox box = (ComboBox)sender;

            analysis = (AnalysisUI)Reflection.CreateObjectByName(analysisNames[box.SelectedIndex]);
            if (analysis.HasParameters())
            {
                setParameters(analysisParameters, analysis.AllParameters());
                analysis.ParametersReader(analysisParameters.SelectedItem.ToString());
                analysisParameters.Enabled = true;
            }
            else
            {
                analysisParameters.Items.Clear();
                analysisParameters.Items.Add("");
                analysisParameters.SelectedIndex = 0;
                analysisParameters.Enabled       = false;
            }
        }
Exemplo n.º 5
0
 public void SetAnalysisParameters(Bitmap picture, AnalysisUI analysis)
 {
     analysisPicture = (AnalysisPicture)analysis;
     analysisPicture.SetPicture(picture);
     analysisImage.Image = analysisPicture.CreateAnalysisPicture();
 }