• 大小: 0.97M
    文件类型: .zip
    金币: 1
    下载: 0 次
    发布日期: 2024-04-27
  • 语言: C#
  • 标签: wpf  wp  键盘  

资源简介

WPF开发的用户键盘支持复合按键

资源截图

代码片段和文件信息

using HeBianGu.Product.UserControls.SystemKeyBoard;
using System;
using System.Collections.Generic;
using System.Configuration;
using System.Data;
using System.Diagnostics;
using System.Linq;
using System.Threading.Tasks;
using System.Windows;

namespace HeBianGu.Product.KeyBoard
{
    /// 
    /// App.xaml 的交互逻辑
    /// 

    public partial class App : Application
    {

        public App()
        {
            DispatcherUnhandledException += App_DispatcherUnhandledException;

            AppDomain.CurrentDomain.UnhandledException += CurrentDomain_UnhandledException;
        }

        void App_DispatcherUnhandledException(object sender System.Windows.Threading.DispatcherUnhandledExceptionEventArgs e)
        {

            Application.Current.Dispatcher.Invoke(() => MessageBox.Show(e.Exception.Message));

            e.Handled = true;
        }


        void CurrentDomain_UnhandledException(object sender UnhandledExceptionEventArgs e)
        {
            Exception error = (Exception)e.Exceptionobject;

            Application.Current.Dispatcher.Invoke(() => MessageBox.Show(“当前应用程序遇到一些问题,该操作已经终止,请进行重试,如果问题继续存在,请联系管理员“ “意外的操作“));
        }

        protected override void onstartup(StartupEventArgs e)
        {
            Process thisProc = Process.GetCurrentProcess();

            var p = Process.GetProcessesByName(thisProc.ProcessName);

            if (p.Length > 1)
            {
                Environment.Exit(0);

                return;
            }


            KeyBoardWindow.ShowDefault(()=> Environment.Exit(0));
        }
    }
}

 属性            大小     日期    时间   名称
----------- ---------  ---------- -----  ----
     目录           0  2019-07-16 03:17  WPF-SystemKeyboard-master\
     文件          66  2019-07-16 03:17  WPF-SystemKeyboard-master\.gitattributes
     文件        4994  2019-07-16 03:17  WPF-SystemKeyboard-master\.gitignore
     目录           0  2019-07-16 03:17  WPF-SystemKeyboard-master\Document\
     文件      875620  2019-07-16 03:17  WPF-SystemKeyboard-master\Document\屏幕键盘.gif
     文件      124919  2019-07-16 03:17  WPF-SystemKeyboard-master\Document\屏幕键盘.png
     文件         368  2019-07-16 03:17  WPF-SystemKeyboard-master\README.md
     目录           0  2019-07-16 03:17  WPF-SystemKeyboard-master\Solution\
     目录           0  2019-07-16 03:17  WPF-SystemKeyboard-master\Solution\hebiangu\
     文件        2100  2019-07-16 03:17  WPF-SystemKeyboard-master\Solution\hebiangu\HeBianGu.Product.SystemKeyBoard.sln
     目录           0  2019-07-16 03:17  WPF-SystemKeyboard-master\Source\
     目录           0  2019-07-16 03:17  WPF-SystemKeyboard-master\Source\Application\
     目录           0  2019-07-16 03:17  WPF-SystemKeyboard-master\Source\Application\HeBianGu.Product.KeyBoard\
     文件         182  2019-07-16 03:17  WPF-SystemKeyboard-master\Source\Application\HeBianGu.Product.KeyBoard\App.config
     文件         353  2019-07-16 03:17  WPF-SystemKeyboard-master\Source\Application\HeBianGu.Product.KeyBoard\App.xaml
     文件        1702  2019-07-16 03:17  WPF-SystemKeyboard-master\Source\Application\HeBianGu.Product.KeyBoard\App.xaml.cs
     文件        3841  2019-07-16 03:17  WPF-SystemKeyboard-master\Source\Application\HeBianGu.Product.KeyBoard\FuncButtonControl.xaml
     文件        9286  2019-07-16 03:17  WPF-SystemKeyboard-master\Source\Application\HeBianGu.Product.KeyBoard\FuncButtonControl.xaml.cs
     文件        6331  2019-07-16 03:17  WPF-SystemKeyboard-master\Source\Application\HeBianGu.Product.KeyBoard\HeBianGu.Product.KeyBoard.csproj
     目录           0  2019-07-16 03:17  WPF-SystemKeyboard-master\Source\Application\HeBianGu.Product.KeyBoard\Image\
     文件        1281  2019-07-16 03:17  WPF-SystemKeyboard-master\Source\Application\HeBianGu.Product.KeyBoard\Image\Backspace.png
     文件        2522  2019-07-16 03:17  WPF-SystemKeyboard-master\Source\Application\HeBianGu.Product.KeyBoard\Image\按下.png
     文件        2728  2019-07-16 03:17  WPF-SystemKeyboard-master\Source\Application\HeBianGu.Product.KeyBoard\Image\按下1.png
     文件        2646  2019-07-16 03:17  WPF-SystemKeyboard-master\Source\Application\HeBianGu.Product.KeyBoard\Image\按下2.5.png
     文件        2626  2019-07-16 03:17  WPF-SystemKeyboard-master\Source\Application\HeBianGu.Product.KeyBoard\Image\按下2.png
     文件        3264  2019-07-16 03:17  WPF-SystemKeyboard-master\Source\Application\HeBianGu.Product.KeyBoard\Image\按下5.5.png
     文件        2525  2019-07-16 03:17  WPF-SystemKeyboard-master\Source\Application\HeBianGu.Product.KeyBoard\Image\按钮1.png
     文件        2750  2019-07-16 03:17  WPF-SystemKeyboard-master\Source\Application\HeBianGu.Product.KeyBoard\Image\按钮2.5.png
     文件        2777  2019-07-16 03:17  WPF-SystemKeyboard-master\Source\Application\HeBianGu.Product.KeyBoard\Image\按钮2.png
     文件        3336  2019-07-16 03:17  WPF-SystemKeyboard-master\Source\Application\HeBianGu.Product.KeyBoard\Image\按钮5.5.png
     文件       45342  2019-07-16 03:17  WPF-SystemKeyboard-master\Source\Application\HeBianGu.Product.KeyBoard\Image\按钮间距.png
............此处省略33个文件信息

评论

共有 条评论