Пример #1
5
 /// <summary>
 /// 打印信息的初始化
 /// </summary>
 /// <param datagrid="DataGridView">打印数据</param>
 /// <param PageS="int">纸张大小</param>
 /// <param lendscape="bool">是否横向打印</param>
 public PrintClass(DataGridView datagrid, int PageS, bool lendscape)
 {
     this.datagrid = datagrid;//获取打印数据
     this.PageSheet = PageS;//纸张大小
     printdocument = new PrintDocument();//实例化PrintDocument类
     pagesetupdialog = new PageSetupDialog();//实例化PageSetupDialog类
     pagesetupdialog.Document = printdocument;//获取当前页的设置
     printpreviewdialog = new PrintPreviewDialog();//实例化PrintPreviewDialog类
     printpreviewdialog.Document = printdocument;//获取预览文档的信息
     printpreviewdialog.FormBorderStyle = FormBorderStyle.Fixed3D;//设置窗体的边框样式
     //横向打印的设置
     if (PageSheet >= 0)
     {
         if (lendscape == true)
         {
             printdocument.DefaultPageSettings.Landscape = lendscape;//横向打印
         }
         else
         {
             printdocument.DefaultPageSettings.Landscape = lendscape;//纵向打印
         }
     }
     pagesetupdialog.Document = printdocument;
     printdocument.PrintPage += new PrintPageEventHandler(this.printdocument_printpage);//事件的重载
 }
Пример #2
0
 /// <summary>
 ///     Shows a PrintPreview dialog displaying the Tree control passed in.
 /// </summary>
 /// <param name="tree">TreeView to print preview</param>
 /// <param name="reportTitle"></param>
 public void PrintPreviewTree(TreeView tree, string reportTitle)
 {
     this.title = reportTitle;
     this.PrepareTreeImage(tree);
     var pp = new PrintPreviewDialog { Document = this.printDoc };
     pp.Show();
 }
        private void buttonPrintImage_Click(object sender, EventArgs e)
        {
            try
            {
                PrintDialog printDialog = new PrintDialog();
                printDialog.Document = this.printDocument1;
                if (printDialog.ShowDialog() != DialogResult.OK)
                {
                    throw new Exception();
                }
                /*
                PageSetupDialog pageSetupDialog = new PageSetupDialog();
                pageSetupDialog.Document = printDocument1;
                if (pageSetupDialog.ShowDialog() != DialogResult.OK)
                {
                    throw new Exception();
                }
                */
                PrintPreviewDialog printPreviewDialog = new PrintPreviewDialog();
                printPreviewDialog.Document = this.printDocument1;
                printPreviewDialog.ShowDialog();

            }
            catch (Exception)
            {
                MessageBox.Show("打印已经取消");
            }
        }
Пример #4
0
        public void printPreview(PrinteModel model)
        {
            if (model != null)
            {
                printModel = model;
            }
            else
            {
                return;
            }
            try
            {
                init();
                PrintPreviewDialog previewDialog = new PrintPreviewDialog();
                previewDialog.Document = docToPrint;
                var result = previewDialog.ShowDialog();
                if (result == DialogResult.OK)
                {
                    docToPrint.Print();
                }
            }
            catch (Exception ex)
            {

            }
        }
Пример #5
0
        public override void Execute()
        {
            printDocument = new PrintDocument();

            printDocument.OriginAtMargins = true;
            printDocument.BeginPrint     += new PrintEventHandler(printDocument_BeginPrint);
            printDocument.PrintPage      += new PrintPageEventHandler(printDocument_PrintPage);

            Dictionary <String, Object> paperSettings = Printing.getPaperSettings(grtArguments);

            printDocument.DefaultPageSettings.Landscape = (string)paperSettings["orientation"] == "landscape";

            // Sizes must be given in inch * 100 (sigh).
            int       paperWidth  = (int)Math.Round((double)paperSettings["width"] / 0.254);
            int       paperHeight = (int)Math.Round((double)paperSettings["height"] / 0.254);
            PaperSize paperSize   = new PaperSize("Ignored anyway", paperWidth, paperHeight);

            if ((bool)paperSettings["marginsSet"])
            {
                printDocument.DefaultPageSettings.Margins =
                    new Margins((int)paperSettings["marginLeft"], (int)paperSettings["marginRight"],
                                (int)paperSettings["marginTop"], (int)paperSettings["marginBottom"]);
            }

            System.Windows.Forms.PrintPreviewDialog preview = new System.Windows.Forms.PrintPreviewDialog();

            preview.Document     = printDocument;
            preview.UseAntiAlias = true;

            preview.ShowDialog();
        }
Пример #6
0
 /// <summary>
 /// Shows the print preview dialog</summary>
 public void ShowPrintPreviewDialog()
 {
     PrintPreviewDialog dialog = new PrintPreviewDialog();
     PrintDocument printDocument = GetPrintDocument();
     dialog.Document = printDocument;
     dialog.ShowDialog();
 }
Пример #7
0
		private void filePrintPreviewMenuItem_Click(Object sender , 
			EventArgs e) 
		{
			PrintPreviewDialog dlg = new PrintPreviewDialog();
			dlg.Document = printDoc;
			dlg.ShowDialog();
		}
Пример #8
0
        /// <summary>
        /// A utility method to print preview and print an Aspose.Words document.
        /// </summary>
        internal static void Execute(Document document)
        {
            // This operation can take some time (for the first page) so we set the Cursor to WaitCursor.
            Cursor cursor = Cursor.Current;
            Cursor.Current = Cursors.WaitCursor;

            PrintPreviewDialog previewDlg = new PrintPreviewDialog();

            // Initialize the Print Dialog with the number of pages in the document.
            PrintDialog printDlg = new PrintDialog();
            printDlg.AllowSomePages = true;
            printDlg.PrinterSettings = new PrinterSettings();
            printDlg.PrinterSettings.MinimumPage = 1;
            printDlg.PrinterSettings.MaximumPage = document.PageCount;
            printDlg.PrinterSettings.FromPage = 1;
            printDlg.PrinterSettings.ToPage = document.PageCount;

            // Restore cursor.
            Cursor.Current = cursor;

            // Interesting, but PrintDialog will not show and will always return cancel
            // if you run this application in 64-bit mode.
            if (!printDlg.ShowDialog().Equals(DialogResult.OK))
                return;

            // Create the Aspose.Words' implementation of the .NET print document
            // and pass the printer settings from the dialog to the print document.
            AsposeWordsPrintDocument awPrintDoc = new AsposeWordsPrintDocument(document);
            awPrintDoc.PrinterSettings = printDlg.PrinterSettings;

            // Pass the Aspose.Words' print document to the .NET Print Preview dialog.
            previewDlg.Document = awPrintDoc;

            previewDlg.ShowDialog();
        }
Пример #9
0
 private void bPay_Click(object sender, EventArgs e)
 {
     DB.Instance.Insert("order", new Parameter("customer_id", cid), new Parameter("dt", DateTime.Now), new Parameter("status", OrderStatus.New));
     uint oid = 0;
     using (MySqlDataReader reader = DB.Instance.SelectReader("select max(id) from order"))
     {
         if(reader != null && reader.Read()){
             oid = reader.GetUInt32(0);
         }
     }
     foreach (var item in Role.Instance.ShopCart)
     {
         DB.Instance.Insert("order_inventory", new Parameter("order_id", oid), new Parameter("inventory_id", item.ID), new Parameter("amount", item.Qty));
     }
     var dr = MessageBox.Show("Order Placed. Would you like to pay now?", "Payment", MessageBoxButtons.YesNo, MessageBoxIcon.Question);
     if (dr == DialogResult.Yes)
     {
         new Payment().ShowDialog();
     }
     else if(dr == DialogResult.No)
     {
         var ppd = new PrintPreviewDialog();
         PrintDocument pd = new PrintDocument();
         ppd.Document = pd;
         pd.PrintPage += Pd_PrintPage;
         ppd.ShowDialog();
     }
 }
Пример #10
0
 /// <summary>
 /// 打印
 /// </summary>
 /// <param name="ShowSetupDialog">是否显示打印机选择框</param>
 /// <param name="IsDrawLine">是否画边框</param>
 public void Print(bool ShowSetupDialog, bool IsDrawLine)
 {
     try
     {
         ShowLine          = IsDrawLine;
         printDocument     = new PrintDocument();
         IsShowSetupDialog = ShowSetupDialog;
         if (IsShowSetupDialog)
         {
             pd.PrinterSettings = new PrinterSettings();
             //pageSetupDialog = new PageSetupDialog();
             //pageSetupDialog.AllowPrinter = true;
             //pageSetupDialog.PageSettings = ps;
             if (pd.ShowDialog() != DialogResult.OK)
             {
                 return;
             }
             //printDocument.DefaultPageSettings = ps;
         }
         printDocument.PrinterSettings     = pd.PrinterSettings;
         printDocument.DefaultPageSettings = ps;
         printDocument.PrintPage          += new PrintPageEventHandler(this.printDocument_PrintPage);
         printPreviewDialog                     = new PrintPreviewDialog();
         printPreviewDialog.Document            = printDocument;
         ((Form)printPreviewDialog).WindowState = FormWindowState.Maximized;
         printPreviewDialog.ShowDialog();
     }
     catch (Exception e)
     {
         throw new Exception("Printer error." + e.Message);
     }
 }
Пример #11
0
        public static void Print_DataGridView(DataGridView dgv1, string printTitle, bool printAllRows, bool fitToPageWidth)
        {
            PrintPreviewDialog ppvw;
            try
            {

                // Getting DataGridView object to print
                dgv = dgv1;

                // Getting all Coulmns Names in the DataGridView
                AvailableColumns.Clear();
                foreach (DataGridViewColumn c in dgv.Columns)
                {
                    if (!c.Visible) continue;
                    AvailableColumns.Add(c.HeaderText);
                }

                // Showing the PrintOption Form
                //PrintOptions dlg = new PrintOptions(AvailableColumns);
                //if (dlg.ShowDialog() != DialogResult.OK) return;

                PrintTitle = printTitle;
                PrintAllRows = printAllRows;
                FitToPageWidth = fitToPageWidth;
                SelectedColumns = AvailableColumns;

                RowsPerPage = 0;

                ppvw = new PrintPreviewDialog();
                PageSetupDialog psd = new PageSetupDialog();
                psd.Document = printDoc;
                psd.ShowDialog();
                printDoc.DefaultPageSettings = psd.PageSettings;
                ppvw.Document = printDoc;

                // Showing the Print Preview Page
                printDoc.BeginPrint += new System.Drawing.Printing.PrintEventHandler(PrintDoc_BeginPrint);
                printDoc.PrintPage += new System.Drawing.Printing.PrintPageEventHandler(PrintDoc_PrintPage);
                //printDoc.QueryPageSettings += new System.Drawing.Printing.QueryPageSettingsEventHandler(printDoc_QueryPageSettings);
                if (ppvw.ShowDialog() != DialogResult.OK)
                {
                    printDoc.BeginPrint -= new System.Drawing.Printing.PrintEventHandler(PrintDoc_BeginPrint);
                    printDoc.PrintPage -= new System.Drawing.Printing.PrintPageEventHandler(PrintDoc_PrintPage);
                    return;
                }

                // Printing the Documnet
                printDoc.Print();
                printDoc.BeginPrint -= new System.Drawing.Printing.PrintEventHandler(PrintDoc_BeginPrint);
                printDoc.PrintPage -= new System.Drawing.Printing.PrintPageEventHandler(PrintDoc_PrintPage);
            }
            catch (Exception ex)
            {
                MessageBox.Show(ex.Message, "Error", MessageBoxButtons.OK, MessageBoxIcon.Error);
            }
            finally
            {

            }
        }
Пример #12
0
 private void InitializeComponent()
 {
     this.printDocument1 = new System.Drawing.Printing.PrintDocument();
     //
     //Main DataSet Initialization
     //
     this.printPreviewDialog1 = new PrintPreviewDialog();
     this.maindataset = new SupremeTransport.maindataset();
     //
     //Table Adapter Initialization
     //
     this.mainbillTableAdapter = new SupremeTransport.maindatasetTableAdapters.mainbillTableAdapter();
     this.billTableAdapter = new SupremeTransport.maindatasetTableAdapters.billTableAdapter();
     // 
     // printDocument1
     // 
     this.printDocument1.PrintPage += new System.Drawing.Printing.PrintPageEventHandler(this.printDocument1_PrintPage);
     // 
     // printPreviewDialog1
     // 
     this.printPreviewDialog1.AutoScrollMargin = new System.Drawing.Size(0, 0);
     this.printPreviewDialog1.AutoScrollMinSize = new System.Drawing.Size(0, 0);
     this.printPreviewDialog1.ClientSize = new System.Drawing.Size(400, 300);
     this.printPreviewDialog1.Enabled = true;
     this.printPreviewDialog1.Name = "printPreviewDialog1";
     this.printPreviewDialog1.Visible = false;
 }
Пример #13
0
        public MapOutPut(AxPageLayoutControl pagecontrol)
        {
            axPageLayoutControl1 = pagecontrol;

            printDialog1 = new System.Windows.Forms.PrintDialog(); //create a print dialog object
            InitializePageSetupDialog(); //intitialize the page setup dialog

            comboBox1.Items.Add("esriPageMappingTile");
            comboBox1.Items.Add("esriPageMappingCrop");
            comboBox1.Items.Add("esriPageMappingScale");
            comboBox1.SelectedIndex = 0;

            // create a new PrintPreviewDialog using constructor
            printPreviewDialog1 = new PrintPreviewDialog();
            //set the size, location, name and the minimum size the dialog can be resized to
            printPreviewDialog1.ClientSize = new System.Drawing.Size(800, 600);
            printPreviewDialog1.Location = new System.Drawing.Point(29, 29);
            printPreviewDialog1.Name = "PrintPreviewDialog1";
            printPreviewDialog1.MinimumSize = new System.Drawing.Size(375, 250);
            //set UseAntiAlias to true to allow the operating system to smooth fonts
            printPreviewDialog1.UseAntiAlias = true;

            //associate the event-handling method with the document's PrintPage event
            this.document.PrintPage += new System.Drawing.Printing.PrintPageEventHandler(document_PrintPage);
        }
        private void btnPrint_Click(object sender, EventArgs e)
        {
            gcOptions.Visible = false;

            using (System.Drawing.Printing.PrintDocument printDocument = new System.Drawing.Printing.PrintDocument())
            {
                printDocument.PrintPage += printDocument_PrintPage;
                printDocument.DefaultPageSettings.Landscape = true;
                printDocument.DefaultPageSettings.PaperSize = new System.Drawing.Printing.PaperSize("FalseX", 500, 1000);
                //Resize
                Size = new Size(974, 507);
                CaptureScreen();
                try
                {
                    //printDocument.Print();
                    PrintPreviewDialog PPdlg = new PrintPreviewDialog() { Document = printDocument };
                    PPdlg.Show();
                }
                catch (Exception ex)
                {
                    Program.ShowMsg(ex.Message, true, this);
                    Program.Logger.LogThis(null, Text, FXFW.Logger.OpType.fail, ex, null, this);
                }
            }
            Size = new Size(974, 589);
            gcOptions.Visible = true;
        }
Пример #15
0
        /// <summary>
        /// 打印变量的基础定义.
        /// </summary>
        private void Init()
        {
            // 初始化 打印文档.
            printDocument1 = new PrintDocument();
            // 定义 打印文档的事件.
            printDocument1.BeginPrint += new System.Drawing.Printing.PrintEventHandler(this.BeginPrint);
            printDocument1.EndPrint   += new System.Drawing.Printing.PrintEventHandler(this.EndPrint);
            printDocument1.PrintPage  += new System.Drawing.Printing.PrintPageEventHandler(this.PrintPage);

            // 定义打印文档的附加信息.
            printDocument1.DocumentName = "打印测试";


            // 初始化 页面设置对话框.
            pageSetupDialog1          = new PageSetupDialog();
            pageSetupDialog1.Document = printDocument1;

            // 初始化 打印预览对话框.
            printPreviewDialog1          = new PrintPreviewDialog();
            printPreviewDialog1.Document = printDocument1;

            // 初始化 打印对话框.
            printDialog1          = new PrintDialog();
            printDialog1.Document = printDocument1;
        }
Пример #16
0
        public override void Execute()
        {
            printDocument = new PrintDocument();

              printDocument.OriginAtMargins = true;
              printDocument.BeginPrint += new PrintEventHandler(printDocument_BeginPrint);
              printDocument.PrintPage += new PrintPageEventHandler(printDocument_PrintPage);

              Dictionary<String, Object> paperSettings = Printing.getPaperSettings(grtArguments);
              printDocument.DefaultPageSettings.Landscape = (string)paperSettings["orientation"] == "landscape";

              // Sizes must be given in inch * 100 (sigh).
              int paperWidth = (int)Math.Round((double)paperSettings["width"] / 0.254);
              int paperHeight = (int)Math.Round((double)paperSettings["height"] / 0.254);
              PaperSize paperSize = new PaperSize("Ignored anyway", paperWidth, paperHeight);

              if ((bool)paperSettings["marginsSet"])
            printDocument.DefaultPageSettings.Margins =
              new Margins((int)paperSettings["marginLeft"], (int)paperSettings["marginRight"],
            (int)paperSettings["marginTop"], (int)paperSettings["marginBottom"]);

              System.Windows.Forms.PrintPreviewDialog preview = new System.Windows.Forms.PrintPreviewDialog();

              preview.Document = printDocument;
              preview.UseAntiAlias = true;

              preview.ShowDialog();
        }
