Exemplo n.º 1
0
 private void PageRange(object sender, RoutedEventArgs e)
 {
     m_pages_setting = PrintPages_t.RANGE;
     if (RangeOK())
     {
         UpdatePageRange();
     }
 }
Exemplo n.º 2
0
        public Print(ghostnet_wpf_example.MainWindow main_in, int num_pages)
        {
            InitializeComponent();

            m_ps = new PrinterSettings();
            main = main_in;

            this.Closing += new System.ComponentModel.CancelEventHandler(FakeWindowClosing);
            InitializeComponent();
            m_printServer     = new LocalPrintServer();
            m_selectedPrinter = LocalPrintServer.GetDefaultPrintQueue();
            m_ps.PrinterName  = m_selectedPrinter.FullName;
            m_pagedetails     = m_ps.DefaultPageSettings;


            xaml_rbAll.IsChecked = true;
            m_pages_setting      = PrintPages_t.ALL;

            xaml_autofit.IsChecked = false;

            m_numpages = num_pages;

            m_printcap = m_selectedPrinter.GetPrintCapabilities();

            m_trans_pap = new TranslateTransform(0, 0);
            m_trans_doc = new TranslateTransform(0, 0);
            m_isrotated = false;

            /* Data range case */
            m_range_pages = new PrintRanges(m_numpages);
            m_page_scale  = 1.0;

            m_numcopies = 1;

            m_invalidTo   = true;
            m_invalidFrom = true;
            m_from        = -1;
            m_to          = -1;

            InitPrinterList();
        }
Exemplo n.º 3
0
 private void CurrentPage(object sender, RoutedEventArgs e)
 {
     m_pages_setting = PrintPages_t.CURRENT;
 }
Exemplo n.º 4
0
 private void AllPages(object sender, RoutedEventArgs e)
 {
     m_pages_setting = PrintPages_t.ALL;
 }