示例#1
0
        public void SetMarkButtonTooltip(MarkType type, string toolTip)
        {
            var b = _MarkButtons.FirstOrDefault(m => PNUtils.GetMarkType(m) == type);

            if (b != null)
            {
                b.ToolTip = toolTip;
            }
        }
示例#2
0
        public void SetButtonTooltip(FormatType type, string toolTip)
        {
            var b = _FormatButtons.FirstOrDefault(f => PNUtils.GetFormatType(f) == type);

            if (b != null)
            {
                b.ToolTip = toolTip;
            }
        }
示例#3
0
        public bool IsMarkButtonVisible(MarkType type)
        {
            var b = _MarkButtons.FirstOrDefault(m => PNUtils.GetMarkType(m) == type);

            if (b != null)
            {
                return(b.Visibility == Visibility.Visible);
            }
            return(false);
        }
示例#4
0
        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;
            }
        }
示例#5
0
        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)));
        }
示例#6
0
        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;
        }