예제 #1
0
 private void cmdPrint_Click(object sender, EventArgs e)
 {
     using (var layout = new LayoutForm())
     {
         layout.MapControl = Map as Map;
         layout.ShowDialog(this);
     }
 }
예제 #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();
        }
예제 #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
 /// <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>
 /// 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();
     }
 }