Пример #1
0
    private Widget CreateListWidget(
        List <DataModel.Transaction> transactions,
        Direction side)
    {
        double xPos = 0;

        if (side == Direction.Left)
        {
            xPos = -Screen.Width / 4;
        }
        if (side == Direction.Right)
        {
            xPos = Screen.Width / 4;
        }

        Widget listWidget = new Widget(new VerticalLayout());

        listWidget.Position = new Vector(xPos, 0);
        listWidget.Height   = Screen.Height / 2 * 3.0;

        foreach (var t in transactions)
        {
            var box = new Label(300, Math.Abs(t.delta.Money / 5), t.label);
            box.Color = RandomGen.NextLightColor();
            box.Tag   = "TRANSACTION";
            listWidget.Add(box);
        }
        return(listWidget);
    }