Beispiel #1
0
        /// <summary>
        /// 打印机管理
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        private void tsmiPrinter_Click(object sender, EventArgs e)
        {
            if (null == printerWindow || printerWindow.IsDisposed)
            {
                printerWindow            = new PrinterWindow();
                printerWindow.MdiParent  = this;
                printerWindow.StartLoad += (obj, ev) =>
                {
                    StartLoad(obj);
                };
                printerWindow.StopLoad += (obj, ev) =>
                {
                    StopLoad(obj);
                };
                printerWindow.ChangePrinter += (obj, ev) =>
                {
                    if (null != productWindow && !productWindow.IsDisposed)
                    {
                        productWindow.ReloadPrinters();
                    }
                };


                printerWindow.Show();
            }

            SetSelect(null, tsmiPrinter);
            printerWindow.Activate();
        }
 public PrinterDuplexService()
 {
     _window   = (PrinterWindow)App.Current.MainWindow;
     _Callback = OperationContext.Current.GetCallbackChannel <IPrinterDuplexServiceCallback>();
     PrinterManager.getInstance().PrinterDuplexServiceInstance = this;
 }