AlgorithmicColorRamp.frmAlgorithmicColorRamp.LooRGBColors C# (CSharp) Метод

LooRGBColors() приватный Метод

private LooRGBColors ( ) : void
Результат void
		private void LooRGBColors()
		{
			//
			// Move to the required Color to show. We only have space to show ten colors
			// at a time on the form. So when we wish to show the next ten colors,
			// (colors 11-20, 21-30 etc) we iterate the colors enumeration appropriately.
			//
			int lngMoveNext = 0;
			m_enumNewColors.Reset();
			while (lngMoveNext < m_lngColors)
			{
				m_enumNewColors.Next();
				lngMoveNext = lngMoveNext + 1;
			}
			//
			// Show colors in textboxes as necessary.
			//
			IColor colNew = null;
			int lngCount = 0;
			for (lngCount = 0; lngCount <= 9; lngCount++)
			{
				//commented the control array txtColor - OLD
				//With txtColor(lngCount)
				//    colNew = m_enumNewColors.Next
				//    '
				//    ' If getting the next color returns nothing, we have got to
				//    ' the end of the colors enumeration.
				//    '
				//    If colNew Is Nothing Then
				//        Exit For
				//    End If
				//    .BackColor = System.Drawing.ColorTranslator.FromOle(colNew.RGB)
				//    .Visible = True
				//End With
				colNew = m_enumNewColors.Next();
					//
					// If getting the next color returns nothing, we have got to
					// the end of the colors enumeration.
					//
				if (colNew == null)
					break;
				TextBoxColors[lngCount].BackColor = System.Drawing.ColorTranslator.FromOle(colNew.RGB);
				TextBoxColors[lngCount].Visible = true;
				//Commented the control array lblIndex - OLD
				//With lblIndex(lngCount)
				//    .Text = CStr(lngCount + m_lngColors)
				//    .Visible = True
				//End With
				//LabelsIndex[lngCount].Text = System.Convert().ToString(lngCount + m_lngColors);
                LabelsIndex[lngCount].Text = Convert.ToString (lngCount+m_lngColors);
				LabelsIndex[lngCount].Visible = true;

			}
		}