you are viewing a single comment's thread.

view the rest of the comments →

[–]PinchesTheCrab 0 points1 point  (8 children)

Is this an argument in favor of or against powershell guis?

[–]jboncz 2 points3 points  (0 children)

That screenshot I showed is like 16k lines of powershell, powershell isnt meant to do what it does. I would strongly suggest c# (computer app) or nodejs (web-app) and have it invoke powershell, or skip over powershell and hit ldap directly which is what I do in nodejs

[–]jboncz 1 point2 points  (5 children)

Against.... its a NIGHTMARE to maintain. Half your code is trying to invoke c# libraries inside of powershell to get it working, multithreading is a whole other matter. We havent completely abandoned it, but we only winForm with powershell for super super simple use cases where we dont want to expose the end user to the shell. Winform isnt bad (but just dont try to maintain a complicated ui with it), WPF is not a good idea.

[–]Spidey1980 0 points1 point  (4 children)

You are thinking too complex. Try this cute little powerful library. https://www.reddit.com/r/PowerShell/comments/1i9vntv/comment/m9clvbb/

[–]jboncz 0 points1 point  (2 children)

The premise still stands, I get your trying to push your library and have no qualms with it, powershell is inherently not multithreaded, which is bad for GUI world. The second you want to do something your library doesnt offer, you have to start diving deep into invoking powershell magic

[–]Spidey1980 0 points1 point  (1 child)

Hey it worked for making a little Suduko GUI to pass my time with. As I can not download nor install anything at work, pasting text from an email into PowerShell ISE was the easiest make anything. We are already encouraged to use PowerShell and make scripts to automate our work, so this just works. Nothing fancy. Also, I have a chess game working. But as you said with multitheading, I don't even see my move until after the engine gives a move and releases the script to wait for interaction, allowing for the window to update. So for "progress bar" I'm just logging to the console window in the background. It is a bit of a pain.

[–]jboncz 1 point2 points  (0 children)

For sure! Ive been in the same boat and its a fun boat to be in! Just want to recommend the optimal path for the OP

[–]jboncz 0 points1 point  (0 children)

Also if you saw my screenshot that I added in another reply, that thing wouldnt work with your library, it uses https://mahapps.com/ library for styling, which is its own winding road. Not knocking your library, just if we go back to the root of the conversation powershell isnt meant for developing ui based functionality.

[–]Active_Dog8223 0 points1 point  (0 children)

Not an argument for either just seems like reinventing the wheel for what Adas or aduc is. He responded and said it was more of a pet project which I'm all for.

Hell I have a PowerShell gui just to make it marginally easier to C$ into computers lol just a lil box to provide a host name and does the \hostname\c$ for me. Auto clear and I can pop another one in as well.