Monday, December 28, 2015

Replicate Line Multiple Times & Add Line Number to Line Start Selection Widgets

Visual Smarter provides many selection widgets, as shown before. We are going to introduce the Replicate Line Multiple Times and the Add Line Number to Line Start widgets here.

If there is some code as follows somewhere:

            List<int> intList = new List<int>();
            intList.Add(1);

  the last line is selected, and the Replicate Line Multiple Times widget is called up, a number is input such as 10, then the code will become like this:

            List<int> intList = new List<int>();
            intList.Add(1);
            intList.Add(1);
            intList.Add(1);
            intList.Add(1);
            intList.Add(1);
            intList.Add(1);
            intList.Add(1);
            intList.Add(1);
            intList.Add(1);
            intList.Add(1);
            intList.Add(1);

If the ten adding lines are selected and the Add Line Number to Line Start widget is called, the line labels will be added accordingly:

            List<int> intList = new List<int>();
Line_1:             intList.Add(1);
Line_2:             intList.Add(1);
Line_3:             intList.Add(1);
Line_4:             intList.Add(1);
Line_5:             intList.Add(1);
Line_6:             intList.Add(1);
Line_7:             intList.Add(1);
Line_8:             intList.Add(1);
Line_9:             intList.Add(1);
Line_10:             intList.Add(1);

No comments:

Post a Comment