Пример #17
0
        public void print()
        {
            PrintDialog pd = new PrintDialog();
            PrintDocument pdoc = new PrintDocument();
            PrinterSettings ps = new PrinterSettings();
            Font font =new Font("Arial",12);
            PaperSize psize = new PaperSize("Custome", 100, 200);
            pd.Document = pdoc;
            pd.Document.DefaultPageSettings.PaperSize = psize;
            pdoc.DefaultPageSettings.PaperSize.Height = 320;
            pdoc.DefaultPageSettings.PaperSize.Width = 200;
            pdoc.PrintPage += new PrintPageEventHandler(printDocument1_PrintPage);
            DialogResult result = pd.ShowDialog();
            if (result == DialogResult.OK)
            {
                PrintPreviewDialog ppd = new PrintPreviewDialog();
                ppd.Document = pdoc;
                result = ppd.ShowDialog();
                if (result == DialogResult.OK)
                {
                    pdoc.Print();

                }
            }



        }
Пример #18
0
        private void GetPrinters_Click(object sender, EventArgs e)
        {
            //PrintDocument pd = new PrintDocument();
            //pd.DefaultPageSettings.Bounds = new
            //pd.Print();

            PrintPreviewDialog ppd = new PrintPreviewDialog();
            PrintDocument pd = new PrintDocument();
            //设置边距
            Margins margin = new Margins(200, 20, 20, 0);
            pd.DefaultPageSettings.Margins = margin;
            //纸张设置默认
            PaperSize pageSize = new PaperSize("First custom size", getYc(58), 100);
            pd.DefaultPageSettings.PaperSize = pageSize;
            //打印事件设置
            pd.PrintPage += pd_PrintPage;
            ppd.Document = pd;
            ppd.ShowDialog();
            //try
            //{
            //    pd.Print();
            //}
            //catch (Exception ex)
            //{
            //    MessageBox.Show(ex.Message, "打印出错", MessageBoxButtons.OK, MessageBoxIcon.Error);
            //    pd.PrintController.OnEndPrint(pd, new PrintEventArgs());
            //}
        }
Пример #19
0
        public void PrintTokens(List<TokenPrint> tokens, Form parentDialog, string PrinterName, bool showPrintPreview)
        {
            _tokensToPrint = tokens;
            _pageCounter = 0;
            //bool showPrintPreview = true;
            PrintDocument pd = new PrintDocument();
            PrintDocument pd1 = new PrintDocument();

            pd.DefaultPageSettings.PaperSize = paperSize;
            pd.PrintPage += printDoc_PrintPage;
            pd.PrinterSettings.PrinterName = PrinterName;

            //ToDo: can remove preview in the actual production.
            if (showPrintPreview)
            {
                var ppDlg = new PrintPreviewDialog();
                ppDlg.SetBounds(30, 30, 1024, 500);
                ppDlg.PrintPreviewControl.AutoZoom = true;
                ppDlg.PrintPreviewControl.Zoom = 0.75;
                ppDlg.Document = pd;
                var dr = ppDlg.ShowDialog(parentDialog);
            }
            else
            {
                pd.Print();
            }
        }
Пример #20
0
        private static int TotalWidth; // Summation of Columns widths

        #endregion Fields

        #region Methods

        public static void Print_DataGridView(DataGridView dgv1)
        {
            PrintPreviewDialog ppvw;
            try
            {
                // Getting DataGridView object to print
                dgv = dgv1;

                // Getting all Coulmns Names in the DataGridView
                AvailableColumns.Clear();
                foreach (DataGridViewColumn c in dgv.Columns)
                {
                    if (!c.Visible) continue;
                    AvailableColumns.Add(c.HeaderText);
                }

                // Showing the PrintOption Form
                PrintOptions dlg = new PrintOptions(AvailableColumns);
                if (dlg.ShowDialog() != DialogResult.OK) return;

                PrintAllRows = dlg.PrintAllRows;
                FitToPageWidth = dlg.FitToPageWidth;
                SelectedColumns = dlg.GetSelectedColumns();

                RowsPerPage = 0;

                ppvw = new PrintPreviewDialog();
                ppvw.Document = printDoc;

                // Showing the Print Preview Page
                printDoc.BeginPrint +=new System.Drawing.Printing.PrintEventHandler(PrintDoc_BeginPrint);
                printDoc.PrintPage +=new System.Drawing.Printing.PrintPageEventHandler(PrintDoc_PrintPage);
                printDoc.DefaultPageSettings.Landscape = true;
                PaperSize paperSize = new PaperSize("Letter", 850, 1100);
                paperSize.RawKind = (int)PaperKind.Custom;
                printDoc.DefaultPageSettings.PaperSize = paperSize;
                if (ppvw.ShowDialog() != DialogResult.OK)
                {
                    printDoc.BeginPrint -= new System.Drawing.Printing.PrintEventHandler(PrintDoc_BeginPrint);
                    printDoc.PrintPage -= new System.Drawing.Printing.PrintPageEventHandler(PrintDoc_PrintPage);
                    return;
                }

                // Printing the Documnet
                printDoc.DefaultPageSettings.Landscape = true;
                printDoc.DefaultPageSettings.PaperSize = paperSize;
                printDoc.Print();
                printDoc.BeginPrint -= new System.Drawing.Printing.PrintEventHandler(PrintDoc_BeginPrint);
                printDoc.PrintPage -= new System.Drawing.Printing.PrintPageEventHandler(PrintDoc_PrintPage);
            }
            catch (Exception ex)
            {
                MessageBox.Show(ex.Message, "Error", MessageBoxButtons.OK, MessageBoxIcon.Error);
            }
            finally
            {

            }
        }
Пример #21
0
        public void filePrintPreviewMenuItem_Click(Object sender, EventArgs e)
        {
            _pageNumber = 0;

            PrintPreviewDialog printPreviewDialog = new PrintPreviewDialog();
            printPreviewDialog.Document = _printDoc;
            printPreviewDialog.ShowDialog();
        }
Пример #22
0
 // The Print Preview Button
 public void Preview(string title)
 {
     if (Setup(title))
       {
     var myPrintPreviewDialog = new PrintPreviewDialog {Document = printDocument};
     myPrintPreviewDialog.ShowDialog();
       }
 }
 public void PrintPreview()
 {
     PrintPreviewDialog dlg = new PrintPreviewDialog();
     dlg.Document = printDocument;
     dlg.WindowState = FormWindowState.Maximized;
     dlg.ShowInTaskbar = false;            
     dlg.ShowDialog();
 }
Пример #24
0
        private void toolStripButton1_Click(object sender, EventArgs e)
        {
            PrintPreviewDialog dlg = new PrintPreviewDialog();

            dlg.Document = context.PrintDocument;

            dlg.ShowDialog();
        }
Пример #25
0
        public bool ShowPrintPreviewDialog(PrintDocument document)
        {
            var dialog = new WF.PrintPreviewDialog();

            dialog.Document = document;
            dialog.ShowIcon = false;
            return(dialog.ShowDialog() == WF.DialogResult.OK);
        }
Пример #26
0
 private void button1_Click(object sender, EventArgs e)
 {
     PrintDocument document = new PrintDocument();
     document.PrintPage += new PrintPageEventHandler(document_PrintPage);
     PrintPreviewDialog preview = new PrintPreviewDialog();
     preview.Document = document;
     preview.ShowDialog(this);
 }
Пример #27
0
 public DialogResult PrintPreview(ScintillaPrintDocument doc)
 {
     var ppd = new PrintPreviewDialog();
     ppd.WindowState = FormWindowState.Maximized;
     ppd.Icon = WB.Form.Icon;
     ppd.Document = doc;
     return ppd.ShowDialog(WB.Form);
 }
Пример #28
0
		public DialogResult PrintPreview()
		{
			PrintPreviewDialog ppd = new PrintPreviewDialog();
			ppd.WindowState = FormWindowState.Maximized;

			ppd.Document = _printDocument;
			return ppd.ShowDialog();
		}
Пример #29
0
        private void PrintBtn_Click(object sender, EventArgs e)
        {
            PrintPreviewDialog ppd = new PrintPreviewDialog();

            ppd.Document = pd;

            ppd.ShowDialog();
        }
Пример #30
0
 public DialogResult PrintPreview()
 {
     var ppd = new PrintPreviewDialog();
     ppd.WindowState = FormWindowState.Maximized;
     ppd.Icon = ((Form)window).Icon;
     ppd.Document = PrintDocument;
     return ppd.ShowDialog(window);
 }
Пример #31
0
 // private System.ComponentModel.Container components;
 public Bill()
 {
     InitializeComponent();
     this.prnDialog   = new System.Windows.Forms.PrintDialog();
     this.prnPreview  = new System.Windows.Forms.PrintPreviewDialog();
     this.prnDocument = new System.Drawing.Printing.PrintDocument();
     // The Event of 'PrintPage'
     prnDocument.PrintPage += new System.Drawing.Printing.PrintPageEventHandler(prnDocument_PrintPage);
 }
Пример #32
0
 public PubPrintMemo(RichTextBox rtb)
 {
     this.printDoc     = new PubPrintTextMemoDoc(rtb);
     this.ppDialog     = new System.Windows.Forms.PrintPreviewDialog();
     this.oPrintDialog = new System.Windows.Forms.PrintDialog();
     this.oPageSetup   = new System.Windows.Forms.PageSetupDialog();
     oPageSettings     = new PageSettings();
     this.oPrintDialog.AllowSomePages = true;
 }
Пример #33
0
 private void button1_Click(object sender, EventArgs e)
 {
     try
     {
         if (prop.PathReportsTemplates != "")
         {
             string y1, m1, d1, y2, m2, d2;
             string usrfilter;
             usrfilter = checkCurentUser.Checked ? "=" + usr.Id_user.ToString() : ">0";
             y1 = txtDateBegin.Value.Year.ToString();
             m1 = txtDateBegin.Value.Month < 10
                      ? "0" + txtDateBegin.Value.Month.ToString()
                      : txtDateBegin.Value.Month.ToString();
             d1 = txtDateBegin.Value.Day < 10
                      ? "0" + txtDateBegin.Value.Day.ToString()
                      : txtDateBegin.Value.Day.ToString();
             y2 = txtDateEnd.Value.Year.ToString();
             m2 = txtDateEnd.Value.Month < 10
                      ? "0" + txtDateEnd.Value.Month.ToString()
                      : txtDateEnd.Value.Month.ToString();
             d2 = txtDateEnd.Value.Day < 10
                      ? "0" + txtDateEnd.Value.Day.ToString()
                      : txtDateEnd.Value.Day.ToString();
             SqlCommand db_command =
                 new SqlCommand(
                 "SELECT name, CASE WHEN paper = 1 THEN 'Глянцевая бумага' ELSE 'Матовая бумага' END AS paper, SUM(t1) AS t1, SUM(t2) AS t2, SUM(t3) AS t3, SUM(t4) AS t4, SUM(t5) AS t5 FROM (SELECT name, paper, CASE WHEN (typeaction = 1 AND quantity > 0) THEN quantity ELSE 0 END AS t1, CASE WHEN (typeaction = 2 AND quantity > 0) THEN quantity ELSE 0 END AS t2, CASE WHEN (typeaction = 3 AND quantity > 0) THEN quantity ELSE 0 END AS t3, CASE WHEN (typeaction = 4 AND quantity > 0) THEN quantity ELSE 0 END AS t4, CASE WHEN (typeaction = 5 AND quantity > 0) THEN quantity ELSE 0 END AS t5 FROM (SELECT name, SUM(quantity) AS quantity, typeaction, paper FROM vwTehActionFull WHERE (datea >= CONVERT(datetime, '" + y1 + "/" + m1 + "/" + d1 + " 00:00:00.000', 120)) AND (datea <= CONVERT(datetime, '" + y2 + "/" + m2 + "/" + d2 + " 23:59:59.999', 120)) AND (id_user " + usrfilter + ") GROUP BY name, typeaction, paper) AS TMP) AS TMP2 GROUP BY name, paper",
                     db_connection);
             SqlDataAdapter db_adapter = new SqlDataAdapter(db_command);
             DataTable tbl = new DataTable("discarding");
             db_adapter.Fill(tbl);
             rep.Load(prop.PathReportsTemplates, "Discarding");
             rep.DataSource.Recordset = tbl;
             rep.Fields["titleDates"].Text = "с " + txtDateBegin.Value.ToShortDateString() + " по " +
                                             txtDateEnd.Value.ToShortDateString();
             if (checkCurentUser.Checked)
                 rep.Fields["titleDates"].Text += " для " + usr.Name;
             else
                 rep.Fields["titleDates"].Text += " для всех пользователей";
             PrintPreviewDialog pd = new PrintPreviewDialog();
             pd.Document = rep.Document;
             pd.ShowDialog();
         }
         else
         {
             MessageBox.Show("Не выбран файл шаблонов отчетов", "Ошибка", MessageBoxButtons.OK, MessageBoxIcon.Error);
         }
     }
     catch (Exception ex)
     {
         ErrorNfo.WriteErrorInfo(ex);
         MessageBox.Show("Ошибка вывода отчета\n" + ex.Message + "\n" + ex.Source + "\n" + ex.StackTrace, "Ошибка", MessageBoxButtons.OK, MessageBoxIcon.Error);
     }
     finally
     {
         this.DialogResult = DialogResult.OK;
     }
 }
Пример #34
0
 private void bPay_Click(object sender, EventArgs e)
 {
     MessageBox.Show("Payment Options here");
     var ppd = new PrintPreviewDialog();
     PrintDocument pd = new PrintDocument();
     ppd.Document = pd;
     pd.PrintPage += Pd_PrintPage;
     ppd.ShowDialog();
 }
Пример #35
0
        private void bunifuFlatButton2_Click(object sender, EventArgs e)
        {
            PrintPreviewDialog dlg = new System.Windows.Forms.PrintPreviewDialog();

            //dlg.Height = 250;
            //dlg.Width = 15000;
            dlg.Document = PrintDocument;
            dlg.ShowDialog();
        }
Пример #36
0
    public void PreviewDocument(Document document, PrinterSettings printerSettings)
    {
      fDocument = document;
      fPrintDocument.PrinterSettings = printerSettings;

      PrintPreviewDialog dlg = new PrintPreviewDialog();
      dlg.Document = fPrintDocument;
      dlg.ShowDialog();
    }
Пример #37
0
 /// <summary>
 /// This method is required for Windows Forms designer support.
 /// Do not change the method contents inside the source code editor. The Forms designer might
 /// not be able to load this method if it was changed manually.
 /// </summary>
 private void InitializeComponent()
 {
     this.previewDlg           = new System.Windows.Forms.PrintPreviewDialog();
     this.printPreviewControl1 = new System.Windows.Forms.PrintPreviewControl();
     this.panel1 = new System.Windows.Forms.Panel();
     this.panel1.SuspendLayout();
     this.SuspendLayout();
     //
     // previewDlg
     //
     this.previewDlg.AutoScrollMargin  = new System.Drawing.Size(0, 0);
     this.previewDlg.AutoScrollMinSize = new System.Drawing.Size(0, 0);
     this.previewDlg.ClientSize        = new System.Drawing.Size(520, 325);
     this.previewDlg.Dock            = System.Windows.Forms.DockStyle.Fill;
     this.previewDlg.Enabled         = true;
     this.previewDlg.Location        = new System.Drawing.Point(8, 8);
     this.previewDlg.MinimumSize     = new System.Drawing.Size(375, 250);
     this.previewDlg.Name            = "previewDlg";
     this.previewDlg.TransparencyKey = System.Drawing.Color.Empty;
     this.previewDlg.Visible         = false;
     //
     // printPreviewControl1
     //
     this.printPreviewControl1.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom)
                                                                               | System.Windows.Forms.AnchorStyles.Left)
                                                                              | System.Windows.Forms.AnchorStyles.Right)));
     this.printPreviewControl1.AutoZoom  = false;
     this.printPreviewControl1.BackColor = System.Drawing.SystemColors.Window;
     this.printPreviewControl1.Location  = new System.Drawing.Point(8, 8);
     this.printPreviewControl1.Name      = "printPreviewControl1";
     this.printPreviewControl1.Size      = new System.Drawing.Size(688, 360);
     this.printPreviewControl1.TabIndex  = 1;
     this.printPreviewControl1.Zoom      = 1.3;
     //
     // panel1
     //
     this.panel1.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom)
                                                                 | System.Windows.Forms.AnchorStyles.Left)
                                                                | System.Windows.Forms.AnchorStyles.Right)));
     this.panel1.Controls.Add(this.printPreviewControl1);
     this.panel1.Location = new System.Drawing.Point(8, 8);
     this.panel1.Name     = "panel1";
     this.panel1.Size     = new System.Drawing.Size(704, 384);
     this.panel1.TabIndex = 2;
     //
     // PaintArea
     //
     this.Controls.Add(this.panel1);
     this.DockPadding.All = 8;
     this.BackColor       = Color.White;
     this.Dock            = DockStyle.Fill;
     this.Name            = "PaintArea";
     this.Size            = new System.Drawing.Size(720, 400);
     this.panel1.ResumeLayout(false);
     this.ResumeLayout(false);
 }
