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); }
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); }
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); }
void panel_OnClicked(Color color) { CurrentColor = color; OnColorSelected.Invoke(color); }
private void ColorSelected(Color clr) { OnColorSelected.Invoke(clr); Hide(); }
void ColorDialog_OnColorSelected(Color arg) { OnColorSelected.Invoke(arg); Close(ReturnStatus.Ok); }
void On_Color_Selected(UIMenuItem item) { OnColorSelected.Dispatch(item as UIColorItem); }
public void Zaludy() { OnColorSelected?.Invoke(this, Card.CardColor.Zaludy); colorSelector.SetActive(false); }
public void Srdce() { OnColorSelected?.Invoke(this, Card.CardColor.Srdce); colorSelector.SetActive(false); }
public void Listy() { OnColorSelected?.Invoke(this, Card.CardColor.Listy); colorSelector.SetActive(false); }