PowerShell In GUI Blog

PowerShell GUI Box Just In A Few Clicks

How difficult to paint a graphical GUI plug-in?

with 2 comments

Got bored with the PowerGUI grid? Nothing new may be added to the such well-known product? How do I understand such a mood!

Being responsible for testing of several Quest’s products, I had not at once thinking to base on the PowerGUI something bright, interesting, new… But poor object model stopped me. Does anybody want to dig into asynchronous operations while writing a script? Even your script is working in the same process as the host application, you definitely can achieve anything in a .NET app, but it’s so unconfortable to touch something in the another thread without proper debugger (as in the AdminConsole).

Below is a typical teaser. By now, the PowerGUI 2.1 has been released, but, supposingly not to be publicly viewed until the TechEd, it hasn’t been published yet.

The new anmazing feature I want to reveal is the some SDK helping you to pluginize the application. Provided as an unfriendly object model, it had been wrapped by enthusiasts, one of them is the your author, me. having shared the ideas and our code with another enthusiast, I realized, that not all ideas of how the product cab be extended were spread across the enthusiasts. Surprisingly, not too many people began writing GUI plug-ins.

So, I’m going to demostrate a screen almost completely occupied with my plug-in. It’ll be called add-in, however I’d prefer something unique like poshlet or something like. The poshlet I mentioned consists of Designer pane, ToolBox with a set of Windows.Forms controls and the property window. All of them use the great Actipro basis. There is the fourth component, that’s totally invisible excepting a menu item. I’ll tell you about the fourth below. Now we can see the plug-in at the moment of custom GUI painting.

Okay, might you say, it’s not new, there are a lot of designers in the numerous IDEs and how can it help me with my scripts? The anwer is that there is a code generator allowing you to run what you painted as soon as it would be, for example, SharpDevelop.

Differently from, for instance, SAPIEN’s free IDE, this poshlet is aimed to create dockable applications in the PowerGUI hosts family.

This is the result of code generation that will be definitely proofread later.

At the end, by pressing F5, we have the window that had been painted a few seconds ago.

At left is the window created dynamically whereas at right is what we painted.


Written by Alexander Petrovskiy

June 3, 2010 at 1:24 am

2 Responses

Subscribe to comments with RSS.

  1. Its such as you learn my mind! You seem to grasp
    so much approximately this, like you wrote the guide in it or something.
    I feel that you just can do with some p.c. to pressure the message
    house a bit, however instead of that, that is excellent blog.
    A fantastic read. I will certainly be back.

  2. I’ve been browsing online greater than 3 hours nowadays, yet I by no
    means found any fascinating article like yours. It’s lovely value sufficient for me.
    In my view, if all web owners and bloggers made excellent content material as
    you did, the internet can be much more helpful than ever before.


    August 29, 2014 at 1:52 am

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )


Connecting to %s

%d bloggers like this: