public void Attach(EditProjectDialog dlg)
        {
            this.dlg = dlg;
            uiSvc = CreateUIService(dlg, dlg.OpenFileDialog, dlg.SaveFileDialog);

            dlg.BrowseBinaryFileButton.Click += new EventHandler(BrowseBinaryFileButton_Click);
            dlg.BrowseAssemblerFileButton.Click += new EventHandler(BrowseAssemblerFileButton_Click);
            dlg.BrowseIntermediateFileButton.Click += new EventHandler(BrowseIntermediateFileButton_Click);
            dlg.BrowseTypesFileButton.Click += new EventHandler(BrowseTypesFileButton_Click);
            dlg.BrowseOutputFileButton.Click += new EventHandler(BrowseOutputFileButton_Click);
        }
 /// <summary>
 /// Shows UI and allows the user to edit the project properties.
 /// </summary>
 /// <param name="project"></param>
 public bool EditProjectProperties(
     IDecompilerShellUiService uiSvc,
     Project_v1 project,
     Action<Project_v1> updater)
 {
     using (var dlg = new EditProjectDialog())
     {
         Attach(dlg);
         LoadFieldsFromProject(project);
         if (uiSvc.ShowModalDialog(dlg) == DialogResult.OK)
         {
             updater(CreateProjectFromFields());
             return true;
         }
     }
     return false;
 }
 public void Teardown()
 {
     if (dlg != null)
         dlg.Dispose();
     dlg = null;
 }
 public void Setup()
 {
     dlg = new EditProjectDialog();
 }