Ejemplo n.º 1
0
 public static void SavePluginShortcutKeys()
 {
     using (RegistryKey key = Registry.CurrentUser.CreateSubKey(@"Software\Quizo\QTTabBar\Plugins")) {
         QTUtility2.WriteRegBinary(QTUtility.dicPluginShortcutKeys.Keys
                                   .Select(str => new PluginKey(str, QTUtility.dicPluginShortcutKeys[str])).ToArray(),
                                   "ShortcutKeys", key);
     }
 }
Ejemplo n.º 2
0
 public static void SaveButtonOrder()
 {
     using (RegistryKey key = Registry.CurrentUser.CreateSubKey(@"Software\Quizo\QTTabBar\Plugins")) {
         if (key != null)
         {
             QTUtility2.WriteRegBinary <string>(lstPluginButtonsOrder.ToArray(), "Buttons_Order", key);
         }
     }
 }
Ejemplo n.º 3
0
        public static void SavePluginShortcutKeys()
        {
            List <PluginKey> list = new List <PluginKey>();

            foreach (string str in QTUtility.dicPluginShortcutKeys.Keys)
            {
                list.Add(new PluginKey(str, QTUtility.dicPluginShortcutKeys[str]));
            }
            using (RegistryKey key = Registry.CurrentUser.CreateSubKey(@"Software\Quizo\QTTabBar\Plugins")) {
                QTUtility2.WriteRegBinary <PluginKey>(list.ToArray(), "ShortcutKeys", key);
            }
        }
Ejemplo n.º 4
0
        private static void virtualDirectory_ReorderFinished(object sender, ToolStripItemClickedEventArgs e)
        {
            DropDownMenuReorderable reorderable = (DropDownMenuReorderable)sender;

            using (RegistryKey key = Registry.CurrentUser.CreateSubKey(reorderable.Name)) {
                if (key != null)
                {
                    foreach (string str in key.GetValueNames())
                    {
                        key.DeleteValue(str, false);
                    }
                    int      num   = 1;
                    string[] array = new string[] { "separator", string.Empty, string.Empty };
                    foreach (ToolStripItem item in reorderable.Items)
                    {
                        if (item is ToolStripSeparator)
                        {
                            QTUtility2.WriteRegBinary <string>(array, "Separator" + num++, key);
                        }
                        else
                        {
                            QMenuItem item2 = item as QMenuItem;
                            if (item2 != null)
                            {
                                MenuItemArguments menuItemArguments = item2.MenuItemArguments;
                                if (menuItemArguments.Target == MenuTarget.VirtualFolder)
                                {
                                    key.SetValue(item.Name, new byte[0]);
                                    continue;
                                }
                                string[] strArray2 = new string[] { menuItemArguments.Path, menuItemArguments.OriginalArgument, menuItemArguments.OriginalWorkingDirectory, menuItemArguments.KeyShortcut.ToString() };
                                QTUtility2.WriteRegBinary <string>(strArray2, item.Name, key);
                            }
                        }
                    }
                    QTUtility.fRequiredRefresh_App = true;
                    QTTabBarClass.SyncTaskBarMenu();
                }
            }
        }