コード例 #1
0
ファイル: SpatialToolStrip.cs プロジェクト: osome/DotSpatial
 private void cmdPrint_Click(object sender, EventArgs e)
 {
     using (var layout = new LayoutForm())
     {
         layout.MapControl = Map as Map;
         layout.ShowDialog(this);
     }
 }
コード例 #2
0
ファイル: DefaultMenuBars.cs プロジェクト: rprouse/DotSpatial
        /// <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();
        }
コード例 #3
0
 private void cmdPrint_Click(object sender, EventArgs e)
 {
     using (var layout = new LayoutForm())
     {
         layout.MapControl = Map as Map;
         layout.ShowDialog(this);
     }
 }
コード例 #4
0
ファイル: MenuBarPlugin.cs プロジェクト: ExRam/DotSpatial-PCL
 /// <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();
     }
 }
コード例 #5
0
 /// <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();
 }
コード例 #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();
     }
 }
コード例 #7
0
 private void toolStripButton11_Click(object sender, EventArgs e)
 {
     DotSpatial.Controls.LayoutForm frm = new DotSpatial.Controls.LayoutForm();
     //frm.MapControl = map1;
     //frm.Show();
 }