private void NewFrameMenuItem_Click(object sender, EventArgs e) { NewFrame newFrame = new NewFrame(); if (newFrame.ShowDialog() == DialogResult.OK) { XMLGenerator.StoreFrame(FrameNumber, drones, NumRows, NumCols); } }
/******************************************************************** * Initialization ********************************************************************/ public Form1() { InitializeComponent(); graphics = this.CreateGraphics(); NumRows = 0; NumCols = 0; DefaultRed = 255; DefaultGreen = 255; DefaultBlue = 255; FrameNumber = 0; PixelsPerMeter = 100; MetersBetweenDrones = 1; DroneSizeInMeters = .5; Dragging = false; previousCursorPos = new Point(); RefreshTimer = new System.Timers.Timer(16.0); RefreshTimer.Enabled = false; RefreshTimer.AutoReset = true; RefreshTimer.Elapsed += RefreshTimerElapsed; XMLGenerator.init(); }
private void SaveMenuItem_Click(object sender, EventArgs e) { XMLGenerator.StoreFrame(FrameNumber, drones, NumRows, NumCols); }