Пример #38
0
 private void mnuPrintPreview_Click(object sender, EventArgs e)
 {
     System.Windows.Forms.PrintPreviewDialog dlg;
     dlg = new System.Windows.Forms.PrintPreviewDialog();
     prdJump.DocumentName              = Neptune.DevInfo.ProductName + " " + Neptune.DevInfo.SN + " " + this.Text;
     dlg.Document                      = prdJump;
     dlg.UseAntiAlias                  = true;
     dlg.PrintPreviewControl.AutoZoom  = true;
     dlg.PrintPreviewControl.BackColor = System.Drawing.SystemColors.ActiveCaption;
     dlg.ShowDialog();
 }
 public frmInvoiceReport()
 {
     this.prnDialog   = new System.Windows.Forms.PrintDialog();
     this.prnPreview  = new System.Windows.Forms.PrintPreviewDialog();
     this.prnDocument = new System.Drawing.Printing.PrintDocument();
     // The Event of 'PrintPage'
     prnDocument.PrintPage += new System.Drawing.Printing.PrintPageEventHandler(prnDocument_PrintPage);
     invoiceBLL             = new InvoiceBLL(dbHelper);
     productBLL             = new ProductBLL(dbHelper);
     InitializeComponent();
 }
Пример #40
0
 /// <summary>
 /// Required method for Designer support - do not modify
 /// the contents of this method with the code editor.
 /// </summary>
 private void InitializeComponent()
 {
     System.Resources.ResourceManager resources = new System.Resources.ResourceManager(typeof(Form1));
     this.openFileDialog1     = new System.Windows.Forms.OpenFileDialog();
     this.listBox1            = new System.Windows.Forms.ListBox();
     this.textBox1            = new System.Windows.Forms.TextBox();
     this.printPreviewDialog1 = new System.Windows.Forms.PrintPreviewDialog();
     this.SuspendLayout();
     //
     // openFileDialog1
     //
     this.openFileDialog1.Multiselect = true;
     //
     // listBox1
     //
     this.listBox1.Location = new System.Drawing.Point(8, 32);
     this.listBox1.Name     = "listBox1";
     this.listBox1.Size     = new System.Drawing.Size(272, 121);
     this.listBox1.TabIndex = 0;
     //
     // textBox1
     //
     this.textBox1.Location = new System.Drawing.Point(16, 184);
     this.textBox1.Name     = "textBox1";
     this.textBox1.Size     = new System.Drawing.Size(264, 20);
     this.textBox1.TabIndex = 1;
     this.textBox1.Text     = "textBox1";
     //
     // printPreviewDialog1
     //
     this.printPreviewDialog1.AutoScrollMargin  = new System.Drawing.Size(0, 0);
     this.printPreviewDialog1.AutoScrollMinSize = new System.Drawing.Size(0, 0);
     this.printPreviewDialog1.ClientSize        = new System.Drawing.Size(400, 300);
     this.printPreviewDialog1.Enabled           = true;
     this.printPreviewDialog1.Icon            = ((System.Drawing.Icon)(resources.GetObject("printPreviewDialog1.Icon")));
     this.printPreviewDialog1.MaximumSize     = new System.Drawing.Size(0, 0);
     this.printPreviewDialog1.Name            = "printPreviewDialog1";
     this.printPreviewDialog1.Opacity         = 1;
     this.printPreviewDialog1.TransparencyKey = System.Drawing.Color.Empty;
     this.printPreviewDialog1.Visible         = false;
     //
     // Form1
     //
     this.AutoScaleBaseSize = new System.Drawing.Size(5, 13);
     this.ClientSize        = new System.Drawing.Size(292, 273);
     this.Controls.AddRange(new System.Windows.Forms.Control[] {
         this.textBox1,
         this.listBox1
     });
     this.Name = "Form1";
     this.Text = "Form1";
     this.ResumeLayout(false);
 }
Пример #41
0
        public frmPrintCashMemo()
        {
            InitializeComponent();
            this.prnDialog   = new System.Windows.Forms.PrintDialog();
            this.prnPreview  = new System.Windows.Forms.PrintPreviewDialog();
            this.prnDocument = new System.Drawing.Printing.PrintDocument();
            // The Event of 'PrintPage'
            prnDocument.PrintPage += new System.Drawing.Printing.PrintPageEventHandler(prnDocument_PrintPage);
            Globals gb = new Globals();

            ConnString = gb.ConnString;
            //InvTitleHeight = InvTitleHeight * 2;
            //InvSubTitleHeight = InvSubTitleHeight * 2;
        }
 public ProductSearchForm()
 {
     InitializeComponent();
     productTableAdapter = new JSManagementDataSetTableAdapters.ProductTableAdapter();
     this.productTableAdapter.Connection          = CommonHelper.GetSQLConnection();
     getProductInOutDetailTableAdapter.Connection = CommonHelper.GetSQLConnection();
     storeTableAdapter            = new JSManagementDataSetTableAdapters.StoreTableAdapter();
     storeTableAdapter.Connection = CommonHelper.GetSQLConnection();
     this.prnDialog              = new System.Windows.Forms.PrintDialog();
     prodTableAdapter            = new JSManagementDataSetTableAdapters.ProdTableAdapter();
     prodTableAdapter.Connection = CommonHelper.GetSQLConnection();
     this.prnPreview             = new System.Windows.Forms.PrintPreviewDialog();
     this.prnDocument            = new System.Drawing.Printing.PrintDocument();
     // the Event of 'PrintPage'
     prnDocument.PrintPage += new System.Drawing.Printing.PrintPageEventHandler
                                  (prnDocument_PrintPage);
 }
Пример #43
0
        public void Print(int printItem = 1)
        {
            PrintDocument recordDoc;

            // Create the document and name it
            recordDoc = new PrintDocument();
            recordDoc.DocumentName = "Inventory Receipt";
            PaperSize ps = new PaperSize();

            ps.RawKind = 119;
            ps.Width   = 200;
            recordDoc.DefaultPageSettings.PaperSize    = ps;
            recordDoc.DefaultPageSettings.Margins.Top  = 1;
            recordDoc.DefaultPageSettings.Margins.Left = 1;
            if (printItem == 1)
            {
                recordDoc.PrintPage += new PrintPageEventHandler(this.PrintReceiptPage);
                CalculatePrint();
            }
            else
            {
                recordDoc.PrintPage += new PrintPageEventHandler(this.PrintUtangPage);
                CalculateUtangPrint();
            }
            ps.Height = m_ReceiptSize;

            // Preview document
            System.Windows.Forms.PrintPreviewDialog dlgPreview = new System.Windows.Forms.PrintPreviewDialog();
            dlgPreview.Document = recordDoc;

            Profile _myProfile = new Profile();

            _myProfile.ReadXML();
            if (_myProfile.EnablePreview == true)
            {
                dlgPreview.ShowDialog();
            }
            else
            {
                recordDoc.Print();
                dlgPreview.Close();
            }
            // Dispose of document when done printing
            recordDoc.Dispose();
        }
Пример #44
0
 public PubPrintMemo(RichTextBox rtb)
 {
     this.printDoc     = new PubPrintTextMemoDoc(rtb);
     this.ppDialog     = new System.Windows.Forms.PrintPreviewDialog();
     this.oPrintDialog = new System.Windows.Forms.PrintDialog();
     this.oPageSetup   = new System.Windows.Forms.PageSetupDialog();
     oPageSettings     = new PageSettings();
     //
     // oPrintDialog
     //
     //
     // printDoc
     //
     //this.printDoc.PrintPage += new System.Drawing.Printing.PrintPageEventHandler(this.printDoc_PrintPage);
     //
     this.oPrintDialog.AllowSomePages = true;
     // this.oPrintDialog.PrintToFile = true;
 }
Пример #45
0
 /// <summary>
 /// Required method for Designer support - do not modify
 /// the contents of this method with the code editor.
 /// </summary>
 private void InitializeComponent()
 {
     System.Resources.ResourceManager resources = new System.Resources.ResourceManager(typeof(printView));
     this.printPreviewDialog1 = new System.Windows.Forms.PrintPreviewDialog();
     this.printDocument1      = new System.Drawing.Printing.PrintDocument();
     this.button1             = new System.Windows.Forms.Button();
     this.pageSetupDialog1    = new System.Windows.Forms.PageSetupDialog();
     this.SuspendLayout();
     //
     // printPreviewDialog1
     //
     this.printPreviewDialog1.AutoScrollMargin  = new System.Drawing.Size(0, 0);
     this.printPreviewDialog1.AutoScrollMinSize = new System.Drawing.Size(0, 0);
     this.printPreviewDialog1.ClientSize        = new System.Drawing.Size(400, 300);
     this.printPreviewDialog1.Enabled           = true;
     this.printPreviewDialog1.Icon            = ((System.Drawing.Icon)(resources.GetObject("printPreviewDialog1.Icon")));
     this.printPreviewDialog1.Location        = new System.Drawing.Point(17, 17);
     this.printPreviewDialog1.MinimumSize     = new System.Drawing.Size(375, 250);
     this.printPreviewDialog1.Name            = "printPreviewDialog1";
     this.printPreviewDialog1.TransparencyKey = System.Drawing.Color.Empty;
     this.printPreviewDialog1.Visible         = false;
     //
     // button1
     //
     this.button1.Font     = new System.Drawing.Font("Tempus Sans ITC", 12F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((System.Byte)(0)));
     this.button1.Location = new System.Drawing.Point(256, 232);
     this.button1.Name     = "button1";
     this.button1.Size     = new System.Drawing.Size(336, 24);
     this.button1.TabIndex = 2;
     this.button1.Text     = "Close Word After printing is finished";
     this.button1.Click   += new System.EventHandler(this.button1_Click);
     //
     // printView
     //
     this.AutoScaleBaseSize = new System.Drawing.Size(9, 25);
     this.BackgroundImage   = ((System.Drawing.Image)(resources.GetObject("$this.BackgroundImage")));
     this.ClientSize        = new System.Drawing.Size(787, 548);
     this.Controls.Add(this.button1);
     this.Font          = new System.Drawing.Font("Tempus Sans ITC", 14.25F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((System.Byte)(0)));
     this.Name          = "printView";
     this.StartPosition = System.Windows.Forms.FormStartPosition.CenterParent;
     this.Text          = "Print Flash Cards";
     this.ResumeLayout(false);
 }
Пример #46
0
 public override void Run(Altaxo.Graph.GUI.GraphController ctrl)
 {
     try
     {
         System.Windows.Forms.PrintPreviewDialog dlg = new System.Windows.Forms.PrintPreviewDialog();
         Current.PrintingService.PrintDocument.PrintPage += new System.Drawing.Printing.PrintPageEventHandler(ctrl.EhPrintPage);
         dlg.Document = Current.PrintingService.PrintDocument;
         dlg.ShowDialog(ctrl.View.Form);
         dlg.Dispose();
     }
     catch (Exception ex)
     {
         System.Windows.Forms.MessageBox.Show(ctrl.View.Form, ex.ToString());
     }
     finally
     {
         Current.PrintingService.PrintDocument.PrintPage -= new System.Drawing.Printing.PrintPageEventHandler(ctrl.EhPrintPage);
     }
 }
Пример #47
0
        private void iniForm()
        {
            this._PreviewDialog = new System.Windows.Forms.PrintPreviewDialog();

            this._PreviewDialog.AutoScrollMargin  = new System.Drawing.Size(0, 0);
            this._PreviewDialog.AutoScrollMinSize = new System.Drawing.Size(0, 0);
            this._PreviewDialog.ClientSize        = new System.Drawing.Size(400, 300);
            this._PreviewDialog.Enabled           = true;

            this._PreviewDialog.Location        = new System.Drawing.Point(44, 58);
            this._PreviewDialog.MinimumSize     = new System.Drawing.Size(400, 300);
            this._PreviewDialog.Name            = "printPreviewDialog1";
            this._PreviewDialog.TransparencyKey = System.Drawing.Color.Empty;
            this._PreviewDialog.Visible         = false;

            _PreviewDialog.Document    = _PrintDocument;
            _PrintDocument.BeginPrint += new System.Drawing.Printing.PrintEventHandler(_PrintDocument_BeginPrint);
            _PrintDocument.PrintPage  += new System.Drawing.Printing.PrintPageEventHandler(_PrintDocument_PrintPage);
        }
Пример #48
0
        public PosPrinter(PosPrinterModel model)
        {
            posPrinterModel = model;
            this.printv_pos = new System.Windows.Forms.PrintPreviewDialog();
            this.printd_pos = new System.Drawing.Printing.PrintDocument();


            this.printv_pos.AutoScrollMargin  = new System.Drawing.Size(0, 0);
            this.printv_pos.AutoScrollMinSize = new System.Drawing.Size(0, 0);
            this.printv_pos.ClientSize        = new System.Drawing.Size(400, 300);
            this.printv_pos.Document          = this.printd_pos;
            this.printv_pos.Enabled           = true;

            this.printv_pos.Name    = "printPreviewDialog1";
            this.printv_pos.Visible = false;

            this.printd_pos.DocumentName    = "零售POS小票";
            this.printd_pos.OriginAtMargins = true;
            this.printd_pos.PrintPage      += new System.Drawing.Printing.PrintPageEventHandler(this.printd_pos_PrintPage);
        }
Пример #49
0
        public PosPrinter()
        {
            this.printv_pos = new System.Windows.Forms.PrintPreviewDialog();
            this.printd_pos = new System.Drawing.Printing.PrintDocument();


            this.printv_pos.AutoScrollMargin  = new System.Drawing.Size(0, 0);
            this.printv_pos.AutoScrollMinSize = new System.Drawing.Size(0, 0);
            this.printv_pos.ClientSize        = new System.Drawing.Size(400, 300);
            this.printv_pos.Document          = this.printd_pos;
            this.printv_pos.Enabled           = true;
            // this.printv_pos.Icon = ((System.Drawing.Icon)(resources.GetObject("printv_pos.Icon")));
            this.printv_pos.Name    = "printPreviewDialog1";
            this.printv_pos.Visible = false;
            //
            // printd_pos
            //
            this.printd_pos.DocumentName    = "零售POS小票";
            this.printd_pos.OriginAtMargins = true;
            this.printd_pos.PrintPage      += new System.Drawing.Printing.PrintPageEventHandler(this.printd_pos_PrintPage);
        }
Пример #50
0
 public override bool ShowPrintPreviewDialog(PrintPageEventHandler printPageEventHandler, QueryPageSettingsEventHandler queryPageSettingsEventHandler)
 {
     try
     {
         System.Windows.Forms.PrintPreviewDialog dlg = new System.Windows.Forms.PrintPreviewDialog();
         Current.PrintingService.PrintDocument.PrintPage         += printPageEventHandler;
         Current.PrintingService.PrintDocument.QueryPageSettings += queryPageSettingsEventHandler;
         dlg.Document = Current.PrintingService.PrintDocument;
         dlg.ShowDialog(MainWindow);
         dlg.Dispose();
         return(true);
     }
     catch (Exception ex)
     {
         Current.Gui.ErrorMessageBox(ex.ToString());
     }
     finally
     {
         Current.PrintingService.PrintDocument.PrintPage         -= printPageEventHandler;
         Current.PrintingService.PrintDocument.QueryPageSettings -= queryPageSettingsEventHandler;
     }
     return(false);
 }
Пример #51
0
        /// <summary>
        /// Inits the print.
        /// </summary>
        private void  InitPrint()
        {
            printDocument1 = new System.Drawing.Printing.PrintDocument();



            printDialog1 = new System.Windows.Forms.PrintDialog();

            //
            // printDialog1
            //
            printDialog1.Document    = printDocument1;
            printDialog1.UseEXDialog = true;


            printPreviewDialog1 = new System.Windows.Forms.PrintPreviewDialog();
            //  printPreviewDialog1.KeyDown += new KeyEventHandler(printPreviewDialog1_KeyDown);
            // printPreviewDialog1.ActiveControl = printPreviewDialog1.Controls[1];

            //
            // printPreviewDialog1
            //
            printPreviewDialog1.AutoScrollMargin  = new System.Drawing.Size(0, 0);
            printPreviewDialog1.AutoScrollMinSize = new System.Drawing.Size(0, 0);
            printPreviewDialog1.ClientSize        = new System.Drawing.Size(400, 300);
            printPreviewDialog1.Document          = printDocument1;
            printPreviewDialog1.Enabled           = true;
            printPreviewDialog1.Name    = "printPreviewDialog1";
            printPreviewDialog1.Visible = false;


            pageSetupDialog1 = new System.Windows.Forms.PageSetupDialog();
            //
            // pageSetupDialog1
            //
            pageSetupDialog1.Document = printDocument1;
        }
