Beispiel #1
0
 private void cmdPrint_Click(object sender, EventArgs e)
 {
     using (var layout = new LayoutForm())
     {
         layout.MapControl = Map as Map;
         layout.ShowDialog(this);
     }
 }
Beispiel #2
0
        /// <summary>
        /// Handles the Click event of the PrintLayout control.
        /// </summary>
        /// <param name="sender">The source of the event.</param>
        /// <param name="e">The <see cref="System.EventArgs"/> instance containing the event data.</param>
        private void PrintLayoutClick(object sender, EventArgs e)
        {
            // In Mono show the dialog only if printers installed else show error message.
            if (Mono.IsRunningOnMono())
            {
                if (!new PrinterSettings().IsValid)
                {
                    MessageBox.Show(Msg.NoPrintersInstalled, Msg.Error, MessageBoxButtons.OK, MessageBoxIcon.Error);
                    return;
                }
            }

            using var layout  = new LayoutForm();
            layout.MapControl = App.Map as Map;
            layout.ShowDialog();
        }
Beispiel #3
0
 private void cmdPrint_Click(object sender, EventArgs e)
 {
     using (var layout = new LayoutForm())
     {
         layout.MapControl = Map as Map;
         layout.ShowDialog(this);
     }
 }
Beispiel #4
0
 /// <summary>
 /// Handles the Click event of the PrintLayout control.
 /// </summary>
 /// <param name="sender">The source of the event.</param>
 /// <param name="e">The <see cref="System.EventArgs"/> instance containing the event data.</param>
 private void PrintLayout_Click(object sender, EventArgs e)
 {
     using (LayoutForm layout = new LayoutForm())
     {
         layout.MapControl = App.Map as Map;
         layout.ShowDialog();
     }
 }
 /// <summary>
 /// 打印地图
 /// </summary>
 /// <param name="sender"></param>
 /// <param name="e"></param>
 private void printMapToolStripMenuItem_Click(object sender, EventArgs e)
 {
     DotSpatial.Controls.LayoutForm frm = new DotSpatial.Controls.LayoutForm();
     frm.MapControl = map1;
     frm.Show();
 }
Beispiel #6
0
 /// <summary>
 /// Handles the Click event of the PrintLayout control.
 /// </summary>
 /// <param name="sender">The source of the event.</param>
 /// <param name="e">The <see cref="System.EventArgs"/> instance containing the event data.</param>
 private void PrintLayout_Click(object sender, EventArgs e)
 {
     // In Mono show the dialog only if printers installed else show error message.
     if (Mono.Mono.IsRunningOnMono())
     {
         if (!new PrinterSettings().IsValid)
         {
             MessageBox.Show("No printers installed.", "Error", MessageBoxButtons.OK, MessageBoxIcon.Error);
             return;
         }
     }
     using (var layout = new LayoutForm())
     {
         layout.MapControl = App.Map as Map;
         layout.ShowDialog();
     }
 }
Beispiel #7
0
 private void toolStripButton11_Click(object sender, EventArgs e)
 {
     DotSpatial.Controls.LayoutForm frm = new DotSpatial.Controls.LayoutForm();
     //frm.MapControl = map1;
     //frm.Show();
 }