Exemple #1
0
        public void OnDropDownItemClick(ToolStripItem item, MouseButtons mouseButton)
        {
            // user clicked the dropdown menu item of this plugin button dropdown.

            if (item.Text == "´ò¿ªÎļþ¼Ð")
            {
                if (mouseButton == MouseButtons.Left)
                {
                    string mydocument = Environment.GetFolderPath(Environment.SpecialFolder.Personal);
                    pluginServer.CreateTab(new Address(mydocument), -1, false, true);
                }
                else if (mouseButton == MouseButtons.Right)
                {
                    SystemSounds.Asterisk.Play();
                }
            }
            else if (item.Text == "²âÊÔÑ¡ÖÐ")
            {
                if (lstSelectedItems.Count > 0)
                {
                    pluginServer.TrySetSelection(lstSelectedItems.ToArray(), false);
                }
            }
            else if (item.Text == "²âÊÔ±êÇ©Ëø¶¨×´Ì¬")
            {
                MessageBox.Show("²âÊÔ±êÇ©Ëø¶¨×´Ì¬");
                ITab[] tabs = pluginServer.GetTabs();
                foreach (ITab iTab in tabs)
                {
                    MessageBox.Show("" + iTab.Address.Path + "->" + iTab.Locked);
                }
            }
        }
Exemple #2
0
        public void OnDropDownItemClick(ToolStripItem item, MouseButtons mouseButton)
        {
            // user clicked the dropdown menu item of this plugin button dropdown.

            if (item.Text == "Open folder")
            {
                if (mouseButton == MouseButtons.Left)
                {
                    string mydocument = Environment.GetFolderPath(Environment.SpecialFolder.Personal);
                    pluginServer.CreateTab(new Address(mydocument), -1, false, true);
                }
                else if (mouseButton == MouseButtons.Right)
                {
                    SystemSounds.Asterisk.Play();
                }
            }
            else if (item.Text == "Test selection")
            {
                if (lstSelectedItems.Count > 0)
                {
                    pluginServer.TrySetSelection(lstSelectedItems.ToArray(), false);
                }
            }
        }