In that particular case, you could have an array of DashStyes and an array of ints (or an array of a struct containing both). The arrays would be initialized to the proper values, then indexed by AmountX to get the gPen.DashStyle and gPen.Width.
gPen.DashStyle = penDashStyle[AmountX];
gPen.Width = penWidth[AmountX];
g.DrawLine (gPen, a, b, c, d);
It could, of course, be put in a separate method.