Esempio n. 1
0
        public static List <ToolStripItem> CreateAppLauncherItems(IntPtr hwndParent, bool fReorderEnabled, ItemRightClickedEventHandler rightClickHandler, EventHandler dirDoubleClickEvent, bool fFromTaskBar)
        {
            QTUtility.RefreshUserAppDic(false);
            List <ToolStripItem> list = new List <ToolStripItem>();
            EventPack            ep   = new EventPack(hwndParent, rightClickHandler, dirDoubleClickEvent, fFromTaskBar);

            foreach (string str in QTUtility.UserAppsDic.Keys)
            {
                string[] appVals = QTUtility.UserAppsDic[str];
                if (appVals != null)
                {
                    list.Add(CreateMenuItem_AppLauncher(str, appVals, ep));
                }
                else
                {
                    using (RegistryKey key = Registry.CurrentUser.OpenSubKey(@"Software\Quizo\QTTabBar\UserApps\" + str, false)) {
                        if (key != null)
                        {
                            ToolStripItem item = CreateMenuItem_AppLauncher_Virtual(str, fReorderEnabled, key, ep);
                            if (item != null)
                            {
                                list.Add(item);
                            }
                        }
                        continue;
                    }
                }
            }
            return(list);
        }