예제 #1
0
        void Link2_CreateMarginalHeaderArea(object sender, CreateAreaEventArgs e)
        {
            string    sHeader = null;
            TextBrick brick   = default(TextBrick);

            sHeader = "Progress Details";

            brick              = e.Graph.DrawString(sHeader, Color.Navy, new RectangleF(0, 20, 600, 40), BorderSide.None);
            brick.Font         = new Font("Arial", 11, FontStyle.Bold);
            brick.StringFormat = new BrickStringFormat(StringAlignment.Near);

            if (Convert.ToInt32(barcboProject.EditValue) > 0)
            {
                sHeader = "(" + cboCostCentre.GetDisplayText(Convert.ToInt32(barcboProject.EditValue));
            }
            if (barcboProgress.EditValue.ToString() != "")
            {
                sHeader = String.Format("{0}-{1}", sHeader, cboType.GetDisplayText(barcboProgress.EditValue));
            }
            if (barcboFlatType.EditValue.ToString() != "")
            {
                sHeader = String.Format("{0}-{1}", sHeader, cboFlatType.GetDisplayText(barcboFlatType.EditValue));
            }

            if (Convert.ToInt32(barcboBlock.EditValue) > 0)
            {
                sHeader = String.Format("{0}-{1})", sHeader, CboBlock.GetDisplayText(Convert.ToInt32(barcboBlock.EditValue)));
                TextBrick brick1 = default(TextBrick);

                brick1              = e.Graph.DrawString(sHeader, Color.Navy, new RectangleF(0, 20, 800, 100), BorderSide.None);
                brick1.Font         = new Font("Arial", 9, FontStyle.Bold);
                brick1.StringFormat = new BrickStringFormat(StringAlignment.Near);
            }
        }
예제 #2
0
        private void printableComponentLink1_CreateMarginalHeaderArea(object sender, CreateAreaEventArgs e)
        {
            var info = new GeneralInfo();

            info.LoadAll();
            //var dtDate = new CalendarLib.DateTimePickerEx
            //{
            //    Value = DateTime.Now,
            //    CustomFormat = "MM/dd/yyyy"
            //};
            //DateTime dtCurrent = Convert.ToDateTime(dtDate.Text);
            string transferdate = lstTree.FocusedNode.GetDisplayText("Year");

            if ((lstTree.FocusedNode.GetDisplayText("Date")) != "")
            {
                transferdate = (Convert.ToDateTime(lstTree.FocusedNode.GetDisplayText("Date"))).ToShortDateString();
            }

            string refNumber = lstTree.FocusedNode.GetDisplayText("RefNo");

            string header = info.HospitalName + "\n Transfer Activity Log, Store: " + lkToStore.Text + " \n RefNo:  " + refNumber + " On " + transferdate + " E.C";

            printableComponentLink1.Landscape        = true;
            printableComponentLink1.PageHeaderFooter = header;

            TextBrick brick = e.Graph.DrawString(header, Color.Navy, new RectangleF(0, 0, 800, 80),
                                                 DevExpress.XtraPrinting.BorderSide.None);

            brick.Font         = new Font("Tahoma", 13);
            brick.StringFormat = new DevExpress.XtraPrinting.BrickStringFormat(StringAlignment.Center);
        }
        private void CreateDetailHeader()
        {
            if (View != View.Details)
            {
                return;
            }

            StringFormat sf = new StringFormat(StringFormatFlags.NoWrap);

            sf.LineAlignment = StringAlignment.Near;

            graph.DefaultBrickStyle = new BrickStyle(BorderSide.All, 1, Color.Black,
                                                     SystemColors.Control, SystemColors.ControlText, this.Font, new BrickStringFormat(sf));

            Rectangle r = Rectangle.Empty;

            r.Y = 1;
            for (int i = 0; i < Columns.Count; i++)
            {
                r.Width  = Columns[i].Width;
                r.Height = Font.Height + 4;
                TextBrick brick = (TextBrick)DrawBrick("TextBrick", r);
                brick.Text = Columns[i].Text;
                r.Offset(Columns[i].Width, 0);
            }
        }
        private void printableComponentLink1_CreateMarginalHeaderArea(object sender, CreateAreaEventArgs e)
        {
            string[] header = { "Account: " + lkAccount.Text };
            printableComponentLink1.PageHeaderFooter = header;

            TextBrick brick = e.Graph.DrawString(header[0], Color.DarkBlue, new RectangleF(0, 0, 200, 100), BorderSide.None);
        }
