Пример #1
0
        private Cell NormalControl(string type)
        {
            Cell cell = null;

            switch (type.ToLower())
            {
            case "commonlabel":
                cell = new CommonLabel();
                break;

            case "dbboolean":
                cell = new DBBoolean();
                break;

            case "dbimage":
                cell = new DBImage();
                break;

            case "dbdecimal":
                cell = new DBDecimal();
                break;

            case "calculatecolumn":
                cell = new CalculateColumn();
                break;

            case "columnexpression":
                cell = new ColumnExpression();
                break;

            case "decimalalgorithmcolumn":
                cell = new DecimalAlgorithmColumn();
                break;

            case "algorithmcolumn":
                cell = new AlgorithmColumn();
                break;

            case "dbdatetime":
                cell = new DBDateTime();
                break;

            case "dbexchangerate":
                //cell=new GridExchangeRate();
                break;

            case "dbtext":
                cell = new DBText();
                break;

            case "barcode":
                cell = new BarCode();
                break;

            case "gridproportiondecimal":
                cell = new GridProportionDecimal();
                break;
            }
            return(cell);
        }
Пример #2
0
 public CommonLabel(CommonLabel label) : base(label)
 {
     _labeltype        = label.LabelType;
     _bapplycolorstyle = label.bApplyColorStyle;
     _informationid    = label.InformationID;
     _bcenteralign     = label.CenterAlign;
     _userdefineitem   = label.UserDefineItem;
 }
Пример #3
0
        private Cell SummaryNormalControl(string type)
        {
            Cell cell = null;

            switch (type.ToLower())
            {
            case "commonlabel":
                cell = new CommonLabel();
                break;
            }
            return(cell);
        }
        private Cell GetAGap(IGap sourcecell, int x, int y)
        {
            CommonLabel cl = new CommonLabel(sourcecell as Cell);

            cl.Border.NoneBorder();
            cl.Height = sourcecell.GapHeight;
            cl.X      = x;
            cl.SetY(y);
            cl.Width = 2;
            cl.Tag   = "NoMore";
            //cl.BackColor = Color.Red;
            return(cl);
        }
Пример #5
0
        protected override void AddDefaultDetail()
        {
            ReportHeader rh = new ReportHeader();
            Cell         h  = new CommonLabel(100, 40, 280, 80, HeaderLabel);

            h.Name = "HeaderLabel";
            (h as ICenterAlign).CenterAlign = true;
            h.CaptionAlign        = System.Drawing.ContentAlignment.MiddleCenter;
            h.ServerFont.FontSize = 20;
            h.ServerFont.FontName = "ºÚÌå";
            rh.Cells.Add(h);
            _report.Sections.Add(rh);

            GridDetail gd   = new GridDetail();
            int        left = 8;

            System.Collections.ICollection keys = _report.DataSources.DesignKeys;
            if (keys == null)
            {
                keys = _report.DataSources.Keys;
            }
            foreach (string key in keys)
            {
                DataSource ds   = _report.DataSources[key];
                Cell       cell = gd.GetDefaultRect(ds);
                if (cell != null)
                {
                    cell.X = left;
                    left  += cell.Width;
                    if (_datahelper.bCusName(ds.Name))
                    {
                        cell.Visible = false;
                    }
                    cell.SetY(DefaultConfigs.SECTIONHEADERHEIGHT + 8);
                    gd.Cells.Add(cell);
                }
            }
            if (gd.Cells.Count > 0)
            {
                (gd as IAutoDesign).AutoDesign(DefaultConfigs.ReportLeft);
                _report.DesignWidth = gd.Width + 300;
            }
            _report.Sections.Add(gd);
        }
Пример #6
0
        public PageFooter(bool needAddDefaultFooter)
            : base()
        {
            try
            {
                if (needAddDefaultFooter)
                {
                    XmlDocument doc      = new XmlDocument();
                    string      filePath = System.IO.Path.GetDirectoryName(System.Windows.Forms.Application.ExecutablePath) + @"\DefaultFooterConfig.xml";
                    if (!System.IO.File.Exists(filePath))
                    {
                        filePath = System.IO.Path.GetDirectoryName(System.Windows.Forms.Application.ExecutablePath) + @"\uap\DefaultFooterConfig.xml";
                    }
                    doc.Load(filePath);



                    Cell       f    = null;
                    XmlElement root = doc.DocumentElement;
                    foreach (XmlElement xec in root.ChildNodes)
                    {
                        string type = xec.GetAttribute("Type").ToLower();
                        if (type == "commonlabel")
                        {
                            f = new CommonLabel();
                            f.CaptionAlign = System.Drawing.ContentAlignment.MiddleRight;
                        }
                        else
                        {
                            f = new Expression();
                            Formula formula = new Formula();
                            formula.Type = FormulaType.Common;
                            formula.FormulaExpression = xec.GetAttribute("Caption").ToLower();
                            (f as Expression).Formula = formula;
                            CaptionAlign = System.Drawing.ContentAlignment.MiddleLeft;
                        }
                        ConvertFromLocaleInfo(xec, f);
                        this.Cells.Add(f);
                    }
                }
            }
            catch { }
        }
Пример #7
0
        protected Cell OtherControl(string type)
        {
            Cell cell = null;

            switch (type.ToLower())
            {
            case "commonlabel":
                cell = new CommonLabel();
                break;

            case "expression":
                cell = new Expression();
                break;

            case "image":
                cell = new Image();
                break;
            }
            return(cell);
        }
        private Cell MoreLabel(bool bmore, Cell sourcecell, int x, int y, int w, int h)
        {
            CommonLabel cl = new CommonLabel(sourcecell);

            cl.X = x;
            cl.SetY(y);
            cl.Width        = w;
            cl.Height       = h;
            cl.CaptionAlign = ContentAlignment.TopLeft;
            if (bmore)
            {
                cl.Caption = U8ResService.GetResStringEx("U8.UAP.Report.ViewAll");
                _currentreport.RowsCount   = (sourcecell.Tag as SemiRowsContainerPerhaps4Matrix).RowsCount;
                _currentreport.PageRecords = (sourcecell as IIndicatorMetrix).PageSize;
                cl.Report = _currentreport;
                (sourcecell.Tag as SemiRowsContainerPerhaps4Matrix).SetDrillTag(new DrillData(_viewid, _currentreport.ViewID), _cellnametocolumnname);
                cl.Tag = sourcecell.Tag;
            }
            else
            {
                if (sourcecell.Tag is SemiRowsContainer)
                {
                    (sourcecell.Tag as SemiRowsContainer).Canceled();
                }
                cl.Tag = "NoMore";
            }

            cl.Border.Left   = false;
            cl.Border.Bottom = false;
            cl.Border.Right  = false;

            cl.ServerFont.UnderLine = true;
            cl.ForeColor            = Color.Blue;

            //cl.BackColor = Color.Red;
            return(cl);
        }
Пример #9
0
        private Cell IndicatorControl(string type)
        {
            Cell cell = null;

            switch (type.ToLower())
            {
            case "commonlabel":
                cell = new CommonLabel();
                break;

            case "image":
                cell = new Image();
                break;

            case "expression":
                cell = new Expression();
                break;

            case "groupdimension":
                cell = new GroupDimension();
                break;

            case "calculategroupdimension":
                cell = new CalculateGroupDimension();
                break;

            case "crossdimension":
                cell = new CrossDimension();
                break;

            case "calculatecrossdimension":
                cell = new CalculateCrossDimension();
                break;

            case "indicator":
                cell = new Indicator();
                break;

            case "calculateindicator":
                cell = new CalculateIndicator();
                break;

            case "chart":
                cell = new Chart();
                break;

            case "gauge":
                cell = new Gauge();
                break;

            case "indicatormetrix":
                cell = new IndicatorMetrix();
                break;

            case "dbtext":
                cell = new DBText();
                break;

            case "calculatorindicator":
                cell = new CalculatorIndicator();
                break;

            case "gridproportiondecimalindicator":
                cell = new GridProportionDecimalIndicator();
                break;
            }
            return(cell);
        }
Пример #10
0
        protected override Cell AddALocaleCell(XmlElement xecc, Section section)
        {
            Cell   cell = null;
            string type = xecc.GetAttribute("Type");

            if (!section.CanBeParent(type))
            {
                return(null);
            }
            switch (type.ToLower())
            {
            case "commonlabel":
                cell = new CommonLabel();
                break;

            case "expression":
                cell = new Expression();
                break;

            case "image":
                cell = new Image();
                break;

            case "algorithmcalculator":
                cell = new AlgorithmCalculator();
                break;

            case "gridlabel":
                cell = new GridLabel();
                break;

            case "gridboolean":
                cell = new GridBoolean();
                break;

            case "gridimage":
                //cell=new GridImage();
                break;

            case "griddecimal":
                cell = new GridDecimal();
                break;

            case "gridcalculatecolumn":
                cell = new GridCalculateColumn();
                break;

            case "gridcolumnexpression":
                cell = new GridColumnExpression();
                break;

            case "griddecimalalgorithmcolumn":
                cell = new GridDecimalAlgorithmColumn();
                break;

            case "gridalgorithmcolumn":
                cell = new GridAlgorithmColumn();
                break;

            case "griddatetime":
                cell = new GridDateTime();
                break;

            case "gridexchangerate":
                //cell=new GridExchangeRate();
                break;

            case "superlabel":
                cell = new SuperLabel();
                break;

            case "gridproportiondecimal":
                cell = new GridProportionDecimal();
                break;
            }
            if (cell != null)
            {
                ConvertFromLocaleInfo(xecc, cell);
                section.Cells.Add(cell);
            }
            return(cell);
        }