Example #1
0
            public string NextIntensity(int index)
            {
                if (index == 0)
                {
                    current = TOTAL_COLORS_PER_CHANNEL - 1;
                }
                else if (index % TOTAL_PATTERNS == 0)
                {
                    if (walker == null)
                    {
                        walker = new IntensityValueWalker();
                    }
                    else
                    {
                        walker.MoveNext();
                    }
                    current = walker.Current.Value;
                }
                string currentText = current.ToString("X");

                if (currentText.Length == 1)
                {
                    currentText = "0" + currentText;
                }
                return(currentText);
            }
            public string NextIntensity(int index)
            {
                if (index == 0)
                {
                    current = 255;
                }
                else if (index % 7 == 0)
                {
                    if (walker == null)
                    {
                        walker = new IntensityValueWalker();
                    }
                    else
                    {
                        walker.MoveNext();
                    }

                    current = walker.Current.Value;
                }
                string currentText = current.ToString("X");

                if (currentText.Length == 1)
                {
                    currentText = "0" + currentText;
                }

                return(currentText);
            }
Example #3
0
            public string NextIntensity(int index)
            {
                if (index == 0)
                {
                    _current = 255;
                }
                else if (index % 7 == 0)
                {
                    if (_walker == null)
                    {
                        _walker = new IntensityValueWalker();
                    }
                    else
                    {
                        _walker.MoveNext();
                    }
                    _current = _walker.Current.Value;
                }
                string currentText = _current.ToString("X", CultureInfo.InvariantCulture);

                if (currentText.Length == 1)
                {
                    currentText = "0" + currentText;
                }

                return(currentText);
            }