예제 #5
0
        private void printableComponentLink1_CreateMarginalFooterArea(object sender, CreateAreaEventArgs e)
        {
            PageInfoBrick pib = new PageInfoBrick();

            pib.Format = "Page {0}/{1}";
            DataTable dt       = (DataTable)gridIssues.DataSource;
            DataView  dv       = new DataView(dt);
            string    Issuedto = "Issued To: " + dv[0]["IssuedTo"] as string;
            string    Issuedby = "Issued By: " + dv[0]["IssuedBy"] as string;

            //RectangleF r = RectangleF.Empty;
            //r.Height = 20;

            //pib = e.Graph.DrawPageInfo(PageInfo.NumberOfTotal, pib.Format,  Color.Black, r, BorderSide.None);
            //PageInfoBrick brick = e.Graph.DrawPageInfo(PageInfo.NumberOfTotal, "Print Date " +DateTime.Now.ToShortDateString() + " G.C",
            //                      Color.Black, r, BorderSide.None);
            //brick.Alignment = BrickAlignment.Far;
            pib = e.Graph.DrawPageInfo(PageInfo.NumberOfTotal, pib.Format, Color.Black, new RectangleF(100, 0, 200, 20), BorderSide.None);
            PageInfoBrick brick = e.Graph.DrawPageInfo(PageInfo.NumberOfTotal, pib.Format + "\n Print Date " + DateTime.Now.ToShortDateString() + " G.C",
                                                       Color.Black, new RectangleF(100, 0, 200, 40), BorderSide.None);

            brick.Alignment = BrickAlignment.Far;
            TextBrick brickleft = e.Graph.DrawString(Issuedto, Color.Navy, new RectangleF(0, 0, 600, 40),
                                                     DevExpress.XtraPrinting.BorderSide.None);

            brickleft.Font         = new Font("Tahoma", 10);
            brickleft.StringFormat = new DevExpress.XtraPrinting.BrickStringFormat(StringAlignment.Near);
            TextBrick brickrb = e.Graph.DrawString(Issuedby, Color.Navy, new RectangleF(0, 20, 600, 40),
                                                   DevExpress.XtraPrinting.BorderSide.None);

            brickrb.Font         = new Font("Tahoma", 10);
            brickrb.StringFormat = new DevExpress.XtraPrinting.BrickStringFormat(StringAlignment.Near);
        }
예제 #6
0
        static void DrawPopulationInfo(PanelBrick panel, RectangleF r, string text, double portion, double scale)
        {
            RectangleF barRect = GetBarRect(r, portion, scale);

            r.Height = barRect.Top - r.Top;

            BrickStyle textStyle = new BrickStyle()
            {
                ForeColor = panel.Style.ForeColor,
                BackColor = Color.Transparent,
                Font      = panel.Style.Font
            };

            textStyle.ChangeAlignment(TextAlignment.BottomLeft);
            TextBrick textBrick = new TextBrick(textStyle);

            textBrick.Rect = r;
            textBrick.Text = text;
            panel.Bricks.Add(textBrick);

            BrickStyle barStyle = new BrickStyle()
            {
                Sides       = BorderSide.All,
                BorderColor = Color.FromArgb(173, 148, 116),
                BorderStyle = BrickBorderStyle.Inset,
                BorderWidth = 1,
                BackColor   = Color.FromArgb(232, 216, 195),
            };
            VisualBrick barBrick = new VisualBrick(barStyle);

            barBrick.Rect = barRect;
            panel.Bricks.Add(barBrick);
        }
        static void DrawPopulationInfo(PanelBrick panel, RectangleF r, string text, double portion, double scale)
        {
            RectangleF barRect = GetBarRect(r, portion, scale);

            r.Height = barRect.Top - r.Top;

            TextBrick textBrick = new TextBrick();

            textBrick.Sides        = BorderSide.None;
            textBrick.BackColor    = panel.BackColor;
            textBrick.Rect         = r;
            textBrick.ForeColor    = panel.Style.ForeColor;
            textBrick.Text         = text;
            textBrick.Font         = panel.Style.Font;
            textBrick.Padding      = new PaddingInfo(1, 0, 0, 0);
            textBrick.StringFormat = panel.Style.StringFormat;
            panel.Bricks.Add(textBrick);

            VisualBrick barBrick = new VisualBrick();

            barBrick.Sides       = BorderSide.All;
            barBrick.BackColor   = Color.FromArgb(232, 216, 195);
            barBrick.Rect        = barRect;
            barBrick.BorderColor = Color.FromArgb(173, 148, 116);
            barBrick.BorderStyle = BrickBorderStyle.Inset;
            panel.Bricks.Add(barBrick);
        }
