Ejemplo n.º 1
0
 public void TestSumarCalc()
 {
     Calc c = new Calc();
     int valor1 = 10;
     int valor2 = 10;
     int resultado = c.sumar(valor1, valor2);
     Assert.AreEqual(20, resultado);
 }
Ejemplo n.º 2
0
 private void calculationToolStripMenuItem_Click(object sender, EventArgs e)
 {
     Calc c = new Calc();
     c.getarrayimages(image, counter);
     c.ShowDialog();
     tabpag[counter] = new TabPage();
     PictureBox p = new PictureBox();
     p.Size = new Size(350, 350);
     p.SizeMode = PictureBoxSizeMode.Zoom;
     p.Image = c.returned_image.source;
     image[counter] = new ImageController();
     image[counter].ImageBitmap = c.returned_image.source;
     image[counter].ImageLockBitmap = new bufferedLockBitmap(c.returned_image.source);
     image[counter].ImageLockBitmap.LockBits();
     image[counter].ImageLockBitmap.UnlockBits();
     image[counter].ImageHigh = image[counter].ImageLockBitmap.Height;
     image[counter].ImageHigh = image[counter].ImageLockBitmap.Width;
     image[counter].PP36File = new PP36FileReading();
     image[counter].PP36File.namefile = "result" + counter.ToString();
     tabpag[counter].Controls.Add(p);
     tabpag[counter].Text = "Result image";
     tabControl1.TabPages.Add(tabpag[counter]);
     this.tabControl1.SelectedIndex = counter;
     counter++;
     his.zeros();
     his.drawing(image[tabControl1.SelectedIndex].ImageLockBitmap, this.chart1);
 }