예제 #1
0
        public DeviceChangeNotifier()
        {
            InitializeComponent();
            hWPenSign = this.axHWPenSign1;
            hWPenSign.HWSetExtWndHandle(this.Handle.ToInt32());
            var res = hWPenSign.HWInitialize();

            mInstance = this;
        }
예제 #2
0
        protected override void SetVisibleCore(bool value)
        {
            // Prevent window getting visible
            if (mInstance == null)
            {
                CreateHandle();
            }
            mInstance = this;
            value     = false;



            base.SetVisibleCore(value);
        }
예제 #3
0
파일: Program.cs 프로젝트: lvJianWu/Fleck
        static void Main(string[] args)
        {
            //HWPenSignClass hWPenSign = new HWPenSignClass();
            //hWPenSign.HWSetBkColor(0xE0F8E0);

            //hWPenSign.HWSwitchMonitor(1, 0);

            ////   hWPenSign.HWSetCtlFrame(2, 0x000000);
            //var res = hWPenSign.HWInitialize();

            // var base64 = hWPenSign.HWGetBase64Stream(0);

            DeviceChangeNotifier.Start();
            DeviceChangeNotifier.OKResultFunc = ((a) =>
            {
                Console.WriteLine(a);
            });
            while (true)
            {
                var s = Console.ReadLine();
                switch (Convert.ToInt32(s))
                {
                case 1:
                    DeviceChangeNotifier.hWPenSign.HWInitialize();
                    break;

                case 2:
                    DeviceChangeNotifier.hWPenSign.HWFinalize();
                    break;

                case 3:
                    Console.WriteLine(DeviceChangeNotifier.hWPenSign.HWGetBase64Stream(0));
                    break;

                case 4:
                    DeviceChangeNotifier.hWPenSign.HWClearPenSign();
                    break;
                }
            }
            Console.ReadLine();
        }