forum.vdsworld.com Forum Index forum.vdsworld.com
Visit VDSWORLD.com
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 


Visual DialogShell
Goto page Previous  1, 2, 3
 
Post new topic   Reply to topic    forum.vdsworld.com Forum Index -> Miscellaneous
View previous topic :: View next topic  
Author Message
cnodnarb
Professional Member
Professional Member


Joined: 11 Sep 2002
Posts: 762
Location: Rockeledge, GA

PostPosted: Sat Mar 23, 2019 3:07 pm    Post subject: Reply with quote

And then I woke up....

Back to top
View user's profile Send private message AIM Address
cnodnarb
Professional Member
Professional Member


Joined: 11 Sep 2002
Posts: 762
Location: Rockeledge, GA

PostPosted: Sun Mar 24, 2019 1:01 am    Post subject: Reply with quote

So, I was writing a presentation framework example regarding the richedit control this morning, and all was going well, except my open and save functions didn't operate how I expected....

10 hours later.

Windows Forms
Code:
$RichEdit.LoadFile($fileOpen)


Presentation Framework
Code:
          $RichEdit.SelectAll()
                $Content = get-content $fileOpen
$ascii = (new-Object System.Text.ASCIIEncoding).getbytes($Content)
$stream = new-Object System.IO.MemoryStream($ascii,$false)
$RichEdit.Selection.Load($stream, [Windows.DataFormats]::Rtf)
$stream.Close()


Windows Forms
Code:
 $RichEdit.SaveFile($saveFile)


Presentation Framework
Code:
                $RichEdit.SelectAll()
   $as = New-Object IO.FileStream $saveFile ,'Create'
               $a = $RichEdit.Selection.Save($as,[Windows.DataFormats]::Rtf)
$as.Close()


To say there might be challenges might be an understatement. I'm happy to support loading the form, but man WPF is a strange beast. I look forward to continuing to avoid it.
Back to top
View user's profile Send private message AIM Address
cnodnarb
Professional Member
Professional Member


Joined: 11 Sep 2002
Posts: 762
Location: Rockeledge, GA

PostPosted: Sun Mar 24, 2019 2:50 pm    Post subject: Reply with quote

New day, new perspective!

Yes, I'll be comitting a version of DialogShell that supports WPF despite all its pitfalls!

Be aware, WPF is a beast of a framework, and if you're serious about it, you need Visual Studio and Blend.

A great place to get started is https://github.com/Microsoft/WPF-Samples
Even if you don't want to use C#, just to leverage DialogShell you need to review this content in Visual Studio to have the tools needed to be effective.

I would not suggest to anyone that DialogShell should be the end all be all of WPF for them. Please do not try to learn WPF through DialogShell. It's the sort of thing that you need to know, then you can be happy to use it within DilaogShell, having also learned DialogScript, Powershell and C#.

Commit that supports WPF coming within an hour or so.

Thanks,
Brandon
Back to top
View user's profile Send private message AIM Address
cnodnarb
Professional Member
Professional Member


Joined: 11 Sep 2002
Posts: 762
Location: Rockeledge, GA

PostPosted: Sun Mar 24, 2019 3:23 pm    Post subject: Reply with quote

cnodnarb wrote:
Please do not try to learn WPF through DialogShell.


Sort of advice I promptly ignored. Suddenly I'm either old, or a hypocrite.
Back to top
View user's profile Send private message AIM Address
cnodnarb
Professional Member
Professional Member


Joined: 11 Sep 2002
Posts: 762
Location: Rockeledge, GA

PostPosted: Sun Mar 24, 2019 7:51 pm    Post subject: Reply with quote

Just figured out how to treat a WPF form as a standard dialog, adding / removing contols etc.

We should be able to easily create DialogShell functions to help us manage presentation windows, I will probably even have a 'dialog create presentation' variant where we can handle WPF according to DialogShell code standards.

I'm not really saying this is a good thing exactly, the nature of WPF is to treat dialog windows more akin to webpages ~ and by parsing out the functionality some 'magic' could be lost.

WPF is cool. Using it through the DialogShell 'presentation' function is equally cool. The DialogShell parsing method once created will be super easy, but unless you at least do a basline presentation I'm not going to understand why the project didn't just use Windows Forms.
Back to top
View user's profile Send private message AIM Address
cnodnarb
Professional Member
Professional Member


Joined: 11 Sep 2002
Posts: 762
Location: Rockeledge, GA

PostPosted: Sun Mar 24, 2019 10:53 pm    Post subject: Reply with quote

Back to top
View user's profile Send private message AIM Address
PGWARE
Web Host


Joined: 29 Dec 2001
Posts: 1562

PostPosted: Mon Mar 25, 2019 3:48 am    Post subject: Reply with quote

This is pretty amazing work. All I do at work most days is WPF, c#, reflection. So for you to add WPF is a huge task. The animations, storyboard is part of the story of WPF and holds some of its power. The power to put any controls within any controls and build user controls is one of the most amazing things about WPF.

You couldn't get me to use winforms ever again after using WPF for the last several years.

Love the work you're doing here, its a huge effort!!
Back to top
View user's profile Send private message
cnodnarb
Professional Member
Professional Member


Joined: 11 Sep 2002
Posts: 762
Location: Rockeledge, GA

PostPosted: Wed Mar 27, 2019 3:44 am    Post subject: Reply with quote

Thank you so much!

I'm about 90% done converting a very useful example from Microsoft (MIT License) into DialogShell called XMLPAD Express

It should be very useful in creating WPF windows and pages, and is itself a fine example of what can be done!





This does rely on DialogShell 0.2.2.7 (+) which should be published either tonight or tomorrow.
Back to top
View user's profile Send private message AIM Address
cnodnarb
Professional Member
Professional Member


