1. C# / Говнокод #14190

    +133

    1. 01
    2. 02
    3. 03
    4. 04
    5. 05
    6. 06
    7. 07
    8. 08
    9. 09
    10. 10
    11. 11
    12. 12
    13. 13
    14. 14
    15. 15
    16. 16
    17. 17
    18. 18
    19. 19
    var firstLocation = new Tuple<Point, Point>(new Point(12, 444 - 38), new Point(30, 446 - 38));
    var secondLocation = new Tuple<Point, Point>(new Point(12, 464 - 38), new Point(30, 464 - 38));
    var thirdLocation = new Tuple<Point, Point>(new Point(12, 486 - 38), new Point(30, 484 - 38));
    
    var first = new Tuple<Control, Control>(chbDimaGaugeNewContractPS, lblDimaGaugeNewContractPS);
    var second = new Tuple<Control, Control>(chbDimaGaugeNewContractIBanking, lblDimaGaugeNewContractIBanking);
    var third = new Tuple<Control, Control>(chbDimaGaugeNewContractActivePS, lblDimaGaugeNewContractActivePS);
    
    var controls = new List<Tuple<Control, Control>> { first, second, third };
    var points = new List<Tuple<Point, Point>> { firstLocation, secondLocation, thirdLocation };
    
    int i = 0;
    
    foreach (var t in controls.Where(x => !x.Item1.Enabled))
    {
      t.Item1.Location = points[i].Item1;
      t.Item2.Location = points[i].Item2;
      i++;
    }

    кортежи в .NET - хорошо или плохо?

    Запостил: taburetka, 06 Декабря 2013

    Комментарии (13) RSS

    Добавить комментарий