Exemple #1
0
		public new IBaseExportColumn CreateExportColumn()
		{
			TextStyleDecorator st = base.CreateItemStyle();
			ExportText item = new ExportText(st);
			item.Text = StandardFormatter.FormatOutput(DBValue, this.FormatString, base.DataType, this.NullValue);
			return item;
		}
		public virtual IBaseExportColumn CreateExportColumn(){
			TextStyleDecorator st = this.CreateItemStyle();
			ExportText item = new ExportText(st);
			item.Text = this.text;
			item.Expression = this.Expression;
			return item;
		}
		public override BaseExportColumn CreateExportColumn(){
			this.SetErrorLayout();
			TextStyleDecorator st = base.CreateItemStyle();
			ExportText item = new ExportText(st,false);
			item.Text = this.errMess;
			return item;
		}
Exemple #4
0
		public new BaseExportColumn CreateExportColumn()
		{
			string toPrint = CheckForNullValue();
			TextStyleDecorator st = base.CreateItemStyle();
			ExportText item = new ExportText(st, false);
			item.Text = StandardFormatter.FormatOutput(toPrint, this.FormatString, base.DataType, this.NullValue);

			return item;
		}
Exemple #5
0
 private void EvaluateRecursive(IExpressionEvaluatorFacade evaluatorFassade, ExporterCollection items)
 {
     foreach (BaseExportColumn be in items)
     {
         IExportContainer ec = be as IExportContainer;
         if (ec != null)
         {
             if (ec.Items.Count > 0)
             {
                 EvaluateRecursive(evaluatorFassade, ec.Items);
             }
         }
         ExportText et = be as ExportText;
         if (et != null)
         {
             et.Text = evaluatorFassade.Evaluate(et.Text);
         }
     }
 }
Exemple #6
0
        private static void EvaluateRecursive(IExpressionEvaluatorFacade evaluatorFassade, ExporterCollection items)
        {
            foreach (BaseExportColumn be in items)
            {
                IExportContainer ec = be as IExportContainer;
                if (ec != null)
                {
                    if (ec.Items.Count > 0)
                    {
                        EvaluateRecursive(evaluatorFassade, ec.Items);
                    }
                }
                ExportText et = be as ExportText;

                if (et != null)
                {
                    if (et.Text.StartsWith("=", StringComparison.InvariantCulture))
                    {
                        et.Text = evaluatorFassade.Evaluate(et.Text);
                    }
                }
            }
        }
		TextBlock CreateTextBlock(ExportText exportText)
		{
			TextBlock textBlock = new TextBlock();
			SetFont(textBlock, exportText.StyleDecorator);
			textBlock.TextWrapping = TextWrapping.Wrap;
			
			string [] inlines = exportText.Text.Split(System.Environment.NewLine.ToCharArray());

			for (int i = 0; i < inlines.Length; i++) {
				if (inlines[i].Length > 0) {
					textBlock.Inlines.Add(new Run(inlines[i]));
					textBlock.Inlines.Add(new LineBreak());
				}
			}
			var li = textBlock.Inlines.LastInline;
			textBlock.Inlines.Remove(li);
			SetDimension(textBlock,exportText.StyleDecorator);
		    textBlock.Background = ConvertBrush(exportText.StyleDecorator.BackColor);
		    SetContendAlignment(textBlock,exportText.StyleDecorator);
			return textBlock;
		}
		UIElement CreateTextColumn(ExportText et)
		{
			TextBlock tb = CreateTextBlock(et);
			return tb;
		}
		public virtual BaseExportColumn CreateExportColumn(){
			TextStyleDecorator st = this.CreateItemStyle();
			ExportText item = new ExportText(st,false);
			item.Text = this.text;
			return item;
		}