Exemple #1
0
        public static void AddColumn(
            WidgetList widgets,
            int width,
            int height,
            int column,
            IEnumerable <Widget> new_column
            )
        {
            var i = 0;

            foreach (var widget in new_column)
            {
                widgets.Insert(column + i++ *width, widget);
            }
        }
Exemple #2
0
        public static void AddRow(
            WidgetList widgets,
            int width,
            int height,
            int row,
            IEnumerable <Widget> new_row
            )
        {
            var start = row * width;
            var i     = 0;

            foreach (var widget in new_row)
            {
                widgets.Insert(start + i++, widget);
            }
        }