예제 #8
0
        private void Link_CreateMarginalHeaderAreaVital(object sender, CreateAreaEventArgs e)
        {
            GeneralInfo info = new GeneralInfo();

            info.LoadAll();
            string head = "Facility Availability Status Report";

            string[] header = { info.HospitalName, "Date: " + cboMonth.Text + "/" + cboYear.Text, "Store: " + cboStores.Text, "Generated On: " + dtDate.Text };

            //string[] headerright = { "Category: " + lkCommodityTypes.Text, "Status: " + cboStatus.Text, "Program: " + cboSubProgram.Text };
            pcl.Landscape        = true;
            pcl.PageHeaderFooter = header;

            TextBrick brick0 = e.Graph.DrawString(head, Color.DarkBlue, new RectangleF(300, 10, 800, 400), BorderSide.None);
            TextBrick brick  = e.Graph.DrawString(header[0], Color.DarkBlue, new RectangleF(0, 40, 350, 100), BorderSide.None);
            TextBrick brick1 = e.Graph.DrawString(header[1], Color.DarkBlue, new RectangleF(0, 60, 350, 100), BorderSide.None);
            TextBrick brick2 = e.Graph.DrawString(header[2], Color.DarkBlue, new RectangleF(700, 40, 400, 100), BorderSide.None);
            TextBrick brick3 = e.Graph.DrawString(header[3], Color.DarkBlue, new RectangleF(700, 60, 400, 100), BorderSide.None);

            brick0.Font = new Font("Tahoma", 16);

            //TextBrick brickright = e.Graph.DrawString(headerright[0], Color.DarkBlue, new RectangleF(800, 20, 600, 100), BorderSide.None);
            //TextBrick brickright1 = e.Graph.DrawString(headerright[1], Color.DarkBlue, new RectangleF(800, 40, 600, 100), BorderSide.None);
            //TextBrick brickright2 = e.Graph.DrawString(headerright[2], Color.DarkBlue, new RectangleF(800, 60, 600, 100), BorderSide.None);
            //  brickright.HorzAlignment = brickright1.HorzAlignment = brickright2.HorzAlignment = DevExpress.Utils.HorzAlignment.Near;
        }
예제 #9
0
        private void printableComponentLink1_CreateMarginalHeaderArea(object sender, CreateAreaEventArgs e)
        {
            var info = new GeneralInfo();

            info.LoadAll();
            string    head  = "Price Only Report";
            TextBrick brick = e.Graph.DrawString(head, Color.Black, new RectangleF(400, 40, 200, 100),
                                                 BorderSide.None);

            brick.Font = new Font("Tahoma", 13);
            string[] header =
            {
                info.HospitalName,          "Date: " + dtDate.Text,
                "Store: " + cboStores.Text,
                "Category: " + lkCommodityTypes.Text
            };
            printableComponentLink1.Landscape        = true;
            printableComponentLink1.PageHeaderFooter = header;

            TextBrick brick1 = e.Graph.DrawString(header[0], Color.DarkBlue, new RectangleF(0, 20, 200, 100),
                                                  BorderSide.None);
            TextBrick brick2 = e.Graph.DrawString(header[1], Color.DarkBlue, new RectangleF(0, 40, 200, 100),
                                                  BorderSide.None);
            TextBrick brick3 = e.Graph.DrawString(header[2], Color.DarkBlue, new RectangleF(0, 60, 200, 100),
                                                  BorderSide.None);
            TextBrick brick4 = e.Graph.DrawString(header[3], Color.DarkBlue, new RectangleF(0, 80, 200, 100),
                                                  BorderSide.None);
        }
