| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354 |
- using Cognex.VisionPro;
- using Cognex.VisionPro.ToolBlock;
- using System;
- using System.Collections.Generic;
- using System.Linq;
- using System.Text;
- using System.Threading.Tasks;
- 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.Navigation;
- using System.Windows.Shapes;
- namespace Plugins.Vpp.Views
- {
- /// <summary>
- /// ImageToolBlockEdit.xaml 的交互逻辑
- /// </summary>
- public partial class ImageToolBlockEdit : UserControl
- {
- public CogAcqFifoEditV2 CogToolBlockEdit
- {
- get => ICogAcqFifoEditV2;
- set => ICogAcqFifoEditV2 = value;
- }
- public ImageToolBlockEdit()
- {
- InitializeComponent();
- Init();
- }
- public void Init()
- {
- try
- {
- var type = ICogAcqFifoEditV2.GetType();
- var property = type.GetProperty("DoubleBuffered", System.Reflection.BindingFlags.Instance | System.Reflection.BindingFlags.NonPublic);
- if (property != null)
- {
- property.SetValue(ICogAcqFifoEditV2, true, null);
- }
- WFH.Child = ICogAcqFifoEditV2;
- WFH.Child = ICogAcqFifoEditV2;
- }
- catch (Exception ex)
- {
- }
- }
- }
- }
|