Joined: 11 Sep 2002
Posts: 762
Location: Rockeledge, GA

PostPosted: Sun Mar 31, 2019 5:15 pm    Post subject: Reply with quote

This week I attempted (and succeeded) at solving a little proplem with PowerShell Core (and the upcoming DialogShell Core project) which is: they don't feel PowerShell Core should be used for GUI.

So I had to abandon WPF and Winforms both to begin, which sort of left me with one option: web interfaces.

So I started studying up, and it felt like the most fluid thing to do is create a local server on the client, then launch a client that would connect, and perform interactions that way. Convoluted, but it should work.

So that's what I did, bare in mind all I want is a desktop GUI. I started testing, the client could read the local registry, write to local databases, open inifiles, even execute complex scripts that called to winforms and WPF.

I'm thinking, awesome. I now have a way forward for desktop GUI in the upcoming months. Then I realized... wait a second... let's turn off the firewall and requalify the server string... yup. That wasn't my intention. Accidently created a powerful server client relationship.

Fired up the GUI on another computer on the correct port and everything was fluid, connected a couple of more clients, everything was fluid.

Oops.

Thanks for reading, the example is htmlGUI.ds1 and is in the github repository.

*edit
I did modify the timeout from 100 to 1000 when connecting from other clients. 100 was a fail. Fully qualifying the return is not done yet ~ I guess a return listener would be better than a timeout, but I'm not up for coding that yet, should be a moderate challenge for someone.

**edit
Sorta neat seeing it work on an iPad...

***edit
To connect external clients, the ports have to be open, but not as easy to tell, DialogShell must be ran as administrator when launching htmlGUI, and the ipaddress must be specified.
Back to top
View user's profile Send private message AIM Address
Garrett
Moderator Team


Joined: 04 Oct 2001
Posts: 2149
Location: A House

PostPosted: Tue Apr 02, 2019 6:10 pm    Post subject: Reply with quote

Dang Brandon! You've been a busy little bee lately! Smile

Makes me wanna get back into scripting again.

_________________
'What you do not want done to yourself, do not do to others.' - Confucius (550 b.c. to 479 b.c.)
Back to top
View user's profile Send private message
cnodnarb
Professional Member
Professional Member


Joined: 11 Sep 2002
Posts: 762
Location: Rockeledge, GA

PostPosted: Sun Apr 07, 2019 1:44 am    Post subject: Reply with quote

Very Happy

It's still a ton of fun.

Technically I am a hobbyist, but it's sorta by choice, I haven't pursued any development gigs, because I want to code what I want to code, and for long periods of time, sometimes years, I don't want to code at all.

I can't really visualize being a real full time developer. I think it would take the joy out of it.

If you've got an ideal, I say go for it!
Back to top
View user's profile Send private message AIM Address
cnodnarb
Professional Member
Professional Member


Joined: 11 Sep 2002
Posts: 762
Location: Rockeledge, GA

PostPosted: Sun Apr 07, 2019 7:00 pm    Post subject: Reply with quote

This week I've mostly been working on online help documentation ~ when I am forward looking on the project I'm hitting a wall.

What I mean by that is compiling DLL's seems like the next logical step, but that can't be done with powershell without purchasing third party products, and I don't want to continue down that road. I've struggled with being able to convert psm1 files directly to DLL's for a few hours, and I can't get a handhold although I know others have done this in the past.

I struggle with the fact that we already imported ps2exe, which is amazing and free and properly licensed, to go a step further and to release anything licensed that can't move forward in an open source fashion isn't going to happen I don't think. The same can be said of FastColeredTextBox and at times I think, should I roll the project back a step or two... return back to uncompiled powershell.

There's pretty much nothing we can do compiled that we can't do uncompiled other than run in the application space (ignoring powershell ep).

I think I've hit the edge of what my experience will allow me to accomplish with this project, which means I better wrap up my contribution post haste before I stop having fun.

I think I'll submit it soon to some freeware sites, see if the community actually happens and move on to the next big thing, expand my experience further and maybe revisit this later.

I'm pretty sure development will soon stall.

Thanks,
Back to top
View user's profile Send private message AIM Address
PGWARE
Web Host


Joined: 29 Dec 2001
Posts: 1562

PostPosted: Wed Apr 10, 2019 7:20 pm    Post subject: Reply with quote

What do you do for a living Brandon? I always assumed most of us around here worked a full time job coding or coding on the side as part of the job.
Back to top
View user's profile Send private message
cnodnarb
Professional Member
Professional Member


Joined: 11 Sep 2002
Posts: 762
Location: Rockeledge, GA

PostPosted: Wed Apr 10, 2019 11:47 pm    Post subject: Reply with quote

Apparently, I ride airplanes into blizzards to set up equipment at banks.

Desktop Support Very Happy
Back to top
View user's profile Send private message AIM Address
cnodnarb
Professional Member
Professional Member


Joined: 11 Sep 2002
Posts: 762
Location: Rockeledge, GA

PostPosted: Thu Apr 11, 2019 1:13 pm    Post subject: Reply with quote

82 degrees in Evansville IN, weather says bring your sunglasses Cool

Spent 20 minutes wiping snow off of my SUV this morning in St. Paul MN.
Back to top
View user's profile Send private message AIM Address
Display posts from previous:   
Post new topic   Reply to topic    forum.vdsworld.com Forum Index -> Miscellaneous All times are GMT
Goto page Previous  1, 2, 3
Page 3 of 3

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You can attach files in this forum
You can download files in this forum

Twitter@vdsworld       RSS

Powered by phpBB © 2001, 2005 phpBB Group