예제 #10
0
        public override DevExpress.XtraPrinting.IVisualBrick GetBrick(PrintCellHelperInfo info)
        {
            TextBrick brick = base.GetBrick(info) as TextBrick;

            brick.XlsxFormatString = XlsxFormatString;
            return(brick);
        }
예제 #11
0
        private void btn_NonPrintableBrick_Click(object sender, EventArgs e)
        {
            BrickGraphics graph = printingSystem1.Graph;

            // Start the report generation.
            printingSystem1.Begin();

            // Set the modifier - specify the page area.
            graph.Modifier = BrickModifier.MarginalHeader;

            string format = "Page {0} of {1}";

            graph.Font      = graph.DefaultFont;
            graph.BackColor = Color.Transparent;
            RectangleF r = new RectangleF(0, 0, 0, graph.Font.Height);
            // Create a brick.
            PageInfoBrick brick = graph.DrawPageInfo(PageInfo.NumberOfTotal, format,
                                                     Color.Black, r, BorderSide.None);

            brick.Alignment = BrickAlignment.Far;
            brick.AutoWidth = true;

            // Create another brick with different alignment.
            brick = graph.DrawPageInfo(PageInfo.DateTime, "{0:MMMM dd}", Color.Black, r, BorderSide.None);

            // Change the page area - set the modifier.
            printingSystem1.Graph.Modifier = BrickModifier.DetailHeader;

            graph.BackColor = Color.Silver;

            // Create a brick, which will be hidden in the printout.
            TextBrick tBrick = new TextBrick(BorderSide.None, 1, Color.Black, Color.Khaki, Color.Blue);

            tBrick.Url        = "http://www.devexpress.com";
            tBrick.Text       = "Click here to visit our web site";
            tBrick.CanPublish = false;
            printingSystem1.Graph.DrawBrick(tBrick, new RectangleF(0, 0, 200, 20));

            // Create a brick - a column header.
            printingSystem1.Graph.DrawString("Report Items", Color.Black,
                                             new RectangleF(0, 20, 200, 20), BorderSide.All);

            // Change the page area - set the modifier.
            printingSystem1.Graph.Modifier = BrickModifier.Detail;

            graph.BackColor = Color.White;

            // Create bricks.
            for (int i = 0; i < 100; i++)
            {
                printingSystem1.Graph.DrawString("Item N" + Convert.ToString(i + 1),
                                                 Color.Black, new RectangleF(0, 20 * i, 200, 20), BorderSide.All);
            }

            // Finish the report generation.
            printingSystem1.End();

            // Preview the report.
            printingSystem1.PreviewFormEx.Show();
        }
예제 #12
0
        private void PrintableComponentLink_CreateReportHeaderArea(object sender, CreateAreaEventArgs e)
        {
            TextBrick brick = e.Graph.DrawString(m_GridReportTitle, Color.Black, new RectangleF(0, 5, 600, 25), BorderSide.None);

            brick.Font         = new Font("Arial", 14, FontStyle.Bold);
            brick.StringFormat = new BrickStringFormat(StringAlignment.Center);
        }
