private void 叠置分析ToolStripMenuItem_Click(object sender, EventArgs e) { OverlayForm overlayForm = new OverlayForm(); if (overlayForm.ShowDialog() == DialogResult.OK) { //获取输出文件路径 string strBufferPath = overlayForm.strOutputPath; //缓冲区图层载入到MapControl int index = strBufferPath.LastIndexOf("\\"); this.axMapControl3.AddShapeFile(strBufferPath.Substring(0, index), strBufferPath.Substring(index)); } }
private void selectWindowFromScreen() { if (notify) { NotifyIcon.BalloonTipText = "Select a window from screen to pin it on top. Press 'Esc' to exit."; NotifyIcon.ShowBalloonTip(1); notify = false; } var overlay = new OverlayForm(); overlay.TopMost = true; if (overlay.ShowDialog() == DialogResult.OK) { WinApi.SetWindowTopmost(overlay.SelectionHandle, true); } }
/// <summary> /// Show the overlay /// </summary> /// <param name="sender"></param> /// <param name="e"></param> private void launchToolStripMenuItem_Click(object sender, EventArgs e) { if (File.Exists(CurrentFile) && Path.GetExtension(CurrentFile) == ".dem" && CurrentFile != null) { using (var a = new OverlayForm(CurrentFile)) { var str = richTextBox1.Text; richTextBox1.Text = @"Overlay launched please switch to your game!"; a.ShowDialog(); richTextBox1.Text = str; } } else { MessageBox.Show(@"No file selected please select one to use the overlay!", @"Couldn't open overlay!", MessageBoxButtons.OK, MessageBoxIcon.Information); } }