简体   繁体   中英

How to convert a WinForm GUI to PowerShell script?

As we know, we can write a PowerShell script to show a windows form .

Is there a automatic converter that converts a WinForm assembly or *.designer.cs (designer generated C# code) into PowerShell script?

There was a "PrimalForms 2011" community version, but it seems that it's now called "PowerShell Studio 2012" and has a 45 days trail version.

Is there another choice? A simpler converter or something? Thanks!

I steel use two solutions (well hidden on the web but still existing) to solve your problem :

First , You can use Sapiens PrimalForms Community Edition (It's free, you just have to sign to Sapiens and go to download).This Framwork allow you to graphicaly build your DialogBox and then it generates the PowerShell Code for Windows Forms (still avalaible as shown here under).

在此处输入图片说明

Second you've got a script called PowerShell Form Converter writen by Arnaud Petitjean (11-05-2007). Once again you have to register, the article is writen in french, but you can download a Powershell script that transform a Windows Form from a .CS file to a PS1. Like in Sapiens editor, the transformation is commented (here in french) with the place to code events.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM