public void SetMarkButtonTooltip(MarkType type, string toolTip) { var b = _MarkButtons.FirstOrDefault(m => PNUtils.GetMarkType(m) == type); if (b != null) { b.ToolTip = toolTip; } }
public void SetButtonTooltip(FormatType type, string toolTip) { var b = _FormatButtons.FirstOrDefault(f => PNUtils.GetFormatType(f) == type); if (b != null) { b.ToolTip = toolTip; } }
public bool IsMarkButtonVisible(MarkType type) { var b = _MarkButtons.FirstOrDefault(m => PNUtils.GetMarkType(m) == type); if (b != null) { return(b.Visibility == Visibility.Visible); } return(false); }
public void SetMarkButtonVisibility(MarkType type, bool value) { var b = _MarkButtons.FirstOrDefault(m => PNUtils.GetMarkType(m) == type); var v = value ? Visibility.Visible : Visibility.Collapsed; if (b != null) { b.Visibility = v; } }
private void MarkButton_Click(object sender, MouseButtonEventArgs e) { var image = sender as Image; if (image == null || MarkButtonClicked == null) { return; } MarkButtonClicked(this, new MarkButtonClickedEventArgs(PNUtils.GetMarkType(image))); }
private void FormatButton_MouseLeftButtonUp(object sender, MouseButtonEventArgs e) { var image = sender as Image; if (image == null || FormatButtonClicked == null) { return; } var formatType = PNUtils.GetFormatType(image); FormatButtonClicked(this, new FormatButtonClickedEventArgs(formatType)); e.Handled = true; }