Exemple #1
0
        private void toolStripMenuItem1_Click(object sender, EventArgs e)
        {
            if (pluginManager == null)
                pluginManager = new FormPluginManager(proxy.Proxy);

            pluginManager.ShowDialog();
        }
Exemple #2
0
        private void startParProxyUp()
        {
            proxy = new ProxyManager(textBoxProxyPort.Text, comboBoxListenAddress.Text, comboBoxLoginURL.Text);
            // disable any gui elements
            comboBoxListenAddress.Enabled = textBoxProxyPort.Enabled = comboBoxLoginURL.Enabled = false;
            InitProxyFilters();
            proxy.Start();

            toolStripQuickLaunch.Enabled = loadFilterSelectionsToolStripMenuItem.Enabled = saveFilterSelectionsToolStripMenuItem.Enabled = true;

            // enable any gui elements
            toolStripSplitButton1.Enabled =
            toolStripMenuItemPlugins.Enabled = grpUDPFilters.Enabled = grpCapsFilters.Enabled = m_ProxyRunning = true;
            buttonStartProxy.Visible = false;
            buttonStartProxy.Text = "Stop Proxy";
            buttonStartProxy.Checked = true;
            if (enableStatisticsToolStripMenuItem.Checked && !timer1.Enabled)
                timer1.Enabled = true;
            PubComb plugin = new PubComb(proxy.Proxy);
            plugin.Init();
            if (pluginManager == null)   pluginManager = new FormPluginManager(proxy.Proxy);
            pluginManager.listView1.Items.Add(new ListViewItem(new[] {"pubcomb", "PubComb" }));

            List<GTabPlug> plugs = plugin.getPlugins();
            foreach (GTabPlug p in plugs)
            {
                tabInfo temp = p.getInfo();
                //MessageBox.Show(temp.s);
                this.addATab(temp.f, temp.s);
            }
            String curView = "";
            if(m_InstalledViewers.ContainsKey(toolStripComboBox1.Text))
            {
                curView = m_InstalledViewers[toolStripComboBox1.Text];
            }
            if (curView == "")
            {
                this.toolStripButtonLaunchViewer_Click(null, null);
                curView = m_InstalledViewers[toolStripComboBox1.Text];
            }

            System.Diagnostics.Process.Start(
                String.Format("{0}", curView),
                String.Format("--set InstallLanguage en -multiple -loginuri http://{0}:{1}",
                comboBoxListenAddress.Text, textBoxProxyPort));
            TextWriter tw = new  StreamWriter("LastViewer.settings");
            tw.WriteLine(curView);
            tw.Close();
            toolStripQuickLaunch.Enabled = false;
        }