Beispiel #1
0
 //Установка свойств фигуры
 public void Apply(IReportShape rshape, int value) //Значение привязанного параметра
 {
     foreach (var statement in _statements)
     {
         statement.Apply(rshape, value);
     }
 }
Beispiel #2
0
 public Mean GetMean(IReportShape rshape, int value)
 {
     for (int i = 0; i < Params.Length - 1; i += 2)
     {
         if (Params[i].GetMean(rshape, value).Bool)
         {
             return(Params[i + 1].GetMean(rshape, value));
         }
     }
     return(Params[Params.Length - 1].GetMean(rshape, value));
 }
Beispiel #3
0
 //Присвоение значения
 public void Apply(IReportShape rshape, int value)
 {
     try
     {
         var code = Token.Text;
         if (!rshape.Vars.ContainsKey(code))
         {
             rshape.Vars.Add(code, new ShapeVar(code));
         }
         rshape.Vars[code].Value = _expr.GetMean(rshape, value);
     }
     catch { }
 }
Beispiel #4
0
        public Mean GetMean(IReportShape rshape, int value)
        {
            if (Params.Length > 0)
            {
                M0 = Params[0].GetMean(rshape, value);
            }
            if (Params.Length > 1)
            {
                M1 = Params[1].GetMean(rshape, value);
            }
            if (Params.Length > 2)
            {
                M2 = Params[2].GetMean(rshape, value);
            }

            return(CalcMean());
        }
Beispiel #5
0
        //Установка свойства фигуры
        public void Apply(IReportShape rshape, int value) //Значение привязанного параметра
        {
            try
            {
                var shape = rshape.Shape.GroupItems.Item(_shapeCode);
                if (Token.Text == null || shape == null)
                {
                    return;
                }
                var mean = _expr.GetMean(rshape, value);
                switch (Token.Text.ToLower())
                {
                case "visible":
                    shape.Visible = mean.Bool ? MsoTriState.msoTrue : MsoTriState.msoFalse;
                    break;

                case "text":
                    shape.TextFrame.Characters().Text = mean.String;
                    break;

                case "decimalplaces":
                    shape.TextFrame.Characters().Text = Math.Round(shape.TextFrame.Characters().Text.ToDouble(), mean.Integer).ToString();
                    break;

                case "color":
                    shape.Fill.ForeColor.RGB = mean.Integer;
                    break;

                case "backcolor":
                    shape.Fill.BackColor.RGB = mean.Integer;
                    break;

                case "linecolor":
                    shape.Line.ForeColor.RGB = mean.Integer;
                    break;

                case "fontcolor":
                    shape.DrawingObject.Font.Color = mean.Integer;
                    break;

                case "pattern":
                    switch (mean.Integer)
                    {
                    case 0: shape.Fill.Solid(); break;

                    case 1: shape.Fill.Patterned(MsoPatternType.msoPatternDarkHorizontal); break;

                    case 2: shape.Fill.Patterned(MsoPatternType.msoPatternDarkVertical); break;
                    }
                    break;

                case "transparent":
                    shape.Fill.Transparency = (float)mean.Real;
                    break;

                case "linetransparent":
                    shape.Line.Transparency = (float)mean.Real;
                    break;
                }
            }
            catch { }
        }
Beispiel #6
0
 public Mean GetMean(IReportShape rshape, int value)
 {
     return(rshape.Vars[Token.Text].Value);
 }
Beispiel #7
0
 public Mean GetMean(IReportShape rshape, int value)
 {
     return(new MeanInteger(value));
 }
Beispiel #8
0
 public Mean GetMean(IReportShape rshape, int value)
 {
     return(Mean);
 }