コード例 #1
0
        private void HexView_OnTooltipOverlay(object sender, TooltipOverlayEventArgs args)
        {
            Tooltip.Visibility = Visibility.Visible;
            var s = (args.Entry.PropertyName != String.Empty) ? args.Entry.PropertyName + " - " : String.Empty;

            TooltipText.Text = s + args.Entry.ClassName;

            var top = (double)Rect1.GetValue(Canvas.TopProperty);

            top += top > 0 ? -1 * Tooltip.ActualHeight : Rect1.ActualHeight;
            Tooltip.SetValue(Canvas.TopProperty, top);
            Tooltip.SetValue(Canvas.LeftProperty, Rect1.GetValue(Canvas.LeftProperty));
        }
コード例 #2
0
        public MainForm()
        {
            InitializeComponent();
            JsonViewer.PropertyChanged += new PropertyChangedEventHandler(JsonViewer_PropertyChanged);

            try
            {
                var   Salamander = Process.GetProcessesByName("salamand")[0];
                Rect1 rect       = new Rect1();
                GetWindowRect(Salamander.MainWindowHandle, ref rect);

                this.Width  = rect.Right - rect.Left;
                this.Height = rect.Bottom - rect.Top;
                this.Left   = rect.Left;
                this.Top    = rect.Top;
            }
            catch
            {
            }
        }
コード例 #3
0
 public override double Square()
 {
     return(Rect1.Square() * 2 + Rect2.Square() * 2 + Rect3.Square() * 2);
 }
コード例 #4
0
 public static extern bool GetWindowRect(IntPtr hwnd, ref Rect1 rectangle);