Example #1
0
        protected override void OnPropertyChanged(DependencyPropertyChangedEventArgs e)
        {
            //Get the Selected Color
            SelectedColor = (Color)imgcanvas?.SelectedColor;
            //Convert Selected Color to string
            Hex = SelectedColor.ToString();
            //Create an Html Hex Color
            HtmlHex = Hex.Replace("#FF", "#");
            //Call the OnSelectedColor
            OnColorSelected?.Invoke(SelectedColor);

            base.OnPropertyChanged(e);
        }
        private void PickerPictureBox_MouseClick(object sender, MouseEventArgs e)
        {
            var id = FindColorId(e.Location);

            if (id < 0)
            {
                SelectedColorIndex = -1;
            }
            else
            {
                SelectedColorIndex = id;
            }
            DrawColorSelection(id);
            OnColorSelected?.Invoke(this, id);
        }
Example #3
0
        protected override void OnPropertyChanged(DependencyPropertyChangedEventArgs e)
        {
            if (e.Property.Name == "Source")
            {
                cachedTargetBitmap = null;        // TargetBitmap cache isn't valid anymore.
                Position           = new Point(); // Move the selector to the top-left corner.
            }
            //Execute OnColorSelected
            var color = this.SelectedColor;

            OnColorSelected?.Invoke(color);


            base.OnPropertyChanged(e);
        }
Example #4
0
    public void ColorSelected(object sender, Card.CardColor color)
    {
        waitingForInput           = false;
        Controls.OnColorSelected -= ColorSelected;
        workingCard.cardColor     = color;
        workingCard = null;
        OnColorSelected?.Invoke(this, color);

        if (controlledByLocal)
        {
            manager.SendExtraAction(new ExtraCardArgs(color, index));
        }
        turnInProgress = false;

        OnEndTurn(this, this);
    }
Example #5
0
 void panel_OnClicked(Color color)
 {
     CurrentColor = color;
     OnColorSelected.Invoke(color);
 }
Example #6
0
 private void ColorSelected(Color clr)
 {
     OnColorSelected.Invoke(clr);
     Hide();
 }
Example #7
0
 void ColorDialog_OnColorSelected(Color arg)
 {
     OnColorSelected.Invoke(arg);
     Close(ReturnStatus.Ok);
 }
Example #8
0
 void On_Color_Selected(UIMenuItem item)
 {
     OnColorSelected.Dispatch(item as UIColorItem);
 }
Example #9
0
 public void Zaludy()
 {
     OnColorSelected?.Invoke(this, Card.CardColor.Zaludy);
     colorSelector.SetActive(false);
 }
Example #10
0
 public void Srdce()
 {
     OnColorSelected?.Invoke(this, Card.CardColor.Srdce);
     colorSelector.SetActive(false);
 }
Example #11
0
 public void Listy()
 {
     OnColorSelected?.Invoke(this, Card.CardColor.Listy);
     colorSelector.SetActive(false);
 }