예제 #1
0
 private void btnIncrement_Click(object sender, EventArgs e)
 {
     btnReset.Visible = true;
     WindowsViewModel.IncrementMuta(0.2f);
     WindowsViewModel.SetLayer(int.Parse(listBox1.SelectedItem.ToString()), trackBar3.Value);
     pictureBox1.Image = WindowsViewModel.Deseneaza(trackBar1.Value, trackBar2.Value);
 }
예제 #2
0
 private void trackBar1_Scroll(object sender, EventArgs e)
 {
     label1.Text       = "Nr Puncte=" + trackBar1.Value;
     trackBar2.Maximum = (int)Math.Floor((decimal)trackBar1.Value / 2);
     pictureBox1.Image = WindowsViewModel.Deseneaza(trackBar1.Value, trackBar2.Value);
     label2.Text       = "Linii=" + trackBar2.Value;
 }
예제 #3
0
 private void btnCuloare_Click(object sender, EventArgs e)
 {
     if (colorDialog1.ShowDialog() == DialogResult.OK)
     {
         WindowsViewModel.ChangeColor(new Pen(colorDialog1.Color));
         pictureBox1.Image = WindowsViewModel.Deseneaza(trackBar1.Value, trackBar2.Value);
     }
 }
예제 #4
0
 private void btnmuta2_Click(object sender, EventArgs e)
 {
     if (btnreset2.Visible == false)
     {
         btnreset2.Visible = true;
     }
     WindowsViewModel.IncrementMuta(0, 7.0f);
     pictureBox1.Image = WindowsViewModel.Deseneaza(trackBar1.Value, trackBar2.Value);
 }
예제 #5
0
 private void trackBar3_Scroll(object sender, EventArgs e)
 {
     label3.Text = "Distanta=" + trackBar3.Value + "(units)";
     if (listBox1.SelectedItem != null)
     {
         WindowsViewModel.SetLayer(int.Parse(listBox1.SelectedItem.ToString()), trackBar3.Value);
         pictureBox1.Image = WindowsViewModel.Deseneaza(trackBar1.Value, trackBar2.Value);
     }
 }
예제 #6
0
 private void trackBar2_Scroll(object sender, EventArgs e)
 {
     label2.Text = "Linii=" + trackBar2.Value;
     if (trackBar1.Value <= trackBar2.Value)
     {
         MessageBox.Show("Nu se pot trage mai multe linii decat uncte existante!");
     }
     else
     {
         pictureBox1.Image = WindowsViewModel.Deseneaza(trackBar1.Value, trackBar2.Value);
     }
 }
예제 #7
0
 private void trackBar1_Scroll(object sender, EventArgs e)
 {
     label1.Text = "Nr Puncte=" + trackBar1.Value;
     if (trackBar1.Value <= trackBar2.Value)
     {
         MessageBox.Show("Nu se pot trage mai multe linii decat puncte existante!");
     }
     else
     {
         pictureBox1.Image = WindowsViewModel.Deseneaza(trackBar1.Value, trackBar2.Value);
     }
     trackBar2.Maximum = (int)Math.Floor((decimal)trackBar1.Value / 2);
     label2.Text       = "Linii=" + trackBar2.Value;
 }
예제 #8
0
 private void btnreset2_Click(object sender, EventArgs e)
 {
     WindowsViewModel.ResetMuta(false, true);
     pictureBox1.Image = WindowsViewModel.Deseneaza(trackBar1.Value, trackBar2.Value);
     btnreset2.Visible = false;
 }
예제 #9
0
 private void listBox1_SelectedIndexChanged(object sender, EventArgs e)
 {
     trackBar1.Minimum = int.Parse(listBox1.SelectedItem.ToString());
     WindowsViewModel.SetLayer(int.Parse(listBox1.SelectedItem.ToString()), trackBar3.Value);
     pictureBox1.Image = WindowsViewModel.Deseneaza(trackBar1.Value, trackBar2.Value);
 }
예제 #10
0
 private void trackBar2_Scroll(object sender, EventArgs e)
 {
     label2.Text       = "Linii=" + trackBar2.Value;
     pictureBox1.Image = WindowsViewModel.Deseneaza(trackBar1.Value, trackBar2.Value);
 }