Esempio n. 1
0
        static string fullpath = Application.StartupPath + "\\" + "apppath";//全局路径
        /// <summary>
        /// 创建一个新的快捷应用app1
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        private void newToolStripMenuItem_Click(object sender, EventArgs e)
        {
            timerWindowHidder.Enabled = false;
            SetQuickApp newapp = SetQuickApp.GetInstace();

            //SetQuickApp newapp = new SetQuickApp();
            newapp.NewApp(btnApp1);
            this.btnApp1.Image        = (GetExeIcon.GetIcon(newapp.AppPath, true)).ToBitmap();
            timerWindowHidder.Enabled = true;
        }
Esempio n. 2
0
 /// <summary>
 /// 显示应用图标
 /// </summary>
 /// <param name="btnlist">按钮控件数组</param>
 public void SetIcomn(Button[] btnlist)
 {
     doc.Load("data.xml");
     for (int i = 0; i < btnlist.Length; i++)
     {
         try
         {
             if (doc.SelectSingleNode("dataCol/App" + (i + 1).ToString()).InnerText != "")
             {
                 btnlist[i].Image = (GetExeIcon.GetIcon(doc.SelectSingleNode("dataCol/App" + (i + 1).ToString()).InnerText, true)).ToBitmap();
             }
             else
             {
                 btnlist[i].Image = Image.FromFile(@"assets\NoAPP.png");
             }
         }
         catch
         {
         }
     }
 }