private void button1_Click(object sender, EventArgs e) { work.SetNoise(trackBar1.Value * 5); for (int i = 0; i < box.Length; i++) { double[] res = net.getCluster(work.vectorsNoise[i]); for (int j = 0; j < res.Length; j++) { lbl[i][j].Text = (res[j] * 100.0).ToString("#0.00000") + "%"; } box[i].Image = WorkImage.Zoom(work.noiseList[i], 10); } }
private void button3_Click(object sender, EventArgs e) { FolderBrowserDialog folderBrowserDialog1 = new FolderBrowserDialog(); folderBrowserDialog1.RootFolder = Environment.SpecialFolder.Desktop; //= Directory.GetCurrentDirectory(); if (folderBrowserDialog1.ShowDialog() == DialogResult.OK) { work = new WorkImage(folderBrowserDialog1.SelectedPath); textBox1.Text = folderBrowserDialog1.SelectedPath; for (int i = 0; i < work.list.Count; i++) { PictureBox box = new PictureBox(); box.Size = SIZE_IMAGE; box.Location = new Point(IMAGE_X + (IMAGE_OFFSET + SIZE_IMAGE.Width) * (i + 1), IMAGE_Y); box.Image = WorkImage.Zoom(work.list[i], 10); panelOriginal.Controls.Add(box); } button2.Enabled = true; } }