コード例 #1
0
        public Form_FlashStart()
        {
            InitializeComponent();

            x = this.Width;
            y = this.Height;
            setTag(this);

            Initializenotifyicon();
            //LoadImageList("");
            this.AllowDrop = true;

            //json
            string defaultcontent = "{\"AppListModel\": [{}]}";

            JsonHelper.CreateJson(defaultcontent);

            //string jsonData = "{\"name\":\"lily\",\"age\":23,\"addr\":{\"city\":guangzhou,\"province\":guangdong}}";
            //string jsonData = "{\"AppListModel\": [{\"AppInfo\": {\"apptag\": \"常用\",\"apptitle\": \"BaiduNetdisk\",\"appiconpath\": \"C:/Users/YT/AppData/Roaming/baidu/BaiduNetdisk/BaiduNetdisk.exe\"}}, {\"AppInfo\": {\"apptag\": \"常用\",\"apptitle\": \"BaiduNetdisk\",\"appiconpath\": \"C:/Users/YT/AppData/Roaming/baidu/BaiduNetdisk/BaiduNetdisk.exe\"}}]}";
            LoadImageList();
            //AppListModel appinfomodel = (AppListModel)JsonConvert.DeserializeObject(jsonData, typeof(AppListModel));

            LoadTabControl_Main();

            LoadTime();

            //创建钩子
            kh = new KeyboardHook();
            kh.SetHook();
            kh.OnKeyDownEvent += kh_OnKeyDownEvent;
            mh = new MouseHook();
            mh.Start();
            mh.OnMouseActivity += mh_OnMouseClickEvent;
        }