void DrawingGrid() { RadarDraw radar = new RadarDraw(); pictureBoxTarget.BackgroundImage = radar.Grid(pictureBoxTarget.Width, pictureBoxTarget.Height, 15); pictureBoxTarget.Image = pictureBoxTarget.BackgroundImage; image = pictureBoxTarget.Image; GRAPH = Graphics.FromImage(image); }
private void PictureBoxTarget_Paint(object sender, PaintEventArgs e) { RadarDraw radar = new RadarDraw(); if (Airplane.StartAzimuth != oAD && Airplane.StartDistance != oAD) { radar.Point(e.Graphics, pictureBoxTarget.Width, pictureBoxTarget.Height, 15, Airplane.StartAzimuth, Airplane.StartDistance, "Начало координат"); } if (Airplane.EndAzimuth != oAD && Airplane.EndDistance != oAD) { radar.Point(e.Graphics, pictureBoxTarget.Width, pictureBoxTarget.Height, 15, Airplane.EndAzimuth, Airplane.EndDistance, "Конец координат"); } }
private void PictureBox1_Paint(object sender, PaintEventArgs e) { DoubleBuffered = true; e.Graphics.SmoothingMode = System.Drawing.Drawing2D.SmoothingMode.AntiAlias; RadarDraw radar = new RadarDraw(); e.Graphics.DrawString("Количество целей : " + Com.cons, new Font("Arial", 8), Brushes.White, 10, 10); e.Graphics.DrawString("Время " + DateTime.Now.Hour + " : " + DateTime.Now.Minute + " : " + DateTime.Now.Second.ToString(), new Font("Arial", 8), Brushes.White, 10, 25); if (ok == true) { a1 = 0; foreach (Air air in Com.air) { radar.His(e.Graphics, pictureBox1.Width, pictureBox1.Height, scale, CorX[a1], checkBox2.Checked, checkBox3.Checked, air.His, air.Namber, a, a1, sd); radar.Line(e.Graphics, pictureBox1.Width, pictureBox1.Height, scale, checkBox1.Checked, air.Lenght, air.XY, air.Trajectory); a1++; } } radar.Draw(e.Graphics, pictureBox1.Width, pictureBox1.Height, a, scale, on); }
private void TargetContinue(MouseEventArgs e) { RadarDraw RD = new RadarDraw(); //flag = false; float km = (((float)pictureBoxTarget.Height) / (15 * 10)) / 2; PointF point = new PointF(pictureBoxTarget.Width / 2, pictureBoxTarget.Height / 2); PolarCoordinate polar = new PolarCoordinate(); double[] ar = polar.Polar(point, e.X, e.Y); Airplane.EndAzimuth = ar[1]; Airplane.EndDistance = ar[0] / km; Point targetPoint = new Point(e.X, e.Y); string targetPointString = targetPoint.X.ToString() + ' ' + targetPoint.Y.ToString() + '\n'; //File.AppendAllText($"target{targetObjectNumber}.ini", targetPointString); list.Add(targetPoint); if (list.Count > 1) { RadarDraw.DrawLines(GRAPH, list); } textBoxEndAzimut.Text = Airplane.EndAzimuth.ToString(); textBoxEndDistance.Text = Airplane.EndDistance.ToString(); }
void DrawingGrid() { RadarDraw radar = new RadarDraw(); pictureBox1.Image = radar.Grid(pictureBox1.Width, pictureBox1.Height, scale); }
void DrawingGrid() { RadarDraw radar = new RadarDraw(); pictureBox1.BackgroundImage = radar.Grid(pictureBox1.Width, pictureBox1.Height, 15); }