public override bool Execute(Fireball.Plugins.PluginApplication application) { _FunctionsHashTable = new Hashtable(); Stream stream = typeof(PHPPlugin).Assembly.GetManifestResourceStream("FirePHP.phpfunctions.ini"); StreamReader reader = new StreamReader(stream); while (!reader.EndOfStream) { string line = reader.ReadLine(); if (line != null) { string functionName = line.Substring(0, line.IndexOf('=')); string desc = line.Substring(line.IndexOf('=') + 1); _FunctionsHashTable.Add(functionName, desc); } } FireEditApplication editor = (FireEditApplication)application; editor.MainForm.NewCodeEditor += new EventHandler <NewCodeEditorEventArgs>(MainForm_NewCodeEditor); editor.MainForm.DockContainer.ActiveDocumentChanged += new EventHandler(DockContainer_ActiveDocumentChanged); phpToolBar = new PHPToolBar(); phpToolBar.Enabled = false; phpToolBar.Name = "PHPToolBar"; phpToolBar.Location = new System.Drawing.Point(editor.MainForm.MainToolStrip.Location.X + editor.MainForm.MainToolStrip.Width, editor.MainForm.MainToolStrip.Location.Y); editor.MainForm.TopToolStripPanel.Controls.Add(phpToolBar); ToolStripMenuItem mnuPHPHelp = new ToolStripMenuItem("PHP Docs"); mnuPHPHelp.Click += new EventHandler(mnuPHPHelp_Click); ToolStripMenuItem mnuHelp = (ToolStripMenuItem)editor.MainForm.MainMenuStrip.Items.Find("mnuHelp", false)[0]; mnuHelp.DropDownItems.Add("-"); mnuHelp.DropDownItems.Add(mnuPHPHelp); return(true); }
public override bool Execute(Fireball.Plugins.PluginApplication application) { _FunctionsHashTable = new Hashtable(); Stream stream = typeof(PHPPlugin).Assembly.GetManifestResourceStream("FirePHP.phpfunctions.ini"); StreamReader reader = new StreamReader(stream); while (!reader.EndOfStream) { string line = reader.ReadLine(); if (line != null) { string functionName = line.Substring(0, line.IndexOf('=')); string desc = line.Substring(line.IndexOf('=') + 1); _FunctionsHashTable.Add(functionName, desc); } } FireEditApplication editor = (FireEditApplication)application; editor.MainForm.NewCodeEditor += new EventHandler<NewCodeEditorEventArgs>(MainForm_NewCodeEditor); editor.MainForm.DockContainer.ActiveDocumentChanged += new EventHandler(DockContainer_ActiveDocumentChanged); phpToolBar = new PHPToolBar(); phpToolBar.Enabled = false; phpToolBar.Name = "PHPToolBar"; phpToolBar.Location = new System.Drawing.Point(editor.MainForm.MainToolStrip.Location.X + editor.MainForm.MainToolStrip.Width, editor.MainForm.MainToolStrip.Location.Y); editor.MainForm.TopToolStripPanel.Controls.Add(phpToolBar); ToolStripMenuItem mnuPHPHelp = new ToolStripMenuItem("PHP Docs"); mnuPHPHelp.Click += new EventHandler(mnuPHPHelp_Click); ToolStripMenuItem mnuHelp = (ToolStripMenuItem)editor.MainForm.MainMenuStrip.Items.Find("mnuHelp", false)[0]; mnuHelp.DropDownItems.Add("-"); mnuHelp.DropDownItems.Add(mnuPHPHelp); return true; }