예제 #13
0
파일: LogInventory.cs 프로젝트: HCMISFE/FE
        private void Link_CreateMarginalHeaderArea(object sender, CreateAreaEventArgs e)
        {
            GeneralInfo info = new GeneralInfo();

            info.LoadAll();
            // old header
            //string header = info.HospitalName + "Inventory Log of " + lblAdjDate.Text;

            //header with reference number  and date included
            //CalendarLib.DateTimePickerEx dtDate = new CalendarLib.DateTimePickerEx
            //{
            //    Value = DateTime.Now,
            //    CustomFormat = "MM/dd/yyyy"
            //};
            //DateTime dtCurrent = Convert.ToDateTime(dtDate.Text);
            DataRow dr      = gridView2.GetFocusedDataRow();
            string  invDate = Convert.ToString(dr["Year"]);

            string header = info.HospitalName + "\n Inventory Log of Year " + invDate + " E.C\n Store: " + cboStores.Text;

            printableComponentLink1.Landscape        = true;
            printableComponentLink1.PageHeaderFooter = header;

            TextBrick brick = e.Graph.DrawString(header, Color.Navy, new RectangleF(0, 0, 800, 100),
                                                 DevExpress.XtraPrinting.BorderSide.None);

            brick.Font         = new Font("Tahoma", 13);
            brick.StringFormat = new DevExpress.XtraPrinting.BrickStringFormat(StringAlignment.Center);
        }
예제 #14
0
        private void printableComponentLink1_CreateMarginalFooterArea(object sender, CreateAreaEventArgs e)
        {
            PageInfoBrick pib = new PageInfoBrick();

            pib.Format = "Page {0}/{1}";
            string Suppliername = "Supplied By: " + dtRec.AsDataView()[0]["SupplierName"] as string;
            string Receivername = "Received By: " + dtRec.AsDataView()[0]["ReceivedBy"] as string;

            //RectangleF r = RectangleF.Empty;
            //r.Height = 20;
            //r.X = 800;


            pib = e.Graph.DrawPageInfo(PageInfo.NumberOfTotal, pib.Format, Color.Black, new RectangleF(100, 0, 200, 20), BorderSide.None);
            PageInfoBrick brick = e.Graph.DrawPageInfo(PageInfo.NumberOfTotal, pib.Format + "\n Print Date " + DateTime.Now.ToShortDateString() + " G.C",
                                                       Color.Black, new RectangleF(100, 0, 200, 40), BorderSide.None);

            brick.Alignment = BrickAlignment.Far;
            TextBrick brickleft = e.Graph.DrawString(Suppliername, Color.Navy, new RectangleF(0, 0, 200, 20),
                                                     DevExpress.XtraPrinting.BorderSide.None);

            brickleft.Font         = new Font("Tahoma", 10);
            brickleft.StringFormat = new DevExpress.XtraPrinting.BrickStringFormat(StringAlignment.Near);
            TextBrick brickrb = e.Graph.DrawString(Receivername, Color.Navy, new RectangleF(0, 20, 200, 20),
                                                   DevExpress.XtraPrinting.BorderSide.None);

            brickrb.Font         = new Font("Tahoma", 10);
            brickrb.StringFormat = new DevExpress.XtraPrinting.BrickStringFormat(StringAlignment.Near);
        }
        private void printableComponentLink1_CreateMarginalHeaderArea(object sender, DevExpress.XtraPrinting.CreateAreaEventArgs e)
        {
            var info = new GeneralInfo();

            info.LoadAll();

            int year  = Convert.ToInt32(cboYear.EditValue);
            int month = 10;
            int day   = 30;

            if (year == dtCurrent.Year)
            {
                month = dtCurrent.Month;
                day   = dtCurrent.Day;
            }

            DateTime startDate   = EthiopianDate.EthiopianDate.EthiopianToGregorian(String.Format("{0}/{1}/{2}", 1, 11, year - 1));
            DateTime endDate     = EthiopianDate.EthiopianDate.EthiopianToGregorian(String.Format("{0}/{1}/{2}", day, month, year));
            DateTime currentDate = EthiopianDate.EthiopianDate.EthiopianToGregorian(String.Format("{0}/{1}/{2}", dtCurrent.Day, dtCurrent.Month, dtCurrent.Year));

            string strStartDate   = EthiopianDate.EthiopianDate.GregorianToEthiopian(startDate);
            string strEndDate     = EthiopianDate.EthiopianDate.GregorianToEthiopian(endDate);
            string strCurrentDate = EthiopianDate.EthiopianDate.GregorianToEthiopian(currentDate);

            string[] header = { info.HospitalName, "Store: " + cboStores.Text, " From Start Date: " + strStartDate, " To End Date: " + strEndDate, "Printed Date: " + strCurrentDate };
            printableComponentLink1.Landscape        = true;
            printableComponentLink1.PageHeaderFooter = header;

            TextBrick brick  = e.Graph.DrawString(header[0], Color.DarkBlue, new RectangleF(0, 0, 200, 100), BorderSide.None);
            TextBrick brick1 = e.Graph.DrawString(header[1], Color.DarkBlue, new RectangleF(0, 20, 200, 100), BorderSide.None);
            TextBrick brick2 = e.Graph.DrawString(header[2], Color.DarkBlue, new RectangleF(0, 40, 200, 100), BorderSide.None);
            TextBrick brick3 = e.Graph.DrawString(header[3], Color.DarkBlue, new RectangleF(160, 40, 200, 100), BorderSide.None);
            TextBrick brick4 = e.Graph.DrawString(header[4], Color.DarkBlue, new RectangleF(0, 60, 200, 100), BorderSide.None);
        }
        private void Link_CreateMarginalHeaderArea(object sender, CreateAreaEventArgs e)
        {
            TextBrick brick = e.Graph.DrawString(soLuongSheets[flag_i].ToUpper(), System.Drawing.Color.DarkBlue, new RectangleF(0, 0, 500, 2000), BorderSide.All);

            //TextBrick brick = e.Graph.DrawString(soLuongSheets[flag_i - 1], System.Drawing.Color.DarkBlue, new RectangleF(0, 0, 500, 1200), BorderSide.None);
            flag_i++;
        }
