public override void Run()
		{
			AbstractProjectBrowserTreeNode node = Owner as AbstractProjectBrowserTreeNode;
			IProject project = (node != null) ? node.Project : ProjectService.CurrentProject;
			if (project == null) {
				return;
			}
			using (SelectMonoReferenceDialog selDialog = new SelectMonoReferenceDialog(project)) {
				if (selDialog.ShowDialog(ICSharpCode.SharpDevelop.Gui.WorkbenchSingleton.MainForm) == DialogResult.OK) {				
					foreach (ReferenceProjectItem reference in selDialog.ReferenceInformations) {
						ProjectService.AddProjectItem(project, reference);
					}
					project.Save();
				}
			}
		}
Example #2
0
        public override void Run()
        {
            AbstractProjectBrowserTreeNode node = Owner as AbstractProjectBrowserTreeNode;
            IProject project = (node != null) ? node.Project : ProjectService.CurrentProject;

            if (project == null)
            {
                return;
            }
            using (SelectMonoReferenceDialog selDialog = new SelectMonoReferenceDialog(project)) {
                if (selDialog.ShowDialog(ICSharpCode.SharpDevelop.Gui.WorkbenchSingleton.MainWin32Window) == DialogResult.OK)
                {
                    foreach (ReferenceProjectItem reference in selDialog.ReferenceInformations)
                    {
                        ProjectService.AddProjectItem(project, reference);
                    }
                    project.Save();
                }
            }
        }