protected virtual void OnColorChanged(ColorChangedEventArgs e) { if (ColorChanged != null) { ColorChanged(this, e); } }
private void proColorsSlider1_ColorChanged(object sender, ColorChangedEventArgs args) { if (suppressProfessionalColorsEvents > 0) { return; } HslColor newHslColor = this.proColorsSlider1.ColorHSL; //HslColor.FromAhsl((int)numAlpha.Value, this.proColorsSlider1.ColorHSL.H, this.colorHsl.S, this.colorHsl.L); newHslColor.A = (int)numAlpha.Value; colorHsl = newHslColor; colorRgb = colorHsl.RgbValue; if (ColorChanged != null) { ColorChanged(this, new ColorChangedEventArgs(colorHsl)); } suppressProfessionalColorsEvents++; this.proColors2DBox1.ColorHSL = colorHsl; suppressProfessionalColorsEvents--; this.UpdateColorComponentsSpinEditors(); }
private void cs2_ColorChanged(ColorPicker sender, ColorChangedEventArgs args) { ColorChanged?.Invoke(new SolidColorBrush(Color.FromArgb(args.NewColor.A, args.NewColor.R, args.NewColor.G, args.NewColor.B)), new ColorPickerEventArgs() { ColorType = (string)rcb.Value2 }); }
void C_ColorChanged(object sender, ColorChangedEventArgs e) { if ((bool)SyncButton.IsChecked) { try { if (_ColorChangedTimer == null) { _ColorChangedTimer = new DispatcherTimer(TimeSpan.FromMilliseconds(200), DispatcherPriority.Background, _ColorChangedTimer_Tick, this.Dispatcher); } _ColorChangedTimer.Stop(); _ColorChangedTimer.Start(); _ColorChangedColor = e.Color; } catch (Exception ex) { if (ex.IsCriticalException()) { throw; } } } }
private static void OnColorChanged(ColorChangedEventArgs e) { if (ColorChanged != null) { ColorChanged(typeof(Theme), e); } }
/// <summary> /// Update this <see cref="ArcadeFont"/>. /// </summary> /// <param name="gameTime">The current <see cref="GameTime"/>, representing the time elapsed over the course of the game.</param> public override void Update(GameTime gameTime) { if (!_isVisible) { return; } if (_elapsedTime >= _delayTime) { int newColor = currentColor + 1 == _fontColors.Count ? 0 : currentColor + 1; Color newColorVal = _fontColors[newColor]; EventHandler <ColorChangedEventArgs> handler = ColorChanged; ColorChangedEventArgs arguments = new ColorChangedEventArgs(newColorVal); if (handler != null) { handler(this, arguments); } if (!arguments.Cancel) { currentColor = newColor; _tintColor = newColorVal; } _elapsedTime = TimeSpan.Zero; } else { _elapsedTime += gameTime.ElapsedGameTime; } base.Update(gameTime); }
private void ColorSample_Click(object sender, EventArgs e) { ColorDialog dlg = new ColorDialog(); dlg.Color = BackColor; if (dlg.ShowDialog() == DialogResult.OK) { if (BackColor.R != dlg.Color.R || BackColor.G != dlg.Color.G || BackColor.B != dlg.Color.B) { BackColor = Color.FromArgb(255, dlg.Color.R, dlg.Color.G, dlg.Color.B); ColorChangedEventArgs args = new ColorChangedEventArgs(); args.OldColor = BackColor; args.NewColor = dlg.Color; ColorChangedEventHandler ev = ColorChanged; if (ev != null) { ev(this, args); } } } }
private void ColorPicker_ColorChanged(ColorPicker sender, ColorChangedEventArgs args) { NewColorPreview.Fill = new SolidColorBrush(sender.Color); NewColorPreviewTooltip.Content = sender.Color.ToString(); PixelColorPicker2.Color = PixelColorPicker.Color; }
private void colorPickerColorChanged(object sender, ColorChangedEventArgs e) { if (sender is ColorPicker colorPicker) { CrosshairData.color = colorPicker.Color; } }
private void OnColorPickerColorChanged(ColorPicker sender, ColorChangedEventArgs args) { if (Layer != null) { ((ColorLayer)Layer).Color = args.NewColor; } }
private void adobeColorsSlider1_ColorChanged(object sender, ColorChangedEventArgs args) { if (ColorChanged != null) { ColorChanged(this, args); } }
private void OnColorPickerColorChanged(object sender, ColorChangedEventArgs args) { if (!this.buttonOK.Enabled) { this.buttonOK.Enabled = true; } }
private async void ColorPicker_ColorChanged(ColorPicker sender, ColorChangedEventArgs args) { FileSavePicker savePicker = new FileSavePicker(); savePicker.SuggestedStartLocation = PickerLocationId.DocumentsLibrary; // Dropdown of file types the user can save the file as savePicker.FileTypeChoices.Add("Plain Text", new List <string>() { ".txt" }); // Default file name if the user does not type one in or select a file to replace savePicker.SuggestedFileName = "New Document"; if (file == null) { file = await savePicker.PickSaveFileAsync(); } string json = JsonConvert.SerializeObject(sender.Color); try { await FileIO.WriteTextAsync(file, json); } catch (Exception e) { } }
/// <summary> /// When combobox value is changed by user /// </summary> private void color_ColorChanged(ColorPicker sender, ColorChangedEventArgs args) { var picker = sender as ColorPicker; var frame = (Frame)Window.Current.Content; var main = (MainPage)frame.Content; main.fractalgenerator.getTemplate().setColor(picker.Color); }
private void ColorPicker_ColorChanged(ColorPicker sender, ColorChangedEventArgs args) { Color = args.NewColor; if (IsCustom) { PaletteItemCustomColorChanged?.Invoke(this); } }
private void Picker2_ColorChanged(ColorSpectrum sender, ColorChangedEventArgs args) { if (muted) { return; } Color = picker2.Color; }
private void adobeColorsSlider1_ColorChanged(object sender, ColorChangedEventArgs args) { if (this.ColorChanged == null) { return; } this.ColorChanged((object)this, args); }
//events private void OnColorPickerControl1OnColorChanged(object sender, ColorChangedEventArgs e) { //need this check to allow relative mode to work properly if ((byte)e.RGB.Red != lightProps.Red || (byte)e.RGB.Green != lightProps.Green || (byte)e.RGB.Blue != lightProps.Blue) { UpdateLightPropsFromSliders(); } }
private void AccentColorPicker_OnColorChanged(ColorPicker sender, ColorChangedEventArgs args) { ThemeSettingsService.AppAccentColor = args.NewColor; if (!AccentColorToggle.IsOn) { ThemeSettingsService.CustomAccentColor = args.NewColor; } }
// hexagon control private void colorHexagon_ColorChanged(object sender, ColorChangedEventArgs args) { valueRed = colorHexagon.SelectedColor.R; valueGreen = colorHexagon.SelectedColor.G; valueBlue = colorHexagon.SelectedColor.B; refreshSliders(); sendMessage(valueRed, valueGreen, valueBlue, 0); }
// // Tiny Color Slider color changed event // private void tcs_transparency_ColorChanged(object sender, ColorChangedEventArgs eventArgs) { _ignoreTransparencySliderUpdates = true; Transparency = eventArgs.NewColor.Af; _ignoreTransparencySliderUpdates = false; }
private void ValueChanged(object sender, ColorChangedEventArgs e) { if (service != null) { colorVal = ColorControl.CurrentColor; service.CloseDropDown(); } }
private async void OnColorChanged(ColorPicker sender, ColorChangedEventArgs args) { uiProgress.IsActive = ncommand == 0; ncommand++; var color = args.NewColor; await bleDevice.SetColor(color.R, color.G, color.B); }
private ColorChangedEventArgs OnColorChanged(string defultColor, string newColor) { ColorChangedEventArgs args = new ColorChangedEventArgs(defultColor, newColor); OnColorChanged(args); return(args); }
private void ColorControl_ColorCancel(object sender, ColorChangedEventArgs e) { if (service != null) { colorVal = Color.Empty; service.CloseDropDown(); } }
private void ColorPicker_ColorChanged(ColorPicker sender, ColorChangedEventArgs args) { if (_changesEnabled) { _shapeColor = ColorPicker.Color; SetProperty(ProertyId.ShapeColor); } }
private ColorChangedEventArgs OnColorChangedForOut() { ColorChangedEventArgs args = new ColorChangedEventArgs(); OnColorChanged(args); return(args); }
private void ColorPicker1_ColorChanged(ColorPicker sender, ColorChangedEventArgs args) { if (canvasCase == null) { return; } PresentTask = true; }
private void TripColor_ColorChanged(ColorPicker sender, ColorChangedEventArgs args) { Color color = TripColor.Color; string hexString = string.Format("#{0:X2}{1:X2}{2:X2}", color.R, color.G, color.B); AddTripViewModel.Trip.Color = hexString; AddTripViewModel.CheckAreFieldValid(); }
protected virtual void OnColorChanged(ColorChangedEventArgs e) { ColorChangedEventHandler handler = this.ColorChanged; if (handler != null) { handler(this, e); } }
/// <summary> /// Update this <see cref="ArcadeFont"/>. /// </summary> /// <param name="gameTime">The current <see cref="GameTime"/>, representing the time elapsed over the course of the game.</param> public override void Update(GameTime gameTime) { if (!_isVisible) { return; } if (_elapsedTime >= _delayTime) { int newColor = currentColor + 1 == _fontColors.Count ? 0 : currentColor + 1; Color newColorVal = _fontColors[newColor]; EventHandler<ColorChangedEventArgs> handler = ColorChanged; ColorChangedEventArgs arguments = new ColorChangedEventArgs(newColorVal); if (handler != null) { handler(this, arguments); } if (!arguments.Cancel) { currentColor = newColor; _tintColor = newColorVal; } _elapsedTime = TimeSpan.Zero; } else { _elapsedTime += gameTime.ElapsedGameTime; } base.Update(gameTime); }
private void myColorWheel_ColorChanged(object sender, ColorChangedEventArgs e) { SetRGB(e.RGB); SetHSV(e.HSV); }
protected void OnColorChanged(ColorHandler.RGB RGB, ColorHandler.HSV HSV) { ColorChangedEventArgs e = new ColorChangedEventArgs(RGB, HSV); ColorChanged(this, e); }