private int get_index_of_using_modes() { for (int index = 0; index < _using_color_modes.Length; index++) { if (_using_color_modes[index].GetType().Equals(_using_mod.GetType())) { return(index); } } return(-1); }
public CycleGradientColorMode(int[] Percents,Color[] Colors,Color ColorOfVoid,ulong GradientIterationsCount,ulong GradientVoidIterationsCount,IColorReturnable UsingMod) { _percents = Percents; _color = Colors; _gradient_void = ColorOfVoid; _gradient_iterations_count = GradientIterationsCount; _gradient_void_iterations_count = GradientVoidIterationsCount; _using_color_modes = WeAreColorReturnable.GetWith(new VoidColorMode(this)); _using_mod = UsingMod; for (int i = 0; i < _using_color_modes.Length - 1; i++) { if (_using_color_modes[i].GetType().Equals(UsingMod.GetType())) { _using_color_modes[i] = UsingMod; } if (_using_color_modes[i] is FractalColorMode) ((FractalColorMode)_using_color_modes[i]).FractalColorModeChanged += (fcm, control) => { this._fcm_on_FractalColorModeChangedHandler(); }; } }
public CycleGradientColorMode(int[] Percents, Color[] Colors, Color ColorOfVoid, ulong GradientIterationsCount, ulong GradientVoidIterationsCount, IColorReturnable UsingMod) { _percents = Percents; _color = Colors; _gradient_void = ColorOfVoid; _gradient_iterations_count = GradientIterationsCount; _gradient_void_iterations_count = GradientVoidIterationsCount; _using_color_modes = WeAreColorReturnable.GetWith(new VoidColorMode(this)); _using_mod = UsingMod; for (int i = 0; i < _using_color_modes.Length - 1; i++) { if (_using_color_modes[i].GetType().Equals(UsingMod.GetType())) { _using_color_modes[i] = UsingMod; } if (_using_color_modes[i] is FractalColorMode) { ((FractalColorMode)_using_color_modes[i]).FractalColorModeChanged += (fcm, control) => { this._fcm_on_FractalColorModeChangedHandler(); } } ; } }