예제 #17
0
        private void PrintCompOnCreateReportHeaderArea(object sender, CreateAreaEventArgs createAreaEventArgs)
        {
            TextBrick brick = createAreaEventArgs.Graph.DrawString(txtSelectedFacility.Text + " Report", Color.Black, new RectangleF(0, 0, 500, 40), BorderSide.None);

            brick.Font         = new Font("Tahoma", 12);
            brick.StringFormat = new BrickStringFormat(StringAlignment.Near);
        }
예제 #18
0
        private void printableComponentLink1_CreateMarginalHeaderArea(object sender, CreateAreaEventArgs e)
        {
            GeneralInfo info = new GeneralInfo();

            info.LoadAll();
            //CalendarLib.DateTimePickerEx dtDate = new CalendarLib.DateTimePickerEx
            //{
            //    Value = DateTime.Now,
            //    CustomFormat = "MM/dd/yyyy"
            //};
            //DateTime dtCurrent = Convert.ToDateTime(dtDate.Text);
            var       headCenter  = "Activity Log Report";
            TextBrick brickcenter = e.Graph.DrawString(headCenter, Color.Navy, new RectangleF(0, 20, 1000, 120),
                                                       DevExpress.XtraPrinting.BorderSide.None);

            brickcenter.Font         = new Font("Tahoma", 13);
            brickcenter.StringFormat = new DevExpress.XtraPrinting.BrickStringFormat(StringAlignment.Center);

            var    comHeader = info.HospitalName + "\nStore: " + cboStores.Text;
            string header    = (!isIssue) ? comHeader + "\nReceived From " + dtFrom.Text + " To " + dtTo.Text + " E.C \nSupplier: " + lkSupplier.Text :
                               comHeader + "\nIssued From " + dtFrom.Text + " To " + dtTo.Text + " E.C \nIssue Location: " + lklocation.Text;

            printableComponentLink1.Landscape        = true;
            printableComponentLink1.PageHeaderFooter = header;

            TextBrick brick = e.Graph.DrawString(header, Color.Navy, new RectangleF(0, 40, 1000, 120),
                                                 DevExpress.XtraPrinting.BorderSide.None);

            brick.Font         = new Font("Tahoma", 12);
            brick.StringFormat = new DevExpress.XtraPrinting.BrickStringFormat(StringAlignment.Near);
        }
        // Creates an interval between grids and fills it with color.
        void linkMainReport_CreateDetailArea(object sender, CreateAreaEventArgs e)
        {
            TextBrick tb = new TextBrick();

            tb.Rect      = new RectangleF(0, 0, e.Graph.ClientPageSize.Width, 50);
            tb.BackColor = Color.Gray;
            e.Graph.DrawBrick(tb);
        }