Пример #52
0
 private void InitializeComponent()
 {
     System.Resources.ResourceManager resources = new System.Resources.ResourceManager(typeof(ctlQC));
     this.printDocument1 = new System.Drawing.Printing.PrintDocument();
     this.m_printPrevDlg = new System.Windows.Forms.PrintPreviewDialog();
     this.m_printDlg     = new System.Windows.Forms.PrintDialog();
     //
     // printDocument1
     //
     this.printDocument1.PrintPage += new System.Drawing.Printing.PrintPageEventHandler(this.printDocument1_PrintPage);
     //
     // m_printPrevDlg
     //
     this.m_printPrevDlg.AutoScrollMargin  = new System.Drawing.Size(0, 0);
     this.m_printPrevDlg.AutoScrollMinSize = new System.Drawing.Size(0, 0);
     this.m_printPrevDlg.ClientSize        = new System.Drawing.Size(400, 300);
     this.m_printPrevDlg.Enabled           = true;
     this.m_printPrevDlg.Icon            = ((System.Drawing.Icon)(resources.GetObject("m_printPrevDlg.Icon")));
     this.m_printPrevDlg.Location        = new System.Drawing.Point(17, 17);
     this.m_printPrevDlg.MinimumSize     = new System.Drawing.Size(375, 250);
     this.m_printPrevDlg.Name            = "m_printPrevDlg";
     this.m_printPrevDlg.TransparencyKey = System.Drawing.Color.Empty;
     this.m_printPrevDlg.Visible         = false;
 }
Пример #53
0
 /// <summary>
 /// Required method for Designer support - do not modify
 /// the contents of this method with the code editor.
 /// </summary>
 private void InitializeComponent()
 {
     System.Resources.ResourceManager resources = new System.Resources.ResourceManager(typeof(ConsolePrintUtility));
     this.dialogPrintPreview = new System.Windows.Forms.PrintPreviewDialog();
     this.document           = new System.Drawing.Printing.PrintDocument();
     this.dialogPrint        = new System.Windows.Forms.PrintDialog();
     this.dialogPageSetup    = new System.Windows.Forms.PageSetupDialog();
     //
     // dialogPrintPreview
     //
     this.dialogPrintPreview.AutoScrollMargin  = new System.Drawing.Size(0, 0);
     this.dialogPrintPreview.AutoScrollMinSize = new System.Drawing.Size(0, 0);
     this.dialogPrintPreview.ClientSize        = new System.Drawing.Size(400, 300);
     this.dialogPrintPreview.Document          = this.document;
     this.dialogPrintPreview.Enabled           = true;
     this.dialogPrintPreview.Icon            = ((System.Drawing.Icon)(resources.GetObject("dialogPrintPreview.Icon")));
     this.dialogPrintPreview.Location        = new System.Drawing.Point(118, 17);
     this.dialogPrintPreview.MinimumSize     = new System.Drawing.Size(375, 250);
     this.dialogPrintPreview.Name            = "dialogPrintPreview";
     this.dialogPrintPreview.TransparencyKey = System.Drawing.Color.Empty;
     this.dialogPrintPreview.Visible         = false;
     //
     // document
     //
     this.document.BeginPrint += new System.Drawing.Printing.PrintEventHandler(this.document_BeginPrint);
     this.document.PrintPage  += new System.Drawing.Printing.PrintPageEventHandler(this.document_PrintPage);
     //
     // dialogPrint
     //
     this.dialogPrint.Document = this.document;
     //
     // dialogPageSetup
     //
     this.dialogPageSetup.Document   = this.document;
     this.dialogPageSetup.MinMargins = new System.Drawing.Printing.Margins(50, 50, 50, 50);
 }
Пример #54
0
 /// <summary>
 /// 设计器支持所需的方法 - 不要使用代码编辑器修改
 /// 此方法的内容。
 /// </summary>
 private void InitializeComponent()
 {
     System.Resources.ResourceManager resources = new System.Resources.ResourceManager(typeof(frmSrChart));
     this.groupBox3           = new System.Windows.Forms.GroupBox();
     this.cmbCountry          = new System.Windows.Forms.ComboBox();
     this.label2              = new System.Windows.Forms.Label();
     this.groupBox2           = new System.Windows.Forms.GroupBox();
     this.button1             = new System.Windows.Forms.Button();
     this.cmbType             = new System.Windows.Forms.ComboBox();
     this.label4              = new System.Windows.Forms.Label();
     this.label3              = new System.Windows.Forms.Label();
     this.btnPrint            = new System.Windows.Forms.Button();
     this.dtTo                = new System.Windows.Forms.DateTimePicker();
     this.label1              = new System.Windows.Forms.Label();
     this.dtFrom              = new System.Windows.Forms.DateTimePicker();
     this.btnExit             = new System.Windows.Forms.Button();
     this.btnDisp             = new System.Windows.Forms.Button();
     this.tabChart            = new System.Windows.Forms.TabControl();
     this.tabPage1            = new System.Windows.Forms.TabPage();
     this.zedGraphControl1    = new ZedGraph.ZedGraphControl();
     this.lblInfo             = new System.Windows.Forms.Label();
     this.printDocument1      = new System.Drawing.Printing.PrintDocument();
     this.printPreviewDialog1 = new System.Windows.Forms.PrintPreviewDialog();
     this.groupBox1           = new System.Windows.Forms.GroupBox();
     this.trvDep              = new System.Windows.Forms.TreeView();
     this.numStart            = new System.Windows.Forms.NumericUpDown();
     this.numEnd              = new System.Windows.Forms.NumericUpDown();
     this.groupBox3.SuspendLayout();
     this.groupBox2.SuspendLayout();
     this.tabChart.SuspendLayout();
     this.tabPage1.SuspendLayout();
     this.groupBox1.SuspendLayout();
     ((System.ComponentModel.ISupportInitialize)(this.numStart)).BeginInit();
     ((System.ComponentModel.ISupportInitialize)(this.numEnd)).BeginInit();
     this.SuspendLayout();
     //
     // groupBox3
     //
     this.groupBox3.Controls.Add(this.cmbCountry);
     this.groupBox3.Controls.Add(this.label2);
     this.groupBox3.Location = new System.Drawing.Point(0, 0);
     this.groupBox3.Name     = "groupBox3";
     this.groupBox3.Size     = new System.Drawing.Size(200, 48);
     this.groupBox3.TabIndex = 7;
     this.groupBox3.TabStop  = false;
     //
     // cmbCountry
     //
     this.cmbCountry.Location              = new System.Drawing.Point(84, 13);
     this.cmbCountry.Name                  = "cmbCountry";
     this.cmbCountry.Size                  = new System.Drawing.Size(108, 20);
     this.cmbCountry.TabIndex              = 3;
     this.cmbCountry.SelectedIndexChanged += new System.EventHandler(this.cmbCountry_SelectedIndexChanged);
     //
     // label2
     //
     this.label2.Location  = new System.Drawing.Point(4, 13);
     this.label2.Name      = "label2";
     this.label2.Size      = new System.Drawing.Size(68, 23);
     this.label2.TabIndex  = 2;
     this.label2.Text      = "所属乡镇:";
     this.label2.TextAlign = System.Drawing.ContentAlignment.MiddleRight;
     //
     // groupBox2
     //
     this.groupBox2.Controls.Add(this.numEnd);
     this.groupBox2.Controls.Add(this.numStart);
     this.groupBox2.Controls.Add(this.button1);
     this.groupBox2.Controls.Add(this.cmbType);
     this.groupBox2.Controls.Add(this.label4);
     this.groupBox2.Controls.Add(this.label3);
     this.groupBox2.Controls.Add(this.btnPrint);
     this.groupBox2.Controls.Add(this.dtTo);
     this.groupBox2.Controls.Add(this.label1);
     this.groupBox2.Controls.Add(this.dtFrom);
     this.groupBox2.Controls.Add(this.btnExit);
     this.groupBox2.Controls.Add(this.btnDisp);
     this.groupBox2.Location = new System.Drawing.Point(208, 0);
     this.groupBox2.Name     = "groupBox2";
     this.groupBox2.Size     = new System.Drawing.Size(808, 48);
     this.groupBox2.TabIndex = 6;
     this.groupBox2.TabStop  = false;
     //
     // button1
     //
     this.button1.Location = new System.Drawing.Point(616, 16);
     this.button1.Name     = "button1";
     this.button1.Size     = new System.Drawing.Size(64, 23);
     this.button1.TabIndex = 11;
     this.button1.Text     = "日统计值图表";
     this.button1.Click   += new System.EventHandler(this.button1_Click);
     //
     // cmbType
     //
     this.cmbType.Location = new System.Drawing.Point(448, 16);
     this.cmbType.Name     = "cmbType";
     this.cmbType.Size     = new System.Drawing.Size(96, 20);
     this.cmbType.TabIndex = 10;
     //
     // label4
     //
     this.label4.Location  = new System.Drawing.Point(376, 16);
     this.label4.Name      = "label4";
     this.label4.Size      = new System.Drawing.Size(72, 23);
     this.label4.TabIndex  = 9;
     this.label4.Text      = "数据类型:";
     this.label4.TextAlign = System.Drawing.ContentAlignment.MiddleRight;
     //
     // label3
     //
     this.label3.Location  = new System.Drawing.Point(8, 16);
     this.label3.Name      = "label3";
     this.label3.Size      = new System.Drawing.Size(72, 23);
     this.label3.TabIndex  = 8;
     this.label3.Text      = "时间范围:";
     this.label3.TextAlign = System.Drawing.ContentAlignment.MiddleRight;
     //
     // btnPrint
     //
     this.btnPrint.Location = new System.Drawing.Point(680, 16);
     this.btnPrint.Name     = "btnPrint";
     this.btnPrint.Size     = new System.Drawing.Size(64, 23);
     this.btnPrint.TabIndex = 7;
     this.btnPrint.Text     = "打印";
     this.btnPrint.Click   += new System.EventHandler(this.btnPrint_Click);
     //
     // dtTo
     //
     this.dtTo.Location = new System.Drawing.Point(248, 17);
     this.dtTo.Name     = "dtTo";
     this.dtTo.Size     = new System.Drawing.Size(96, 21);
     this.dtTo.TabIndex = 4;
     //
     // label1
     //
     this.label1.Location  = new System.Drawing.Point(216, 16);
     this.label1.Name      = "label1";
     this.label1.Size      = new System.Drawing.Size(32, 23);
     this.label1.TabIndex  = 3;
     this.label1.Text      = "至:";
     this.label1.TextAlign = System.Drawing.ContentAlignment.MiddleRight;
     //
     // dtFrom
     //
     this.dtFrom.Location = new System.Drawing.Point(88, 16);
     this.dtFrom.Name     = "dtFrom";
     this.dtFrom.Size     = new System.Drawing.Size(96, 21);
     this.dtFrom.TabIndex = 2;
     //
     // btnExit
     //
     this.btnExit.Location = new System.Drawing.Point(744, 16);
     this.btnExit.Name     = "btnExit";
     this.btnExit.Size     = new System.Drawing.Size(56, 23);
     this.btnExit.TabIndex = 1;
     this.btnExit.Text     = "退出";
     this.btnExit.Click   += new System.EventHandler(this.btnExit_Click);
     //
     // btnDisp
     //
     this.btnDisp.Location = new System.Drawing.Point(552, 16);
     this.btnDisp.Name     = "btnDisp";
     this.btnDisp.Size     = new System.Drawing.Size(64, 23);
     this.btnDisp.TabIndex = 0;
     this.btnDisp.Text     = "明细图表";
     this.btnDisp.Click   += new System.EventHandler(this.btnDisp_Click);
     //
     // tabChart
     //
     this.tabChart.Controls.Add(this.tabPage1);
     this.tabChart.Location              = new System.Drawing.Point(208, 56);
     this.tabChart.Name                  = "tabChart";
     this.tabChart.SelectedIndex         = 0;
     this.tabChart.Size                  = new System.Drawing.Size(808, 496);
     this.tabChart.TabIndex              = 5;
     this.tabChart.SelectedIndexChanged += new System.EventHandler(this.tabChart_SelectedIndexChanged);
     //
     // tabPage1
     //
     this.tabPage1.BackColor = System.Drawing.SystemColors.Control;
     this.tabPage1.Controls.Add(this.zedGraphControl1);
     this.tabPage1.Controls.Add(this.lblInfo);
     this.tabPage1.Location = new System.Drawing.Point(4, 21);
     this.tabPage1.Name     = "tabPage1";
     this.tabPage1.Size     = new System.Drawing.Size(800, 471);
     this.tabPage1.TabIndex = 0;
     this.tabPage1.Text     = "历史曲线";
     //
     // zedGraphControl1
     //
     this.zedGraphControl1.BackColor              = System.Drawing.SystemColors.Window;
     this.zedGraphControl1.Dock                   = System.Windows.Forms.DockStyle.Fill;
     this.zedGraphControl1.IsAutoScrollRange      = false;
     this.zedGraphControl1.IsEnableHPan           = true;
     this.zedGraphControl1.IsEnableHZoom          = true;
     this.zedGraphControl1.IsEnableVPan           = true;
     this.zedGraphControl1.IsEnableVZoom          = true;
     this.zedGraphControl1.IsPrintFillPage        = true;
     this.zedGraphControl1.IsPrintKeepAspectRatio = true;
     this.zedGraphControl1.IsScrollY2             = false;
     this.zedGraphControl1.IsShowContextMenu      = true;
     this.zedGraphControl1.IsShowCopyMessage      = true;
     this.zedGraphControl1.IsShowCursorValues     = false;
     this.zedGraphControl1.IsShowHScrollBar       = false;
     this.zedGraphControl1.IsShowPointValues      = false;
     this.zedGraphControl1.IsShowVScrollBar       = false;
     this.zedGraphControl1.IsZoomOnMouseCenter    = false;
     this.zedGraphControl1.Location               = new System.Drawing.Point(0, 0);
     this.zedGraphControl1.Name                   = "zedGraphControl1";
     this.zedGraphControl1.PanButtons             = System.Windows.Forms.MouseButtons.Left;
     this.zedGraphControl1.PanButtons2            = System.Windows.Forms.MouseButtons.Middle;
     this.zedGraphControl1.PanModifierKeys2       = System.Windows.Forms.Keys.None;
     this.zedGraphControl1.PointDateFormat        = "g";
     this.zedGraphControl1.PointValueFormat       = "G";
     this.zedGraphControl1.ScrollMaxX             = 0;
     this.zedGraphControl1.ScrollMaxY             = 0;
     this.zedGraphControl1.ScrollMaxY2            = 0;
     this.zedGraphControl1.ScrollMinX             = 0;
     this.zedGraphControl1.ScrollMinY             = 0;
     this.zedGraphControl1.ScrollMinY2            = 0;
     this.zedGraphControl1.Size                   = new System.Drawing.Size(800, 471);
     this.zedGraphControl1.TabIndex               = 1;
     this.zedGraphControl1.ZoomButtons            = System.Windows.Forms.MouseButtons.Left;
     this.zedGraphControl1.ZoomButtons2           = System.Windows.Forms.MouseButtons.None;
     this.zedGraphControl1.ZoomModifierKeys       = System.Windows.Forms.Keys.None;
     this.zedGraphControl1.ZoomModifierKeys2      = System.Windows.Forms.Keys.None;
     this.zedGraphControl1.ZoomStepFraction       = 0.1;
     //
     // lblInfo
     //
     this.lblInfo.BackColor = System.Drawing.SystemColors.ActiveCaptionText;
     this.lblInfo.Location  = new System.Drawing.Point(16, 16);
     this.lblInfo.Name      = "lblInfo";
     this.lblInfo.Size      = new System.Drawing.Size(440, 16);
     this.lblInfo.TabIndex  = 0;
     this.lblInfo.TextAlign = System.Drawing.ContentAlignment.MiddleLeft;
     //
     // printDocument1
     //
     this.printDocument1.PrintPage += new System.Drawing.Printing.PrintPageEventHandler(this.printDocument1_PrintPage);
     //
     // printPreviewDialog1
     //
     this.printPreviewDialog1.AutoScrollMargin  = new System.Drawing.Size(0, 0);
     this.printPreviewDialog1.AutoScrollMinSize = new System.Drawing.Size(0, 0);
     this.printPreviewDialog1.ClientSize        = new System.Drawing.Size(400, 300);
     this.printPreviewDialog1.Enabled           = true;
     this.printPreviewDialog1.Icon            = ((System.Drawing.Icon)(resources.GetObject("printPreviewDialog1.Icon")));
     this.printPreviewDialog1.Location        = new System.Drawing.Point(17, 17);
     this.printPreviewDialog1.MinimumSize     = new System.Drawing.Size(375, 250);
     this.printPreviewDialog1.Name            = "printPreviewDialog1";
     this.printPreviewDialog1.TransparencyKey = System.Drawing.Color.Empty;
     this.printPreviewDialog1.Visible         = false;
     this.printPreviewDialog1.Load           += new System.EventHandler(this.printPreviewDialog1_Load);
     //
     // groupBox1
     //
     this.groupBox1.Controls.Add(this.trvDep);
     this.groupBox1.Location = new System.Drawing.Point(0, 48);
     this.groupBox1.Name     = "groupBox1";
     this.groupBox1.Size     = new System.Drawing.Size(200, 496);
     this.groupBox1.TabIndex = 4;
     this.groupBox1.TabStop  = false;
     //
     // trvDep
     //
     this.trvDep.ImageIndex         = -1;
     this.trvDep.Location           = new System.Drawing.Point(8, 16);
     this.trvDep.Name               = "trvDep";
     this.trvDep.SelectedImageIndex = -1;
     this.trvDep.Size               = new System.Drawing.Size(184, 472);
     this.trvDep.TabIndex           = 0;
     //
     // numStart
     //
     this.numStart.Location = new System.Drawing.Point(184, 17);
     this.numStart.Maximum  = new System.Decimal(new int[] {
         23,
         0,
         0,
         0
     });
     this.numStart.Name     = "numStart";
     this.numStart.Size     = new System.Drawing.Size(32, 21);
     this.numStart.TabIndex = 12;
     this.numStart.Value    = new System.Decimal(new int[] {
         8,
         0,
         0,
         0
     });
     //
     // numEnd
     //
     this.numEnd.Location = new System.Drawing.Point(344, 17);
     this.numEnd.Maximum  = new System.Decimal(new int[] {
         23,
         0,
         0,
         0
     });
     this.numEnd.Name     = "numEnd";
     this.numEnd.Size     = new System.Drawing.Size(32, 21);
     this.numEnd.TabIndex = 13;
     this.numEnd.Value    = new System.Decimal(new int[] {
         8,
         0,
         0,
         0
     });
     //
     // frmSrChart
     //
     this.AutoScaleBaseSize = new System.Drawing.Size(6, 14);
     this.ClientSize        = new System.Drawing.Size(1016, 558);
     this.Controls.Add(this.groupBox3);
     this.Controls.Add(this.groupBox2);
     this.Controls.Add(this.tabChart);
     this.Controls.Add(this.groupBox1);
     this.Name    = "frmSrChart";
     this.Text    = "数据图表";
     this.Resize += new System.EventHandler(this.frmSrChart_Resize);
     this.Load   += new System.EventHandler(this.frmSrChart_Load);
     this.groupBox3.ResumeLayout(false);
     this.groupBox2.ResumeLayout(false);
     this.tabChart.ResumeLayout(false);
     this.tabPage1.ResumeLayout(false);
     this.groupBox1.ResumeLayout(false);
     ((System.ComponentModel.ISupportInitialize)(this.numStart)).EndInit();
     ((System.ComponentModel.ISupportInitialize)(this.numEnd)).EndInit();
     this.ResumeLayout(false);
 }
