Пример #1
0
        public void PrintContent()
        {
            //this.gridControl.ShowPrintPreview();
            DevGridReport devGridReport = new DevGridReport(this.gridControl
                                                            , "定值文件 - [" + this.TabText + "]"
                                                            , "设备类型:" + this.textBoxIEDType.Text + "\t更新时间:" + this.textBoxCreateTime.Text);

            devGridReport.Preview();
        }
Пример #2
0
        public void PrintContent()
        {
            switch (this.tabControlMain.SelectedTab.Name)
            {
            case "tabPageRealtime":
            {
                DevGridReport devGridReport = new DevGridReport(this.gridControlRealTime
                                                                , "打包文件 - [" + this.TabText + "] - " + this.tabControlMain.SelectedTab.Text
                                                                , "设备类型:" + this.textBoxIEDType.Text + "\t创建时间:" + this.textBoxCreateTime.Text);
                devGridReport.Preview();
                break;
            }

            case "tabPageCommonParam":
            {
                DevGridReport devGridReport = new DevGridReport(this.gridControlCommonParam
                                                                , "打包文件 - [" + this.TabText + "] - " + this.tabControlMain.SelectedTab.Text
                                                                , "设备类型:" + this.textBoxIEDType.Text + "\t创建时间:" + this.textBoxCreateTime.Text);
                devGridReport.Preview();
                break;
            }

            case "tabPageAdvancedParam":
            {
                DevGridReport devGridReport = new DevGridReport(this.gridControlAdvancedParam
                                                                , "打包文件 - [" + this.TabText + "] - " + this.tabControlMain.SelectedTab.Text
                                                                , "设备类型:" + this.textBoxIEDType.Text + "\t创建时间:" + this.textBoxCreateTime.Text);
                devGridReport.Preview();
                break;
            }

            case "tabPageMaintenance":
            {
                DevGridReport devGridReport = new DevGridReport(this.gridControlMaintenance
                                                                , "打包文件 - [" + this.TabText + "] - " + this.tabControlMain.SelectedTab.Text
                                                                , "设备类型:" + this.textBoxIEDType.Text + "\t创建时间:" + this.textBoxCreateTime.Text);
                devGridReport.Preview();
                break;
            }

            case "tabPageEvents":
            {
                DevGridReport devGridReport = new DevGridReport(((DevExpress.XtraGrid.GridControl)(this.tabControlEvents.SelectedTab.Controls[0]))
                                                                , "打包文件 - [" + this.TabText + "] - " + this.tabControlEvents.SelectedTab.Text
                                                                , "设备类型:" + this.textBoxIEDType.Text + "\t创建时间:" + this.textBoxCreateTime.Text);
                devGridReport.Preview();
                break;
            }

            case "tabPageOscillo":
            {
                TabPage        tabPageFile    = tabControlOscillo.SelectedTab;
                OscilloControl oscilloControl = null;
                foreach (Control control in tabPageFile.Controls)
                {
                    if (control.GetType().Name == "OscilloControl")
                    {
                        oscilloControl = (OscilloControl)control;
                        break;
                    }
                }

                if (oscilloControl == null)
                {
                    break;
                }

                oscilloControl.SetChartPreTitle("打包文件 - [" + this.TabText + "] - ", "设备类型:" + this.textBoxIEDType.Text + "     ");
                oscilloControl.PrintContent();

                break;
            }

            default: break;
            }
        }