2

I'm not able to see my Window in the plug in area. I know that some code must be added in the Integrate section. However i don't know which.

public void Integrate() { }

public void IntegratePresentation() {}

How can I make it visible? Is it really possible?, if not How can I display a window in Petrel?

Evgeny
  • 665
  • 4
  • 14
Eduardo
  • 67
  • 1
  • 11

1 Answers1

3

You should add your window to the system so that Petrel displays it when requested to.

  1. Your window class should be a ToggleWindow:

    public class MyWindow : ToggleWindow{ ... }

  2. Add a menu through which you can ask Petrel to create and open your window in the Windows area:

    public void IntegratePresentation()
    {
        WellKnownMenus.Window.AddTool(
              new PetrelButtonTool("&My Window", 
                                    PetrelImages.Editor, 
                                    (sender, e) => PetrelProject
                                                   .ToggleWindows
                                                   .Add(new MyWindow())));
    
    }
    

I hope this helps.

GETah
  • 20,922
  • 7
  • 61
  • 103