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

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

private UpdateRamp ( ) : void
Результат void
		private void UpdateRamp()
		{
			//
			// Create a new AlgorithmicColorRamp object, and get it's
			// IAlgorithmicColorRamp interface.
			//
			IAlgorithmicColorRamp AlgortihmicColorRamp = null;
			AlgortihmicColorRamp = new ESRI.ArcGIS.Display.AlgorithmicColorRamp();
			//
			// Set the size of the color ramp to the number of classes
			// to be renderered.
			//
			AlgortihmicColorRamp.Size = m_lngClasses;
			//
			// Set the color ramps properties.
			//
			IRgbColor RGBColor = null;
			RGBColor = new RgbColor();
			RGBColor.RGB = System.Drawing.ColorTranslator.ToOle(txtStartColor.BackColor);
			AlgortihmicColorRamp.FromColor = RGBColor;
			RGBColor.RGB = System.Drawing.ColorTranslator.ToOle(txtEndColor.BackColor);
			AlgortihmicColorRamp.ToColor = RGBColor;
			AlgortihmicColorRamp.Algorithm = (esriColorRampAlgorithm)cmbAlgorithm.SelectedIndex;

			bool boolRamp = false;
			if (AlgortihmicColorRamp.Size > 0)
			{

				boolRamp = true;
				AlgortihmicColorRamp.CreateRamp(out boolRamp);
				if (boolRamp)
				{
					m_enumNewColors = AlgortihmicColorRamp.Colors;
					m_enumNewColors.Reset();
					cmdOK.Enabled = true;
					//
					// Check if we should be showing the colors.
					//
					if (chkShowColors.CheckState == System.Windows.Forms.CheckState.Checked)
					{
						//
						// Populate the Colors textbox array and it's labels.
						//
						m_lngColors = 0;
						ShowColorsArray();
					}
				}
			}
		}