예제 #20
0
파일: main.cs 프로젝트: staherianYMCA/test
        static void Main(string[] args)
        {
            var tmpTextBrick = new TextBrick();

            tmpTextBrick.XlsxFormatString = "aaa";
            var tmpITableCell       = tmpTextBrick as ITableCell;
            var tmpXlsxFormatString = tmpITableCell.XlsxFormatString;
        }
        void footerLink_CreateDetailArea(object sender, CreateAreaEventArgs e)
        {
            TextBrick brick = new TextBrick(BorderSide.None, 0, Color.White, Color.Gray, Color.Blue);

            brick.Text = "some footer text";
            brick.Rect = new RectangleF(0, 0, 400, 20);
            e.Graph.DrawBrick(brick);
        }
예제 #22
0
        public static void gridPreviewTextoCabecalho(object sender, CreateAreaEventArgs e)
        {
            //Texto do cabeçalho/rodapé
            TextBrick brick = e.Graph.DrawString("Relatório", Color.Black, new RectangleF(300, 5, 500, 40), BorderSide.None);

            brick.Font         = new Font("Arial", 16);
            brick.StringFormat = new BrickStringFormat(StringAlignment.Center);
        }
예제 #23
0
        void printableComponentLink1_CreateReportFooterArea(object sender, CreateAreaEventArgs e)
        {
            TextBrick brick = e.Graph.DrawString("My Report Footer", Color.Navy, new RectangleF(0, 10, 400, 40), BorderSide.None);

            brick.BackColor    = Color.White;
            brick.Font         = new Font("Tahoma", 16);
            brick.StringFormat = new DevExpress.XtraPrinting.BrickStringFormat(StringAlignment.Center);
        }
예제 #24
0
        TextBrick CreateTextBrick(PanelBrick panelBrick)
        {
            TextBrick textBrick = new TextBrick();

            textBrick.Sides     = BorderSide.None;
            textBrick.BackColor = Color.Transparent;
            panelBrick.Bricks.Add(textBrick);
            return(textBrick);
        }
예제 #25
0
 private void _PrintableLink_CreatePageHeaderArea(object sender, DevExpress.XtraPrinting.CreateAreaEventArgs e)
 {
     if (_PrintParam != null && _PrintParam.PageHeaderTitle != null && _PrintParam.PageHeaderTitle.Length > 0)
     {
         RectangleF r     = new RectangleF(0, 0, e.Graph.ClientPageSize.Width, e.Graph.Font.Height);
         TextBrick  brick = e.Graph.DrawString(_PrintParam.PageHeaderTitle, Color.Blue, r, BorderSide.None);
         brick.StringFormat = new BrickStringFormat(StringAlignment.Far);
     }
 }
예제 #26
0
        private void Link_CreateMarginalHeaderArea(object sender, CreateAreaEventArgs e)
        {
            string[] header = { "Ending Balance for " + cboStores.Text + " of year " + EthiopianDate.EthiopianDate.Now.Year };
            pcl.PageHeaderFooter = header;

            TextBrick brick = e.Graph.DrawString(header[0], Color.DarkBlue, new RectangleF(100, 0, 500, 300), BorderSide.None);
            //TextBrick brick1 = e.Graph.DrawString(header[1], Color.DarkBlue, new RectangleF(20, 20, 200, 100), BorderSide.None);
            //TextBrick brick2 = e.Graph.DrawString(header[2], Color.DarkBlue, new RectangleF(20, 40, 200, 100), BorderSide.None);
        }
예제 #27
0
        public void Adding_a_new_textbrick_will_return_textbrick_with_Id()
        {
            var poco = new TextBrick
            {
                LedgeId = 1,
                Text    = "Das ist ein kurzer Text für diesen Test"
            };

            AddPoco(PostOrPutAction.Brick, poco);
        }
