Esempio n. 1
0
        public ColorPickerPageViewModel(INavigationService navigationService)
        {
            _navigationService = navigationService;

            PickerColor   = new ColorPickerColor();
            ApplyCommand  = new Command(async() => await Apply());
            CancelCommand = new Command(async() => await Cancel());
        }
Esempio n. 2
0
 /// <summary>
 /// Initializes a new instance of the using Pixelaria.Views.ModelViews;
 /// </summary>
 /// <param name="oldColor">Gets the color value before the change</param>
 /// <param name="newColor">Gets the new color value</param>
 /// <param name="targetColor">Gets the ColorPicker color index that was changed</param>
 public ColorPickEventArgs(Color oldColor, Color newColor, ColorPickerColor targetColor)
 {
     OldColor    = oldColor;
     NewColor    = newColor;
     TargetColor = targetColor;
 }
Esempio n. 3
0
 //
 // Second Color Panel mouse down event handler
 //
 private void pnl_secondColor_MouseDown(object sender, MouseEventArgs e)
 {
     SelectedColor = ColorPickerColor.SecondColor;
 }
Esempio n. 4
0
 //
 // First Color Panel mouse down event handler
 //
 private void pnl_firstColor_MouseDown(object sender, MouseEventArgs e)
 {
     SelectedColor = ColorPickerColor.FirstColor;
 }
Esempio n. 5
0
 /// <summary>
 /// Fires the color change event with the given color
 /// </summary>
 /// <param name="color">The color to fire the event with</param>
 /// <param name="colorIndex">Which color index to fire the event fore. Defaults to the current color</param>
 public void FireColorChangeEvent(Color color, ColorPickerColor colorIndex = ColorPickerColor.CurrentColor)
 {
     ColorSelect?.Invoke(this, new ColorPickEventArgs(color, color, colorIndex));
 }