Пример #55
0
 /// <summary>
 /// Required method for Designer support - do not modify
 /// the contents of this method with the code editor.
 /// </summary>
 private void InitializeComponent()
 {
     this.components = new System.ComponentModel.Container();
     System.Resources.ResourceManager resources = new System.Resources.ResourceManager(typeof(Form1));
     this.mainMenu1               = new System.Windows.Forms.MainMenu();
     this.menuItem1               = new System.Windows.Forms.MenuItem();
     this.menuItem2_New           = new System.Windows.Forms.MenuItem();
     this.menuItem3_Open          = new System.Windows.Forms.MenuItem();
     this.menuItem8_Save          = new System.Windows.Forms.MenuItem();
     this.menuItem9_SaveAs        = new System.Windows.Forms.MenuItem();
     this.menuItem4               = new System.Windows.Forms.MenuItem();
     this.menuItem11_PageSetup    = new System.Windows.Forms.MenuItem();
     this.menuItem12_PrintPreview = new System.Windows.Forms.MenuItem();
     this.menuItem10_Print        = new System.Windows.Forms.MenuItem();
     this.menuItem5_RecentFiles4  = new System.Windows.Forms.MenuItem();
     this.menuItem6               = new System.Windows.Forms.MenuItem();
     this.menuItem7_Exit          = new System.Windows.Forms.MenuItem();
     this.menuItem13              = new System.Windows.Forms.MenuItem();
     this.menuItem14_Undo         = new System.Windows.Forms.MenuItem();
     this.menuItem16              = new System.Windows.Forms.MenuItem();
     this.menuItem17_Cut          = new System.Windows.Forms.MenuItem();
     this.menuItem18_Copy         = new System.Windows.Forms.MenuItem();
     this.menuItem19_Paste        = new System.Windows.Forms.MenuItem();
     this.menuItem15              = new System.Windows.Forms.MenuItem();
     this.menuItem20_WordWrap     = new System.Windows.Forms.MenuItem();
     this.menuItem21              = new System.Windows.Forms.MenuItem();
     this.statusBar1              = new System.Windows.Forms.StatusBar();
     this.openFileDialog1         = new System.Windows.Forms.OpenFileDialog();
     this.saveFileDialog1         = new System.Windows.Forms.SaveFileDialog();
     this.printDialog1            = new System.Windows.Forms.PrintDialog();
     this.printDocument1          = new System.Drawing.Printing.PrintDocument();
     this.printPreviewDialog1     = new System.Windows.Forms.PrintPreviewDialog();
     this.pageSetupDialog1        = new System.Windows.Forms.PageSetupDialog();
     this.fontDialog1             = new System.Windows.Forms.FontDialog();
     this.imageList1              = new System.Windows.Forms.ImageList(this.components);
     this.toolBar1             = new System.Windows.Forms.ToolBar();
     this.toolBarButton1_New   = new System.Windows.Forms.ToolBarButton();
     this.toolBarButton2_Open  = new System.Windows.Forms.ToolBarButton();
     this.toolBarButton3_Save  = new System.Windows.Forms.ToolBarButton();
     this.toolBarButton4       = new System.Windows.Forms.ToolBarButton();
     this.toolBarButton5_Cut   = new System.Windows.Forms.ToolBarButton();
     this.toolBarButton6_Copy  = new System.Windows.Forms.ToolBarButton();
     this.toolBarButton7_Paste = new System.Windows.Forms.ToolBarButton();
     this.toolBarButton1       = new System.Windows.Forms.ToolBarButton();
     this.toolBarButton2       = new System.Windows.Forms.ToolBarButton();
     this.toolBarButton3       = new System.Windows.Forms.ToolBarButton();
     this.toolBarButton5       = new System.Windows.Forms.ToolBarButton();
     this.toolBarButton6       = new System.Windows.Forms.ToolBarButton();
     this.toolBarButton7       = new System.Windows.Forms.ToolBarButton();
     this.toolBarButton8       = new System.Windows.Forms.ToolBarButton();
     this.toolBarButton9       = new System.Windows.Forms.ToolBarButton();
     this.toolBarButton10      = new System.Windows.Forms.ToolBarButton();
     this.toolBarButton11      = new System.Windows.Forms.ToolBarButton();
     this.toolBarButton12      = new System.Windows.Forms.ToolBarButton();
     this.toolBarButton13      = new System.Windows.Forms.ToolBarButton();
     this.toolBarButton14      = new System.Windows.Forms.ToolBarButton();
     this.toolBarButton15      = new System.Windows.Forms.ToolBarButton();
     this.toolBarButton16      = new System.Windows.Forms.ToolBarButton();
     this.toolBarButton17      = new System.Windows.Forms.ToolBarButton();
     this.toolBarButton18      = new System.Windows.Forms.ToolBarButton();
     this.toolBarButton_Print  = new System.Windows.Forms.ToolBarButton();
     this.toolBarButton20      = new System.Windows.Forms.ToolBarButton();
     this.text_Box1            = new Salford.VisualClearWin.Text_Box();
     this.comboBox1            = new System.Windows.Forms.ComboBox();
     this.toolTip1             = new System.Windows.Forms.ToolTip(this.components);
     this.SuspendLayout();
     //
     // mainMenu1
     //
     this.mainMenu1.MenuItems.AddRange(new System.Windows.Forms.MenuItem[] {
         this.menuItem1,
         this.menuItem13,
         this.menuItem15
     });
     //
     // menuItem1
     //
     this.menuItem1.Index = 0;
     this.menuItem1.MenuItems.AddRange(new System.Windows.Forms.MenuItem[] {
         this.menuItem2_New,
         this.menuItem3_Open,
         this.menuItem8_Save,
         this.menuItem9_SaveAs,
         this.menuItem4,
         this.menuItem11_PageSetup,
         this.menuItem12_PrintPreview,
         this.menuItem10_Print,
         this.menuItem5_RecentFiles4,
         this.menuItem6,
         this.menuItem7_Exit
     });
     this.menuItem1.MergeType = System.Windows.Forms.MenuMerge.MergeItems;
     this.menuItem1.Text      = "&File";
     //
     // menuItem2_New
     //
     this.menuItem2_New.Index = 0;
     this.menuItem2_New.Text  = "New|Creates a new document";
     //
     // menuItem3_Open
     //
     this.menuItem3_Open.Index = 1;
     this.menuItem3_Open.Text  = "&Open|Opens files";
     //
     // menuItem8_Save
     //
     this.menuItem8_Save.Enabled = false;
     this.menuItem8_Save.Index   = 2;
     this.menuItem8_Save.Text    = "Save|Saves the document";
     //
     // menuItem9_SaveAs
     //
     this.menuItem9_SaveAs.Index = 3;
     this.menuItem9_SaveAs.Text  = "Save As|Saves the document with a different name";
     //
     // menuItem4
     //
     this.menuItem4.Index = 4;
     this.menuItem4.Text  = "-";
     //
     // menuItem11_PageSetup
     //
     this.menuItem11_PageSetup.Index = 5;
     this.menuItem11_PageSetup.Text  = "Page Setup|Displays the Page Setup dialog";
     //
     // menuItem12_PrintPreview
     //
     this.menuItem12_PrintPreview.Index = 6;
     this.menuItem12_PrintPreview.Text  = "Print Preview|Displays the Print Preview dialog";
     //
     // menuItem10_Print
     //
     this.menuItem10_Print.Index = 7;
     this.menuItem10_Print.Text  = "Print...|Starts a printing process";
     //
     // menuItem5_RecentFiles4
     //
     this.menuItem5_RecentFiles4.Index = 8;
     this.menuItem5_RecentFiles4.Text  = "Recent files";
     //
     // menuItem6
     //
     this.menuItem6.Index = 9;
     this.menuItem6.Text  = "-";
     //
     // menuItem7_Exit
     //
     this.menuItem7_Exit.Index = 10;
     this.menuItem7_Exit.Text  = "Exit|Exits from the application";
     //
     // menuItem13
     //
     this.menuItem13.Index = 1;
     this.menuItem13.MenuItems.AddRange(new System.Windows.Forms.MenuItem[] {
         this.menuItem14_Undo,
         this.menuItem16,
         this.menuItem17_Cut,
         this.menuItem18_Copy,
         this.menuItem19_Paste
     });
     this.menuItem13.Text = "Edit";
     //
     // menuItem14_Undo
     //
     this.menuItem14_Undo.Index = 0;
     this.menuItem14_Undo.Text  = "Undo|Undoes the last edit";
     //
     // menuItem16
     //
     this.menuItem16.Index = 1;
     this.menuItem16.Text  = "-";
     //
     // menuItem17_Cut
     //
     this.menuItem17_Cut.Index = 2;
     this.menuItem17_Cut.Text  = "Cut|Cuts the selection to the clipboard";
     //
     // menuItem18_Copy
     //
     this.menuItem18_Copy.Index = 3;
     this.menuItem18_Copy.Text  = "Copy|Copies the selection to the clipboard";
     //
     // menuItem19_Paste
     //
     this.menuItem19_Paste.Index = 4;
     this.menuItem19_Paste.Text  = "Paste|Pastes the clipboard at the current position";
     //
     // menuItem15
     //
     this.menuItem15.Index = 2;
     this.menuItem15.MenuItems.AddRange(new System.Windows.Forms.MenuItem[] {
         this.menuItem20_WordWrap,
         this.menuItem21
     });
     this.menuItem15.Text = "Format";
     //
     // menuItem20_WordWrap
     //
     this.menuItem20_WordWrap.Index = 0;
     this.menuItem20_WordWrap.Text  = "Word Wrap|Toggles the Word Wrap property";
     //
     // menuItem21
     //
     this.menuItem21.Index = 1;
     this.menuItem21.Text  = "Font...|Displays the Font dialog";
     //
     // statusBar1
     //
     this.statusBar1.Location = new System.Drawing.Point(0, 401);
     this.statusBar1.Name     = "statusBar1";
     this.statusBar1.Size     = new System.Drawing.Size(696, 24);
     this.statusBar1.TabIndex = 1;
     this.statusBar1.Text     = "Ready";
     //
     // openFileDialog1
     //
     this.openFileDialog1.Filter = "Fotran files (*.f95)|*.f95|All files (*.*)|*.*";
     //
     // saveFileDialog1
     //
     this.saveFileDialog1.Filter = "Fortran files (*.f95)|*.f95|All files (*.*)|*.*";
     //
     // printDialog1
     //
     this.printDialog1.AllowSomePages = true;
     this.printDialog1.Document       = this.printDocument1;
     //
     // printPreviewDialog1
     //
     this.printPreviewDialog1.AutoScrollMargin  = new System.Drawing.Size(0, 0);
     this.printPreviewDialog1.AutoScrollMinSize = new System.Drawing.Size(0, 0);
     this.printPreviewDialog1.ClientSize        = new System.Drawing.Size(400, 300);
     this.printPreviewDialog1.Document          = this.printDocument1;
     this.printPreviewDialog1.Enabled           = true;
     this.printPreviewDialog1.Icon            = ((System.Drawing.Icon)(resources.GetObject("printPreviewDialog1.Icon")));
     this.printPreviewDialog1.Location        = new System.Drawing.Point(627, 17);
     this.printPreviewDialog1.MaximumSize     = new System.Drawing.Size(0, 0);
     this.printPreviewDialog1.Name            = "printPreviewDialog1";
     this.printPreviewDialog1.Opacity         = 1;
     this.printPreviewDialog1.TransparencyKey = System.Drawing.Color.Empty;
     this.printPreviewDialog1.Visible         = false;
     //
     // pageSetupDialog1
     //
     this.pageSetupDialog1.Document = this.printDocument1;
     //
     // fontDialog1
     //
     this.fontDialog1.ShowColor = true;
     //
     // imageList1
     //
     this.imageList1.ColorDepth       = System.Windows.Forms.ColorDepth.Depth24Bit;
     this.imageList1.ImageSize        = new System.Drawing.Size(16, 16);
     this.imageList1.ImageStream      = ((System.Windows.Forms.ImageListStreamer)(resources.GetObject("imageList1.ImageStream")));
     this.imageList1.TransparentColor = System.Drawing.Color.Transparent;
     //
     // toolBar1
     //
     this.toolBar1.Appearance = System.Windows.Forms.ToolBarAppearance.Flat;
     this.toolBar1.Buttons.AddRange(new System.Windows.Forms.ToolBarButton[] {
         this.toolBarButton1_New,
         this.toolBarButton2_Open,
         this.toolBarButton3_Save,
         this.toolBarButton4,
         this.toolBarButton5_Cut,
         this.toolBarButton6_Copy,
         this.toolBarButton7_Paste,
         this.toolBarButton1,
         this.toolBarButton2,
         this.toolBarButton3,
         this.toolBarButton5,
         this.toolBarButton6,
         this.toolBarButton7,
         this.toolBarButton8,
         this.toolBarButton9,
         this.toolBarButton10,
         this.toolBarButton11,
         this.toolBarButton12,
         this.toolBarButton13,
         this.toolBarButton14,
         this.toolBarButton15,
         this.toolBarButton16,
         this.toolBarButton17,
         this.toolBarButton18,
         this.toolBarButton_Print,
         this.toolBarButton20
     });
     this.toolBar1.ButtonSize     = new System.Drawing.Size(16, 16);
     this.toolBar1.DropDownArrows = true;
     this.toolBar1.ImageList      = this.imageList1;
     this.toolBar1.Name           = "toolBar1";
     this.toolBar1.ShowToolTips   = true;
     this.toolBar1.Size           = new System.Drawing.Size(696, 25);
     this.toolBar1.TabIndex       = 4;
     //
     // toolBarButton1_New
     //
     this.toolBarButton1_New.ImageIndex  = 0;
     this.toolBarButton1_New.ToolTipText = "New";
     //
     // toolBarButton2_Open
     //
     this.toolBarButton2_Open.ImageIndex  = 1;
     this.toolBarButton2_Open.ToolTipText = "Open";
     //
     // toolBarButton3_Save
     //
     this.toolBarButton3_Save.ImageIndex  = 2;
     this.toolBarButton3_Save.ToolTipText = "Save";
     //
     // toolBarButton4
     //
     this.toolBarButton4.Style = System.Windows.Forms.ToolBarButtonStyle.Separator;
     //
     // toolBarButton5_Cut
     //
     this.toolBarButton5_Cut.ImageIndex  = 4;
     this.toolBarButton5_Cut.ToolTipText = "Cut";
     //
     // toolBarButton6_Copy
     //
     this.toolBarButton6_Copy.ImageIndex  = 5;
     this.toolBarButton6_Copy.ToolTipText = "Copy";
     //
     // toolBarButton7_Paste
     //
     this.toolBarButton7_Paste.ImageIndex  = 6;
     this.toolBarButton7_Paste.ToolTipText = "Paste";
     //
     // toolBarButton1
     //
     this.toolBarButton1.Style = System.Windows.Forms.ToolBarButtonStyle.Separator;
     this.toolBarButton1.Text  = "comboBox1";
     //
     // toolBarButton2
     //
     this.toolBarButton2.Style = System.Windows.Forms.ToolBarButtonStyle.Separator;
     //
     // toolBarButton3
     //
     this.toolBarButton3.Style = System.Windows.Forms.ToolBarButtonStyle.Separator;
     //
     // toolBarButton5
     //
     this.toolBarButton5.Style = System.Windows.Forms.ToolBarButtonStyle.Separator;
     //
     // toolBarButton6
     //
     this.toolBarButton6.Style = System.Windows.Forms.ToolBarButtonStyle.Separator;
     //
     // toolBarButton7
     //
     this.toolBarButton7.Style = System.Windows.Forms.ToolBarButtonStyle.Separator;
     //
     // toolBarButton8
     //
     this.toolBarButton8.Style = System.Windows.Forms.ToolBarButtonStyle.Separator;
     //
     // toolBarButton9
     //
     this.toolBarButton9.Style = System.Windows.Forms.ToolBarButtonStyle.Separator;
     //
     // toolBarButton10
     //
     this.toolBarButton10.Style = System.Windows.Forms.ToolBarButtonStyle.Separator;
     //
     // toolBarButton11
     //
     this.toolBarButton11.Style = System.Windows.Forms.ToolBarButtonStyle.Separator;
     //
     // toolBarButton12
     //
     this.toolBarButton12.Style = System.Windows.Forms.ToolBarButtonStyle.Separator;
     //
     // toolBarButton13
     //
     this.toolBarButton13.Style = System.Windows.Forms.ToolBarButtonStyle.Separator;
     //
     // toolBarButton14
     //
     this.toolBarButton14.Style = System.Windows.Forms.ToolBarButtonStyle.Separator;
     //
     // toolBarButton15
     //
     this.toolBarButton15.Style = System.Windows.Forms.ToolBarButtonStyle.Separator;
     //
     // toolBarButton16
     //
     this.toolBarButton16.Style = System.Windows.Forms.ToolBarButtonStyle.Separator;
     //
     // toolBarButton17
     //
     this.toolBarButton17.Style = System.Windows.Forms.ToolBarButtonStyle.Separator;
     //
     // toolBarButton18
     //
     this.toolBarButton18.Style = System.Windows.Forms.ToolBarButtonStyle.Separator;
     this.toolBarButton18.Text  = "comboBox1";
     //
     // toolBarButton_Print
     //
     this.toolBarButton_Print.ImageIndex  = 7;
     this.toolBarButton_Print.ToolTipText = "Print";
     //
     // toolBarButton20
     //
     this.toolBarButton20.ImageIndex  = 8;
     this.toolBarButton20.ToolTipText = "Find";
     //
     // text_Box1
     //
     this.text_Box1.Dock          = System.Windows.Forms.DockStyle.Fill;
     this.text_Box1.Font          = new System.Drawing.Font("Arial", 9.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((System.Byte)(0)));
     this.text_Box1.HideSelection = false;
     this.text_Box1.Location      = new System.Drawing.Point(0, 25);
     this.text_Box1.MaxLength     = 0;
     this.text_Box1.Multiline     = true;
     this.text_Box1.Name          = "text_Box1";
     this.text_Box1.ScrollBars    = System.Windows.Forms.ScrollBars.Both;
     this.text_Box1.Size          = new System.Drawing.Size(696, 376);
     this.text_Box1.TabIndex      = 0;
     this.text_Box1.Text          = "";
     //
     // comboBox1
     //
     this.comboBox1.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList;
     this.comboBox1.Font          = new System.Drawing.Font("Microsoft Sans Serif", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((System.Byte)(0)));
     this.comboBox1.Items.AddRange(new object[] {
         "Courier New",
         "Microsoft Sans Serif"
     });
     this.comboBox1.Location         = new System.Drawing.Point(150, 4);
     this.comboBox1.MaxDropDownItems = 16;
     this.comboBox1.MaxLength        = 80;
     this.comboBox1.Name             = "comboBox1";
     this.comboBox1.Size             = new System.Drawing.Size(126, 21);
     this.comboBox1.TabIndex         = 6;
     this.toolTip1.SetToolTip(this.comboBox1, "Font name");
     //
     // Form1
     //
     this.AllowDrop         = true;
     this.AutoScaleBaseSize = new System.Drawing.Size(6, 15);
     this.ClientSize        = new System.Drawing.Size(696, 425);
     this.Controls.AddRange(new System.Windows.Forms.Control[] {
         this.comboBox1,
         this.text_Box1,
         this.toolBar1,
         this.statusBar1
     });
     this.Font          = new System.Drawing.Font("Arial", 9.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((System.Byte)(0)));
     this.Menu          = this.mainMenu1;
     this.Name          = "Form1";
     this.StartPosition = System.Windows.Forms.FormStartPosition.CenterScreen;
     this.Text          = "MyNotes";
     this.ResumeLayout(false);
 }