예제 #28
0
        public void Adding_a_new_invalid_textbrick_will_not_succeed()
        {
            var poco = new TextBrick
            {
                LedgeId = 1,
                Text    = ""
            };

            AddPoco(PostOrPutAction.Brick, poco, true);
        }
예제 #29
0
        /// <summary>
        /// 设定打印主单信息
        /// </summary>
        private void HeaderLink_CreateDetailArea(object sender, CreateAreaEventArgs e)
        {
            TextBrick brick = new TextBrick();

            brick.BorderWidth = 0;
            brick.Text        = string.Format("销售单号:{0}   项目号:{1}   项目名称:{2}", btnEditAutoSalesOrderNo.Text, textProjectNo.Text, textProjectName.Text);
            brick.Rect        = new RectangleF(0, 0, 600, 23);
            brick.Font        = new Font("宋体", 10);
            e.Graph.DrawBrick(brick);
        }
예제 #30
0
        private static void ExportText(PrintCellHelperInfo info, Rectangle rect, string text, PanelBrick brick)
        {
            PrintCellHelperInfo inf = new PrintCellHelperInfo(info.LineColor, info.PS, text, info.Appearace, text, rect, info.Graph, DevExpress.Utils.HorzAlignment.Near, true, true, info.TextValueFormatString, BorderSide.All);

            using (RepositoryItemTextEdit repTE = new RepositoryItemTextEdit()) {
                TextBrick tb = (TextBrick)repTE.GetBrick(inf);
                tb.Rect = rect;
                brick.Bricks.Add(tb);
            }
        }
예제 #31
0
 void linkGrid1Report_CreateDetailArea(object sender, CreateAreaEventArgs e)
 {
     TextBrick tb = new TextBrick();
     tb.Text = strReportHeader;
     tb.Font = new Font("Arial",15);
     tb.Rect = new RectangleF(0, 0, 500, 25);
     tb.BorderWidth = 0;
     tb.BackColor = Color.Transparent;
     tb.HorzAlignment = DevExpress.Utils.HorzAlignment.Near;
     e.Graph.DrawBrick(tb);
 }
예제 #32
0
 void linkGrid1Report_CreateDetailArea(object sender, CreateAreaEventArgs e)
 {
     var tb = new TextBrick();
     tb.Text = "Credit sales";
     tb.Font = new Font("Tahoma", 12);
     tb.Rect = new RectangleF(0, 0, e.Graph.ClientPageSize.Width, 50);
     tb.BorderWidth = 0;
     tb.BackColor = Color.Transparent;
     tb.HorzAlignment = HorzAlignment.Center;
     e.Graph.DrawBrick(tb);
 }
예제 #33
0
 private static void linkChartReport_CreateDetailArea(object sender, CreateAreaEventArgs e)
 {
     TextBrick tb = new TextBrick();
     tb.Text = "";
     tb.Font = new Font("Tahoma", 12, FontStyle.Bold);
     tb.Rect = new RectangleF(0, 0, 600, 25);
     tb.BorderWidth = 0;
     tb.BackColor = Color.Transparent;
     tb.HorzAlignment = DevExpress.Utils.HorzAlignment.Center;
     e.Graph.DrawBrick(tb);
 }
예제 #34
0
 private static void linkGrid1Report_CreateDetailArea(object sender, CreateAreaEventArgs e)
 {
     TextBrick tb = new TextBrick();
     tb.Text = "Dữ Liệu Chi Tiết";
     tb.Font = new Font("Arial", 12);
     tb.Rect = new RectangleF(0, 30, 600, 25);
     tb.BorderWidth = 0;
     tb.BackColor = Color.Transparent;
     tb.HorzAlignment = DevExpress.Utils.HorzAlignment.Center;
     e.Graph.DrawBrick(tb);
 }
예제 #35
0
 private static void linkMainReport_CreateDetailArea(object sender, CreateAreaEventArgs e)
 {
     TextBrick tb = new TextBrick();
     tb.Rect = new RectangleF(0, 0, e.Graph.ClientPageSize.Width, 50);
     tb.BackColor = Color.White;
     e.Graph.DrawBrick(tb);
 }