GuideWin.xaml.cs

(开头部分) 2KB

这里只显示每个文件的开头 60 行。登录后可以解锁完整代码。

using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Data;
using System.Windows.Documents;
using System.Windows.Input;
using System.Windows.Media;
using System.Windows.Media.Imaging;
using System.Windows.Shapes;

namespace SimpleGuide
{
    /// <summary>
    /// GuideWin.xaml 的交互逻辑
    /// </summary>
    public partial class GuideWin : Window
    {
        PathGeometry borGeometry = new PathGeometry();
        List<GuidVo> list;
        int index = 0;
        public GuideWin(Window win, List<GuidVo> gl)
        {
            InitializeComponent();
            //设置弹出的窗体
            this.Height = win.ActualHeight;
            this.Width = win.ActualWidth;
            this.WindowState = win.WindowState;
            this.Left = win.Left;
            this.Top = win.Top;
            this.Owner = win;
            list = gl;
            show(index + 1, list[index].Uc, list[index].Content);
        }

        private void show(int xh, FrameworkElement fe, string con, Visibility vis = Visibility.Visible)
        {
            Point point = fe.TransformToAncestor(Window.GetWindow(fe)).Transform(new Point(0, 0));//获取控件坐标点

            RectangleGeometry rg = new RectangleGeometry();
            rg.Rect = new Rect(0, 0, this.Width, this.Height);
            borGeometry = Geometry.Combine(borGeometry, rg, GeometryCombineMode.Union, null);
            bor.Clip = borGeometry;

            RectangleGeometry rg1 = new RectangleGeometry();
            rg1.Rect = new Rect(point.X - 5, point.Y - 5, fe.ActualWidth + 10, fe.ActualHeight + 10);
            borGeometry = Geometry.Combine(borGeometry, rg1, GeometryCombineMode.Exclude, null);

            bor.Clip = borGeometry;

            HintUC hit = new HintUC(xh.ToString(), con, vis);
            Canvas.SetLeft(hit, point.X + fe.ActualWidth + 3);
            Canvas.SetTop(hit, point.Y + fe.ActualHeight + 3);
            hit.nextHintEvent -= Hit_nextHintEvent;
            hit.nextHintEvent += Hit_nextHintEvent;
            can.Children.Add(hit);

            index++;
后面还有 15 行代码,解锁后查看完整代码

24 小时内免费解锁 3 个项目,之后 1 算力/个。 规则说明

AI 解读 AI

登录后可用,每次 10 算力,解读结果公开显示在下面。

还没有人解读过这个文件。