Пример #56
0
 /// <summary>
 /// 设计器支持所需的方法 - 不要使用代码编辑器修改
 /// 此方法的内容。
 /// </summary>
 private void InitializeComponent()
 {
     this.components = new System.ComponentModel.Container();
     System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(frmStatPatientFlowDaily));
     this.label1             = new System.Windows.Forms.Label();
     this.label2             = new System.Windows.Forms.Label();
     this.cmdClose           = new PinkieControls.ButtonXP();
     this.m_pdSickRoomLog    = new System.Drawing.Printing.PrintDocument();
     this.printPreviewDialog = new System.Windows.Forms.PrintPreviewDialog();
     this.buttonXP1          = new PinkieControls.ButtonXP();
     this.m_cmdPrint         = new PinkieControls.ButtonXP();
     this.groupBox1          = new System.Windows.Forms.GroupBox();
     this.m_txtAREAID_CHR    = new ControlLibrary.txtListView(this.components);
     this.label3             = new System.Windows.Forms.Label();
     this.m_dtToTime         = new NullableDateControls.MaskDateEdit();
     this.m_dtpDateTime      = new NullableDateControls.MaskDateEdit();
     this.printDialog        = new com.digitalwave.controls.Control.MyPrintPreViewControl();
     this.groupBox1.SuspendLayout();
     this.SuspendLayout();
     //
     // label1
     //
     this.label1.AutoSize  = true;
     this.label1.Font      = new System.Drawing.Font("宋体", 10.5F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
     this.label1.Location  = new System.Drawing.Point(304, 27);
     this.label1.Name      = "label1";
     this.label1.Size      = new System.Drawing.Size(70, 14);
     this.label1.TabIndex  = 8;
     this.label1.Text      = "查询时间:";
     this.label1.TextAlign = System.Drawing.ContentAlignment.MiddleRight;
     //
     // label2
     //
     this.label2.AutoSize = true;
     this.label2.Font     = new System.Drawing.Font("宋体", 10.5F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
     this.label2.Location = new System.Drawing.Point(8, 27);
     this.label2.Name     = "label2";
     this.label2.Size     = new System.Drawing.Size(70, 14);
     this.label2.TabIndex = 16;
     this.label2.Text     = "病区名称:";
     //
     // cmdClose
     //
     this.cmdClose.BackColor     = System.Drawing.Color.FromArgb(((int)(((byte)(0)))), ((int)(((byte)(212)))), ((int)(((byte)(208)))), ((int)(((byte)(200)))));
     this.cmdClose.DefaultScheme = true;
     this.cmdClose.DialogResult  = System.Windows.Forms.DialogResult.None;
     this.cmdClose.Font          = new System.Drawing.Font("宋体", 10.5F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
     this.cmdClose.Hint          = "";
     this.cmdClose.Location      = new System.Drawing.Point(915, 16);
     this.cmdClose.Name          = "cmdClose";
     this.cmdClose.Scheme        = PinkieControls.ButtonXP.Schemes.Blue;
     this.cmdClose.Size          = new System.Drawing.Size(80, 31);
     this.cmdClose.TabIndex      = 6;
     this.cmdClose.Text          = "关  闭(&C)";
     this.cmdClose.Click        += new System.EventHandler(this.cmdClose_Click);
     //
     // m_pdSickRoomLog
     //
     this.m_pdSickRoomLog.PrintPage  += new System.Drawing.Printing.PrintPageEventHandler(this.m_pdSickRoomLog_PrintPage);
     this.m_pdSickRoomLog.BeginPrint += new System.Drawing.Printing.PrintEventHandler(this.m_pdSickRoomLog_BeginPrint);
     //
     // printPreviewDialog
     //
     this.printPreviewDialog.AutoScrollMargin  = new System.Drawing.Size(0, 0);
     this.printPreviewDialog.AutoScrollMinSize = new System.Drawing.Size(0, 0);
     this.printPreviewDialog.ClientSize        = new System.Drawing.Size(400, 300);
     this.printPreviewDialog.Document          = this.m_pdSickRoomLog;
     this.printPreviewDialog.Enabled           = true;
     this.printPreviewDialog.Icon    = ((System.Drawing.Icon)(resources.GetObject("printPreviewDialog.Icon")));
     this.printPreviewDialog.Name    = "printPreviewDialog";
     this.printPreviewDialog.Visible = false;
     //
     // buttonXP1
     //
     this.buttonXP1.BackColor     = System.Drawing.Color.FromArgb(((int)(((byte)(0)))), ((int)(((byte)(212)))), ((int)(((byte)(208)))), ((int)(((byte)(200)))));
     this.buttonXP1.DefaultScheme = true;
     this.buttonXP1.DialogResult  = System.Windows.Forms.DialogResult.None;
     this.buttonXP1.Hint          = "";
     this.buttonXP1.Location      = new System.Drawing.Point(723, 16);
     this.buttonXP1.Name          = "buttonXP1";
     this.buttonXP1.Scheme        = PinkieControls.ButtonXP.Schemes.Blue;
     this.buttonXP1.Size          = new System.Drawing.Size(80, 31);
     this.buttonXP1.TabIndex      = 4;
     this.buttonXP1.Text          = "统计(&F)";
     this.buttonXP1.Click        += new System.EventHandler(this.buttonXP1_Click);
     //
     // m_cmdPrint
     //
     this.m_cmdPrint.BackColor     = System.Drawing.Color.FromArgb(((int)(((byte)(0)))), ((int)(((byte)(212)))), ((int)(((byte)(208)))), ((int)(((byte)(200)))));
     this.m_cmdPrint.DefaultScheme = true;
     this.m_cmdPrint.DialogResult  = System.Windows.Forms.DialogResult.None;
     this.m_cmdPrint.Hint          = "";
     this.m_cmdPrint.Location      = new System.Drawing.Point(819, 16);
     this.m_cmdPrint.Name          = "m_cmdPrint";
     this.m_cmdPrint.Scheme        = PinkieControls.ButtonXP.Schemes.Blue;
     this.m_cmdPrint.Size          = new System.Drawing.Size(80, 31);
     this.m_cmdPrint.TabIndex      = 5;
     this.m_cmdPrint.Text          = "打印(&D)";
     this.m_cmdPrint.Click        += new System.EventHandler(this.m_cmdPrint_Click);
     //
     // groupBox1
     //
     this.groupBox1.Controls.Add(this.m_txtAREAID_CHR);
     this.groupBox1.Controls.Add(this.m_cmdPrint);
     this.groupBox1.Controls.Add(this.label2);
     this.groupBox1.Controls.Add(this.cmdClose);
     this.groupBox1.Controls.Add(this.buttonXP1);
     this.groupBox1.Controls.Add(this.label3);
     this.groupBox1.Controls.Add(this.label1);
     this.groupBox1.Dock     = System.Windows.Forms.DockStyle.Top;
     this.groupBox1.Location = new System.Drawing.Point(0, 0);
     this.groupBox1.Name     = "groupBox1";
     this.groupBox1.Size     = new System.Drawing.Size(1002, 56);
     this.groupBox1.TabIndex = 22;
     this.groupBox1.TabStop  = false;
     //
     // m_txtAREAID_CHR
     //
     this.m_txtAREAID_CHR.findDataMode    = ControlLibrary.txtListView.findMode.fromDataSouse;
     this.m_txtAREAID_CHR.Location        = new System.Drawing.Point(84, 20);
     this.m_txtAREAID_CHR.m_blnFocuseShow = true;
     this.m_txtAREAID_CHR.m_blnPagination = false;
     this.m_txtAREAID_CHR.m_dtbDataSourse = null;
     this.m_txtAREAID_CHR.m_intDelayTime  = 100;
     this.m_txtAREAID_CHR.m_intPageRows   = 10;
     this.m_txtAREAID_CHR.m_ListViewAlign = ControlLibrary.txtListView.ListViewAlign.LeftBottom;
     this.m_txtAREAID_CHR.m_listViewSize  = new System.Drawing.Point(260, 100);
     this.m_txtAREAID_CHR.m_strFieldsArr  = new string[] {
         "code_vchr",
         "pycode_chr",
         "deptname_vchr"
     };
     this.m_txtAREAID_CHR.m_strSaveField = "deptid_chr";
     this.m_txtAREAID_CHR.m_strShowField = "deptname_vchr";
     this.m_txtAREAID_CHR.m_strSQL       = null;
     this.m_txtAREAID_CHR.Name           = "m_txtAREAID_CHR";
     this.m_txtAREAID_CHR.Size           = new System.Drawing.Size(200, 23);
     this.m_txtAREAID_CHR.TabIndex       = 1;
     //
     // label3
     //
     this.label3.AutoSize  = true;
     this.label3.Font      = new System.Drawing.Font("宋体", 10.5F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
     this.label3.Location  = new System.Drawing.Point(518, 31);
     this.label3.Name      = "label3";
     this.label3.Size      = new System.Drawing.Size(15, 14);
     this.label3.TabIndex  = 8;
     this.label3.Text      = "~";
     this.label3.TextAlign = System.Drawing.ContentAlignment.MiddleRight;
     this.label3.Visible   = false;
     //
     // m_dtToTime
     //
     this.m_dtToTime.Location = new System.Drawing.Point(540, 23);
     this.m_dtToTime.Mask     = "yyyy年MM月dd日";
     this.m_dtToTime.Name     = "m_dtToTime";
     this.m_dtToTime.Size     = new System.Drawing.Size(139, 23);
     this.m_dtToTime.TabIndex = 3;
     this.m_dtToTime.Visible  = false;
     //
     // m_dtpDateTime
     //
     this.m_dtpDateTime.Location = new System.Drawing.Point(376, 23);
     this.m_dtpDateTime.Mask     = "yyyy年MM月dd日";
     this.m_dtpDateTime.Name     = "m_dtpDateTime";
     this.m_dtpDateTime.Size     = new System.Drawing.Size(139, 23);
     this.m_dtpDateTime.TabIndex = 2;
     //
     // printDialog
     //
     this.printDialog.Dock            = System.Windows.Forms.DockStyle.Fill;
     this.printDialog.Document        = this.m_pdSickRoomLog;
     this.printDialog.Location        = new System.Drawing.Point(0, 56);
     this.printDialog.Name            = "printDialog";
     this.printDialog.ReportName      = "";
     this.printDialog.ShowPannel      = false;
     this.printDialog.ShowPrintButton = true;
     this.printDialog.Size            = new System.Drawing.Size(1002, 607);
     this.printDialog.TabIndex        = 23;
     //
     // frmStatPatientFlowDaily
     //
     this.AutoScaleBaseSize = new System.Drawing.Size(7, 16);
     this.ClientSize        = new System.Drawing.Size(1002, 663);
     this.Controls.Add(this.m_dtToTime);
     this.Controls.Add(this.m_dtpDateTime);
     this.Controls.Add(this.printDialog);
     this.Controls.Add(this.groupBox1);
     this.Font       = new System.Drawing.Font("宋体", 10.5F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
     this.KeyPreview = true;
     this.Name       = "frmStatPatientFlowDaily";
     this.Text       = "病人流动日报";
     this.KeyDown   += new System.Windows.Forms.KeyEventHandler(this.frmStatPatientFlowDaily_KeyDown);
     this.Load      += new System.EventHandler(this.frmStatPatientFlowDaily_Load);
     this.groupBox1.ResumeLayout(false);
     this.groupBox1.PerformLayout();
     this.ResumeLayout(false);
     this.PerformLayout();
 }
Пример #57
0
 /// <summary>
 /// 设计器支持所需的方法 - 不要使用代码编辑器修改
 /// 此方法的内容。
 /// </summary>
 private void InitializeComponent()
 {
     this.components = new System.ComponentModel.Container();
     System.Resources.ResourceManager resources = new System.Resources.ResourceManager(typeof(Form1));
     this.button1             = new System.Windows.Forms.Button();
     this.printPreviewDialog2 = new System.Windows.Forms.PrintPreviewDialog();
     this.printingSystem1     = new DevExpress.XtraPrinting.PrintingSystem(this.components);
     this.link1                   = new DevExpress.XtraPrinting.Link(this.components);
     this.printPreviewBar1        = new DevExpress.XtraPrinting.Preview.PrintPreviewBar();
     this.printPreviewBarButton1  = new DevExpress.XtraPrinting.Preview.PrintPreviewBarButton();
     this.printPreviewBarButton2  = new DevExpress.XtraPrinting.Preview.PrintPreviewBarButton();
     this.printPreviewBarButton3  = new DevExpress.XtraPrinting.Preview.PrintPreviewBarButton();
     this.toolBarButton1          = new System.Windows.Forms.ToolBarButton();
     this.printPreviewBarButton4  = new DevExpress.XtraPrinting.Preview.PrintPreviewBarButton();
     this.printPreviewBarButton5  = new DevExpress.XtraPrinting.Preview.PrintPreviewBarButton();
     this.printPreviewBarButton6  = new DevExpress.XtraPrinting.Preview.PrintPreviewBarButton();
     this.printPreviewBarButton7  = new DevExpress.XtraPrinting.Preview.PrintPreviewBarButton();
     this.printPreviewBarButton8  = new DevExpress.XtraPrinting.Preview.PrintPreviewBarButton();
     this.toolBarButton2          = new System.Windows.Forms.ToolBarButton();
     this.printPreviewBarButton9  = new DevExpress.XtraPrinting.Preview.PrintPreviewBarButton();
     this.printPreviewBarButton10 = new DevExpress.XtraPrinting.Preview.PrintPreviewBarButton();
     this.printPreviewBarButton11 = new DevExpress.XtraPrinting.Preview.PrintPreviewBarButton();
     this.printPreviewBarButton12 = new DevExpress.XtraPrinting.Preview.PrintPreviewBarButton();
     this.toolBarButton3          = new System.Windows.Forms.ToolBarButton();
     this.printPreviewBarButton13 = new DevExpress.XtraPrinting.Preview.PrintPreviewBarButton();
     this.printPreviewBarButton14 = new DevExpress.XtraPrinting.Preview.PrintPreviewBarButton();
     this.printPreviewBarButton15 = new DevExpress.XtraPrinting.Preview.PrintPreviewBarButton();
     this.printPreviewBarButton16 = new DevExpress.XtraPrinting.Preview.PrintPreviewBarButton();
     this.toolBarButton4          = new System.Windows.Forms.ToolBarButton();
     this.printPreviewBarButton17 = new DevExpress.XtraPrinting.Preview.PrintPreviewBarButton();
     this.printPreviewBarButton18 = new DevExpress.XtraPrinting.Preview.PrintPreviewBarButton();
     this.printPreviewBarButton19 = new DevExpress.XtraPrinting.Preview.PrintPreviewBarButton();
     this.toolBarButton5          = new System.Windows.Forms.ToolBarButton();
     this.printPreviewBarButton20 = new DevExpress.XtraPrinting.Preview.PrintPreviewBarButton();
     this.printPreviewBarButton21 = new DevExpress.XtraPrinting.Preview.PrintPreviewBarButton();
     this.toolBarButton6          = new System.Windows.Forms.ToolBarButton();
     this.printPreviewBarButton22 = new DevExpress.XtraPrinting.Preview.PrintPreviewBarButton();
     this.printControl1           = new DevExpress.XtraPrinting.Control.PrintControl();
     this.groupBox1               = new System.Windows.Forms.GroupBox();
     this.helpProvider1           = new System.Windows.Forms.HelpProvider();
     this.textBox1                = new System.Windows.Forms.TextBox();
     ((System.ComponentModel.ISupportInitialize)(this.printingSystem1)).BeginInit();
     this.SuspendLayout();
     //
     // button1
     //
     this.button1.Location = new System.Drawing.Point(120, 72);
     this.button1.Name     = "button1";
     this.button1.Size     = new System.Drawing.Size(64, 32);
     this.button1.TabIndex = 0;
     this.button1.Text     = "button1";
     this.button1.Click   += new System.EventHandler(this.button1_Click);
     //
     // printPreviewDialog2
     //
     this.printPreviewDialog2.AutoScrollMargin  = new System.Drawing.Size(0, 0);
     this.printPreviewDialog2.AutoScrollMinSize = new System.Drawing.Size(0, 0);
     this.printPreviewDialog2.ClientSize        = new System.Drawing.Size(400, 300);
     this.printPreviewDialog2.Enabled           = true;
     this.printPreviewDialog2.Icon            = ((System.Drawing.Icon)(resources.GetObject("printPreviewDialog2.Icon")));
     this.printPreviewDialog2.Location        = new System.Drawing.Point(47, 14);
     this.printPreviewDialog2.MinimumSize     = new System.Drawing.Size(375, 250);
     this.printPreviewDialog2.Name            = "printPreviewDialog2";
     this.printPreviewDialog2.TransparencyKey = System.Drawing.Color.Empty;
     this.printPreviewDialog2.Visible         = false;
     //
     // printingSystem1
     //
     this.printingSystem1.Links.AddRange(new object[] {
         this.link1
     });
     //
     // link1
     //
     this.link1.PrintingSystem = this.printingSystem1;
     //
     // printPreviewBar1
     //
     this.printPreviewBar1.Appearance = System.Windows.Forms.ToolBarAppearance.Flat;
     this.printPreviewBar1.Buttons.AddRange(new System.Windows.Forms.ToolBarButton[] {
         this.printPreviewBarButton1,
         this.printPreviewBarButton2,
         this.printPreviewBarButton3,
         this.toolBarButton1,
         this.printPreviewBarButton4,
         this.printPreviewBarButton5,
         this.printPreviewBarButton6,
         this.printPreviewBarButton7,
         this.printPreviewBarButton8,
         this.toolBarButton2,
         this.printPreviewBarButton9,
         this.printPreviewBarButton10,
         this.printPreviewBarButton11,
         this.printPreviewBarButton12,
         this.toolBarButton3,
         this.printPreviewBarButton13,
         this.printPreviewBarButton14,
         this.printPreviewBarButton15,
         this.printPreviewBarButton16,
         this.toolBarButton4,
         this.printPreviewBarButton17,
         this.printPreviewBarButton18,
         this.printPreviewBarButton19,
         this.toolBarButton5,
         this.printPreviewBarButton20,
         this.printPreviewBarButton21,
         this.toolBarButton6,
         this.printPreviewBarButton22
     });
     this.printPreviewBar1.ButtonSize     = new System.Drawing.Size(16, 16);
     this.printPreviewBar1.DropDownArrows = true;
     this.printPreviewBar1.Location       = new System.Drawing.Point(0, 0);
     this.printPreviewBar1.Name           = "printPreviewBar1";
     this.printPreviewBar1.PrintControl   = this.printControl1;
     this.printPreviewBar1.ShowToolTips   = true;
     this.printPreviewBar1.Size           = new System.Drawing.Size(560, 72);
     this.printPreviewBar1.TabIndex       = 1;
     //
     // printPreviewBarButton1
     //
     this.printPreviewBarButton1.Command     = DevExpress.XtraPrinting.PrintingSystemCommand.DocumentMap;
     this.printPreviewBarButton1.Enabled     = false;
     this.printPreviewBarButton1.ImageIndex  = 19;
     this.printPreviewBarButton1.Style       = System.Windows.Forms.ToolBarButtonStyle.ToggleButton;
     this.printPreviewBarButton1.ToolTipText = "Document Map";
     //
     // printPreviewBarButton2
     //
     this.printPreviewBarButton2.Command     = DevExpress.XtraPrinting.PrintingSystemCommand.Find;
     this.printPreviewBarButton2.Enabled     = false;
     this.printPreviewBarButton2.ImageIndex  = 20;
     this.printPreviewBarButton2.ToolTipText = "Search";
     //
     // printPreviewBarButton3
     //
     this.printPreviewBarButton3.Command     = DevExpress.XtraPrinting.PrintingSystemCommand.HandTool;
     this.printPreviewBarButton3.Enabled     = false;
     this.printPreviewBarButton3.ImageIndex  = 16;
     this.printPreviewBarButton3.Style       = System.Windows.Forms.ToolBarButtonStyle.ToggleButton;
     this.printPreviewBarButton3.ToolTipText = "Hand Tool";
     //
     // toolBarButton1
     //
     this.toolBarButton1.Style = System.Windows.Forms.ToolBarButtonStyle.Separator;
     //
     // printPreviewBarButton4
     //
     this.printPreviewBarButton4.Command     = DevExpress.XtraPrinting.PrintingSystemCommand.Customize;
     this.printPreviewBarButton4.Enabled     = false;
     this.printPreviewBarButton4.ImageIndex  = 14;
     this.printPreviewBarButton4.Style       = System.Windows.Forms.ToolBarButtonStyle.ToggleButton;
     this.printPreviewBarButton4.ToolTipText = "Customize";
     //
     // printPreviewBarButton5
     //
     this.printPreviewBarButton5.Command     = DevExpress.XtraPrinting.PrintingSystemCommand.Print;
     this.printPreviewBarButton5.Enabled     = false;
     this.printPreviewBarButton5.ImageIndex  = 0;
     this.printPreviewBarButton5.Style       = System.Windows.Forms.ToolBarButtonStyle.ToggleButton;
     this.printPreviewBarButton5.ToolTipText = "Print";
     //
     // printPreviewBarButton6
     //
     this.printPreviewBarButton6.Command     = DevExpress.XtraPrinting.PrintingSystemCommand.PrintDirect;
     this.printPreviewBarButton6.Enabled     = false;
     this.printPreviewBarButton6.ImageIndex  = 1;
     this.printPreviewBarButton6.ToolTipText = "Print Direct";
     //
     // printPreviewBarButton7
     //
     this.printPreviewBarButton7.Command     = DevExpress.XtraPrinting.PrintingSystemCommand.PageSetup;
     this.printPreviewBarButton7.Enabled     = false;
     this.printPreviewBarButton7.ImageIndex  = 2;
     this.printPreviewBarButton7.Style       = System.Windows.Forms.ToolBarButtonStyle.ToggleButton;
     this.printPreviewBarButton7.ToolTipText = "Page Setup";
     //
     // printPreviewBarButton8
     //
     this.printPreviewBarButton8.Command     = DevExpress.XtraPrinting.PrintingSystemCommand.EditPageHF;
     this.printPreviewBarButton8.Enabled     = false;
     this.printPreviewBarButton8.ImageIndex  = 15;
     this.printPreviewBarButton8.ToolTipText = "Header And Footer";
     //
     // toolBarButton2
     //
     this.toolBarButton2.Style = System.Windows.Forms.ToolBarButtonStyle.Separator;
     //
     // printPreviewBarButton9
     //
     this.printPreviewBarButton9.Command     = DevExpress.XtraPrinting.PrintingSystemCommand.Magnifier;
     this.printPreviewBarButton9.Enabled     = false;
     this.printPreviewBarButton9.ImageIndex  = 3;
     this.printPreviewBarButton9.Style       = System.Windows.Forms.ToolBarButtonStyle.ToggleButton;
     this.printPreviewBarButton9.ToolTipText = "Magnifier";
     //
     // printPreviewBarButton10
     //
     this.printPreviewBarButton10.Command     = DevExpress.XtraPrinting.PrintingSystemCommand.ZoomIn;
     this.printPreviewBarButton10.Enabled     = false;
     this.printPreviewBarButton10.ImageIndex  = 4;
     this.printPreviewBarButton10.ToolTipText = "缩小";
     //
     // printPreviewBarButton11
     //
     this.printPreviewBarButton11.Command     = DevExpress.XtraPrinting.PrintingSystemCommand.ZoomOut;
     this.printPreviewBarButton11.Enabled     = false;
     this.printPreviewBarButton11.ImageIndex  = 5;
     this.printPreviewBarButton11.ToolTipText = "Zoom Out";
     //
     // printPreviewBarButton12
     //
     this.printPreviewBarButton12.Command     = DevExpress.XtraPrinting.PrintingSystemCommand.Zoom;
     this.printPreviewBarButton12.Enabled     = false;
     this.printPreviewBarButton12.ImageIndex  = 6;
     this.printPreviewBarButton12.Style       = System.Windows.Forms.ToolBarButtonStyle.DropDownButton;
     this.printPreviewBarButton12.ToolTipText = "Zoom";
     //
     // toolBarButton3
     //
     this.toolBarButton3.Style = System.Windows.Forms.ToolBarButtonStyle.Separator;
     //
     // printPreviewBarButton13
     //
     this.printPreviewBarButton13.Command     = DevExpress.XtraPrinting.PrintingSystemCommand.ShowFirstPage;
     this.printPreviewBarButton13.Enabled     = false;
     this.printPreviewBarButton13.ImageIndex  = 7;
     this.printPreviewBarButton13.ToolTipText = "First Page";
     //
     // printPreviewBarButton14
     //
     this.printPreviewBarButton14.Command     = DevExpress.XtraPrinting.PrintingSystemCommand.ShowPrevPage;
     this.printPreviewBarButton14.Enabled     = false;
     this.printPreviewBarButton14.ImageIndex  = 8;
     this.printPreviewBarButton14.ToolTipText = "Previous Page";
     //
     // printPreviewBarButton15
     //
     this.printPreviewBarButton15.Command     = DevExpress.XtraPrinting.PrintingSystemCommand.ShowNextPage;
     this.printPreviewBarButton15.Enabled     = false;
     this.printPreviewBarButton15.ImageIndex  = 9;
     this.printPreviewBarButton15.ToolTipText = "Next Page";
     //
     // printPreviewBarButton16
     //
     this.printPreviewBarButton16.Command     = DevExpress.XtraPrinting.PrintingSystemCommand.ShowLastPage;
     this.printPreviewBarButton16.Enabled     = false;
     this.printPreviewBarButton16.ImageIndex  = 10;
     this.printPreviewBarButton16.ToolTipText = "Last Page";
     //
     // toolBarButton4
     //
     this.toolBarButton4.Style = System.Windows.Forms.ToolBarButtonStyle.Separator;
     //
     // printPreviewBarButton17
     //
     this.printPreviewBarButton17.Command     = DevExpress.XtraPrinting.PrintingSystemCommand.MultiplePages;
     this.printPreviewBarButton17.Enabled     = false;
     this.printPreviewBarButton17.ImageIndex  = 11;
     this.printPreviewBarButton17.Style       = System.Windows.Forms.ToolBarButtonStyle.ToggleButton;
     this.printPreviewBarButton17.ToolTipText = "Multiple Pages";
     //
     // printPreviewBarButton18
     //
     this.printPreviewBarButton18.Command     = DevExpress.XtraPrinting.PrintingSystemCommand.FillBackground;
     this.printPreviewBarButton18.Enabled     = false;
     this.printPreviewBarButton18.ImageIndex  = 12;
     this.printPreviewBarButton18.Style       = System.Windows.Forms.ToolBarButtonStyle.ToggleButton;
     this.printPreviewBarButton18.ToolTipText = "Background";
     //
     // printPreviewBarButton19
     //
     this.printPreviewBarButton19.Command     = DevExpress.XtraPrinting.PrintingSystemCommand.Watermark;
     this.printPreviewBarButton19.Enabled     = false;
     this.printPreviewBarButton19.ImageIndex  = 21;
     this.printPreviewBarButton19.ToolTipText = "Watermark";
     //
     // toolBarButton5
     //
     this.toolBarButton5.Style = System.Windows.Forms.ToolBarButtonStyle.Separator;
     //
     // printPreviewBarButton20
     //
     this.printPreviewBarButton20.Command     = DevExpress.XtraPrinting.PrintingSystemCommand.ExportFile;
     this.printPreviewBarButton20.Enabled     = false;
     this.printPreviewBarButton20.ImageIndex  = 18;
     this.printPreviewBarButton20.Style       = System.Windows.Forms.ToolBarButtonStyle.DropDownButton;
     this.printPreviewBarButton20.ToolTipText = "Export Document...";
     //
     // printPreviewBarButton21
     //
     this.printPreviewBarButton21.Command     = DevExpress.XtraPrinting.PrintingSystemCommand.SendFile;
     this.printPreviewBarButton21.Enabled     = false;
     this.printPreviewBarButton21.ImageIndex  = 17;
     this.printPreviewBarButton21.Style       = System.Windows.Forms.ToolBarButtonStyle.DropDownButton;
     this.printPreviewBarButton21.ToolTipText = "Send e-mail...";
     //
     // toolBarButton6
     //
     this.toolBarButton6.Style = System.Windows.Forms.ToolBarButtonStyle.Separator;
     //
     // printPreviewBarButton22
     //
     this.printPreviewBarButton22.Command     = DevExpress.XtraPrinting.PrintingSystemCommand.ClosePreview;
     this.printPreviewBarButton22.Enabled     = false;
     this.printPreviewBarButton22.ImageIndex  = 13;
     this.printPreviewBarButton22.ToolTipText = "Close Preview";
     //
     // printControl1
     //
     this.printControl1.IsMetric       = true;
     this.printControl1.Location       = new System.Drawing.Point(48, 112);
     this.printControl1.Name           = "printControl1";
     this.printControl1.PrintingSystem = this.printingSystem1;
     this.printControl1.Size           = new System.Drawing.Size(488, 344);
     this.printControl1.TabIndex       = 2;
     this.printControl1.TabStop        = false;
     this.printControl1.Text           = "printControl1";
     //
     // groupBox1
     //
     this.groupBox1.Location = new System.Drawing.Point(256, 48);
     this.groupBox1.Name     = "groupBox1";
     this.groupBox1.Size     = new System.Drawing.Size(160, 56);
     this.groupBox1.TabIndex = 3;
     this.groupBox1.TabStop  = false;
     this.groupBox1.Text     = "groupBox1";
     //
     // helpProvider1
     //
     this.helpProvider1.HelpNamespace = "G:\\ReleaseFile\\(8-10)ReleaseWithoutCheckCard\\创智智能晨检网络管理系统联机丛书.chm";
     //
     // textBox1
     //
     this.helpProvider1.SetHelpKeyword(this.textBox1, "硬件");
     this.helpProvider1.SetHelpNavigator(this.textBox1, System.Windows.Forms.HelpNavigator.KeywordIndex);
     this.helpProvider1.SetHelpString(this.textBox1, "");
     this.textBox1.Location = new System.Drawing.Point(440, 80);
     this.textBox1.Name     = "textBox1";
     this.helpProvider1.SetShowHelp(this.textBox1, true);
     this.textBox1.TabIndex = 4;
     this.textBox1.Text     = "textBox1";
     //
     // Form1
     //
     this.AutoScaleBaseSize = new System.Drawing.Size(6, 14);
     this.ClientSize        = new System.Drawing.Size(560, 445);
     this.Controls.Add(this.textBox1);
     this.Controls.Add(this.groupBox1);
     this.Controls.Add(this.printControl1);
     this.Controls.Add(this.printPreviewBar1);
     this.Controls.Add(this.button1);
     this.helpProvider1.SetHelpString(this, "");
     this.Name = "Form1";
     this.helpProvider1.SetShowHelp(this, false);
     this.Text  = "Form1";
     this.Load += new System.EventHandler(this.Form1_Load);
     ((System.ComponentModel.ISupportInitialize)(this.printingSystem1)).EndInit();
     this.ResumeLayout(false);
 }
Пример #58
0
 /// <summary>
 /// Required method for Designer support - do not modify
 /// the contents of this method with the code editor.
 /// </summary>
 private void InitializeComponent()
 {
     System.Resources.ResourceManager resources = new System.Resources.ResourceManager(typeof(Form1Test));
     this.mainMenu1           = new System.Windows.Forms.MainMenu();
     this.newRepMenu          = new System.Windows.Forms.MenuItem();
     this.repMenu             = new System.Windows.Forms.MenuItem();
     this.saveRepMenu         = new System.Windows.Forms.MenuItem();
     this.loadRepMenu         = new System.Windows.Forms.MenuItem();
     this.printMenu           = new System.Windows.Forms.MenuItem();
     this.prntPrevMenu        = new System.Windows.Forms.MenuItem();
     this.prntPrintMenu       = new System.Windows.Forms.MenuItem();
     this.prntPrntMenu        = new System.Windows.Forms.MenuItem();
     this.printDocument1      = new System.Drawing.Printing.PrintDocument();
     this.printDialog1        = new System.Windows.Forms.PrintDialog();
     this.printPreviewDialog1 = new System.Windows.Forms.PrintPreviewDialog();
     this.oleDbDataAdapter1   = new System.Data.OleDb.OleDbDataAdapter();
     this.oleDbSelectCommand1 = new System.Data.OleDb.OleDbCommand();
     this.oleDbConnection1    = new System.Data.OleDb.OleDbConnection();
     //
     // mainMenu1
     //
     this.mainMenu1.MenuItems.AddRange(new System.Windows.Forms.MenuItem[] {
         this.newRepMenu,
         this.repMenu,
         this.printMenu
     });
     //
     // newRepMenu
     //
     this.newRepMenu.Index = 0;
     this.newRepMenu.Text  = "Открыть бланк";
     //
     // repMenu
     //
     this.repMenu.Index = 1;
     this.repMenu.MenuItems.AddRange(new System.Windows.Forms.MenuItem[] {
         this.saveRepMenu,
         this.loadRepMenu
     });
     this.repMenu.Text = "Заключение";
     //
     // saveRepMenu
     //
     this.saveRepMenu.Index  = 0;
     this.saveRepMenu.Text   = "Сохранить";
     this.saveRepMenu.Click += new System.EventHandler(this.saveRepMenu_Click);
     //
     // loadRepMenu
     //
     this.loadRepMenu.Index  = 1;
     this.loadRepMenu.Text   = "Открыть...";
     this.loadRepMenu.Click += new System.EventHandler(this.loadRepMenu_Click);
     //
     // printMenu
     //
     this.printMenu.Index = 2;
     this.printMenu.MenuItems.AddRange(new System.Windows.Forms.MenuItem[] {
         this.prntPrevMenu,
         this.prntPrintMenu,
         this.prntPrntMenu
     });
     this.printMenu.Text = "Печать";
     //
     // prntPrevMenu
     //
     this.prntPrevMenu.Index  = 0;
     this.prntPrevMenu.Text   = "Посмотреть...";
     this.prntPrevMenu.Click += new System.EventHandler(this.prntPrevMenu_Click);
     //
     // prntPrintMenu
     //
     this.prntPrintMenu.Index  = 1;
     this.prntPrintMenu.Text   = "Печатать...";
     this.prntPrintMenu.Click += new System.EventHandler(this.prntPrintMenu_Click);
     //
     // prntPrntMenu
     //
     this.prntPrntMenu.Index  = 2;
     this.prntPrntMenu.Text   = "Печатать";
     this.prntPrntMenu.Click += new System.EventHandler(this.prntPrntMenu_Click);
     //
     // printDocument1
     //
     this.printDocument1.PrintPage += new System.Drawing.Printing.PrintPageEventHandler(this.printDocument1_PrintPage);
     //
     // printDialog1
     //
     this.printDialog1.Document = this.printDocument1;
     //
     // printPreviewDialog1
     //
     this.printPreviewDialog1.AutoScrollMargin  = new System.Drawing.Size(0, 0);
     this.printPreviewDialog1.AutoScrollMinSize = new System.Drawing.Size(0, 0);
     this.printPreviewDialog1.ClientSize        = new System.Drawing.Size(400, 300);
     this.printPreviewDialog1.Document          = this.printDocument1;
     this.printPreviewDialog1.Enabled           = true;
     this.printPreviewDialog1.Icon            = ((System.Drawing.Icon)(resources.GetObject("printPreviewDialog1.Icon")));
     this.printPreviewDialog1.Location        = new System.Drawing.Point(661, 19);
     this.printPreviewDialog1.MinimumSize     = new System.Drawing.Size(375, 250);
     this.printPreviewDialog1.Name            = "printPreviewDialog1";
     this.printPreviewDialog1.TransparencyKey = System.Drawing.Color.Empty;
     this.printPreviewDialog1.Visible         = false;
     //
     // oleDbDataAdapter1
     //
     this.oleDbDataAdapter1.SelectCommand = this.oleDbSelectCommand1;
     this.oleDbDataAdapter1.TableMappings.AddRange(new System.Data.Common.DataTableMapping[] {
         new System.Data.Common.DataTableMapping("Table", "Diagn", new System.Data.Common.DataColumnMapping[] {
             new System.Data.Common.DataColumnMapping("FIO", "FIO"),
             new System.Data.Common.DataColumnMapping("Dat", "Dat"),
             new System.Data.Common.DataColumnMapping("Name", "Name"),
             new System.Data.Common.DataColumnMapping("Path", "Path"),
             new System.Data.Common.DataColumnMapping("Text", "Text")
         })
     });
     //
     // oleDbSelectCommand1
     //
     this.oleDbSelectCommand1.CommandText = "SELECT Diagn.FIO, Diagn.Dat, Report.Name, Report.Path, Diagn.[Text] FROM (Diagn I" +
                                            "NNER JOIN Report ON Diagn.RepID = Report.ID)";
     this.oleDbSelectCommand1.Connection = this.oleDbConnection1;
     //
     // oleDbConnection1
     //
     this.oleDbConnection1.ConnectionString = @"Jet OLEDB:Global Partial Bulk Ops=2;Jet OLEDB:Registry Path=;Jet OLEDB:Database Locking Mode=1;Jet OLEDB:Database Password=;Data Source="".\reps.mdb"";Password=;Jet OLEDB:Engine Type=5;Jet OLEDB:Global Bulk Transactions=1;Provider=""Microsoft.Jet.OLEDB.4.0"";Jet OLEDB:System database=;Jet OLEDB:SFP=False;Extended Properties=;Mode=Share Deny None;Jet OLEDB:New Database Password=;Jet OLEDB:Create System Database=False;Jet OLEDB:Don't Copy Locale on Compact=False;Jet OLEDB:Compact Without Replica Repair=False;User ID=Admin;Jet OLEDB:Encrypt Database=False";
     //
     // Form1Test
     //
     this.AutoScale         = false;
     this.AutoScaleBaseSize = new System.Drawing.Size(5, 13);
     this.AutoScroll        = true;
     this.ClientSize        = new System.Drawing.Size(592, 273);
     this.Menu         = this.mainMenu1;
     this.Name         = "Form1Test";
     this.Text         = "Заключение УЗИ";
     this.WindowState  = System.Windows.Forms.FormWindowState.Maximized;
     this.SizeChanged += new System.EventHandler(this.Form1_SizeChanged);
 }
Пример #59
0
 /// <summary>
 /// Required method for Designer support - do not modify
 /// the contents of this method with the code editor.
 /// </summary>
 private void InitializeComponent()
 {
     System.Resources.ResourceManager resources = new System.Resources.ResourceManager(typeof(GraficadorForm));
     this.mainMenu1           = new System.Windows.Forms.MainMenu();
     this.menuItem1           = new System.Windows.Forms.MenuItem();
     this.menuItem4           = new System.Windows.Forms.MenuItem();
     this.menuItem3           = new System.Windows.Forms.MenuItem();
     this.menuItem2           = new System.Windows.Forms.MenuItem();
     this.menuItem5           = new System.Windows.Forms.MenuItem();
     this.menuItem6           = new System.Windows.Forms.MenuItem();
     this.openFileDialog1     = new System.Windows.Forms.OpenFileDialog();
     this.saveFileDialog1     = new System.Windows.Forms.SaveFileDialog();
     this.colorDialog1        = new System.Windows.Forms.ColorDialog();
     this.menuItem7           = new System.Windows.Forms.MenuItem();
     this.menuItem8           = new System.Windows.Forms.MenuItem();
     this.printDocument1      = new System.Drawing.Printing.PrintDocument();
     this.printPreviewDialog1 = new System.Windows.Forms.PrintPreviewDialog();
     this.menuItem9           = new System.Windows.Forms.MenuItem();
     this.menuItem10          = new System.Windows.Forms.MenuItem();
     this.menuItem11          = new System.Windows.Forms.MenuItem();
     //
     // mainMenu1
     //
     this.mainMenu1.MenuItems.AddRange(new System.Windows.Forms.MenuItem[] {
         this.menuItem1,
         this.menuItem9
     });
     //
     // menuItem1
     //
     this.menuItem1.Index = 0;
     this.menuItem1.MenuItems.AddRange(new System.Windows.Forms.MenuItem[] {
         this.menuItem4,
         this.menuItem3,
         this.menuItem2,
         this.menuItem5,
         this.menuItem6,
         this.menuItem7,
         this.menuItem8
     });
     this.menuItem1.MergeType = System.Windows.Forms.MenuMerge.MergeItems;
     this.menuItem1.Text      = "File";
     //
     // menuItem4
     //
     this.menuItem4.Index  = 0;
     this.menuItem4.Text   = "Open";
     this.menuItem4.Click += new System.EventHandler(this.menuItem4_Click);
     //
     // menuItem3
     //
     this.menuItem3.Index  = 1;
     this.menuItem3.Text   = "Save As...";
     this.menuItem3.Click += new System.EventHandler(this.menuItem3_Click);
     //
     // menuItem2
     //
     this.menuItem2.Index      = 2;
     this.menuItem2.MergeOrder = 30;
     this.menuItem2.Text       = "Close";
     this.menuItem2.Click     += new System.EventHandler(this.menuItem2_Click);
     //
     // menuItem5
     //
     this.menuItem5.Index  = 3;
     this.menuItem5.Text   = "Send";
     this.menuItem5.Click += new System.EventHandler(this.menuItem5_Click);
     //
     // menuItem6
     //
     this.menuItem6.Index  = 4;
     this.menuItem6.Text   = "Receive";
     this.menuItem6.Click += new System.EventHandler(this.menuItem6_Click);
     //
     // menuItem7
     //
     this.menuItem7.Index  = 5;
     this.menuItem7.Text   = "Print Preview";
     this.menuItem7.Click += new System.EventHandler(this.menuItem7_Click);
     //
     // menuItem8
     //
     this.menuItem8.Index  = 6;
     this.menuItem8.Text   = "Print";
     this.menuItem8.Click += new System.EventHandler(this.menuItem8_Click);
     //
     // printDocument1
     //
     this.printDocument1.PrintPage += new System.Drawing.Printing.PrintPageEventHandler(this.printDocument1_PrintPage);
     //
     // printPreviewDialog1
     //
     this.printPreviewDialog1.AutoScrollMargin  = new System.Drawing.Size(0, 0);
     this.printPreviewDialog1.AutoScrollMinSize = new System.Drawing.Size(0, 0);
     this.printPreviewDialog1.ClientSize        = new System.Drawing.Size(400, 300);
     this.printPreviewDialog1.Enabled           = true;
     this.printPreviewDialog1.Icon            = ((System.Drawing.Icon)(resources.GetObject("printPreviewDialog1.Icon")));
     this.printPreviewDialog1.Location        = new System.Drawing.Point(21, 82);
     this.printPreviewDialog1.MinimumSize     = new System.Drawing.Size(375, 250);
     this.printPreviewDialog1.Name            = "printPreviewDialog1";
     this.printPreviewDialog1.TransparencyKey = System.Drawing.Color.Empty;
     this.printPreviewDialog1.Visible         = false;
     //
     // menuItem9
     //
     this.menuItem9.Index = 1;
     this.menuItem9.MenuItems.AddRange(new System.Windows.Forms.MenuItem[] {
         this.menuItem10,
         this.menuItem11
     });
     this.menuItem9.Text = "Edit";
     //
     // menuItem10
     //
     this.menuItem10.Index  = 0;
     this.menuItem10.Text   = "Color";
     this.menuItem10.Click += new System.EventHandler(this.menuItem10_Click);
     //
     // menuItem11
     //
     this.menuItem11.Index  = 1;
     this.menuItem11.Text   = "Width";
     this.menuItem11.Click += new System.EventHandler(this.menuItem11_Click);
     //
     // GraficadorForm
     //
     this.AutoScaleBaseSize = new System.Drawing.Size(5, 13);
     this.ClientSize        = new System.Drawing.Size(656, 382);
     this.Menu       = this.mainMenu1;
     this.Name       = "GraficadorForm";
     this.Text       = "Graficador";
     this.MouseDown += new System.Windows.Forms.MouseEventHandler(this.GraficadorForm_MouseDown);
     this.MouseUp   += new System.Windows.Forms.MouseEventHandler(this.GraficadorForm_MouseUp);
     this.Paint     += new System.Windows.Forms.PaintEventHandler(this.GraficadorForm_Paint);
     this.MouseMove += new System.Windows.Forms.MouseEventHandler(this.GraficadorForm_MouseMove);
 }
Пример #60
-2
        public void print()
        {
            PrintDialog pd = new PrintDialog();
            pdoc = new PrintDocument();
            PrinterSettings ps = new PrinterSettings();
            Font font = new Font("Courier New", 15);

            PaperSize psize = new PaperSize("Custom", 300, 100);
            ps.DefaultPageSettings.PaperSize = psize;

            pd.Document = pdoc;
            pd.Document.DefaultPageSettings.PaperSize = psize;

            pdoc.DefaultPageSettings.PaperSize = psize;

            pdoc.PrintPage += new PrintPageEventHandler(pdoc_PrintPage);

            DialogResult result = pd.ShowDialog();
            if (result == DialogResult.OK)
            {
                PrintPreviewDialog pp = new PrintPreviewDialog();
                pp.Document = pdoc;

                result = pp.ShowDialog();
                if (result == DialogResult.OK)
                {
                    pdoc.Print();
                }
            }
        }