Implementing Progress Bar in Magellan .. Is it possible ?

36 views
Skip to first unread message

Francisco Rodriguez

unread,
Feb 26, 2013, 6:16:20 AM2/26/13
to magellan...@googlegroups.com
Hi, friends.
How are you ?
For business reasons I'm developing in WPF and .. I'm new to WPF :)
Searching for a good MVVM framework, I found Magellan.
I implemented it in my project and I think it's very good.
I can even say that I've found myself putting pieces of code in the places they belong, naturally (I hope) ..
Magellan gives you that understanding ..
Thanks Magellan team.
Are you still there ?
It's a little strange because I could expect more hype on this framework but .. Nobody knows ..
Anyway ..
I have some trouble figuring how to implement some tasks ..
One of them is adding a Progress Bar to a process ..
First at all,
I'm doing that process (downloading json strings, inserting data in the db using Entity Framework, downloading files, etc.) in the ViewModel in a very big function, is that OK ?
Should be doing at the Controller ?
I'm using WebClient.downloadfile should I use WebClient.downloadfileasync so the Progress Bar could work ?
I need setting the Mouse to Wait State (hourglass) but I had to set the function to [STAThread], is that OK for Magellan ? I'd tried to implement Paul Stovell's advice for this matter (Background threading, http://www.codeproject.com/Articles/107919/Magellan-An-MVC-powered-Navigation-Framework-for-W) but didn't work. I think I'm doing something wrong. 
After that, I start doing some tasks and I'd like that the Progress Bar could be showing these different tasks (probably updating a label) and then showing the advance indicator for each task.
Can I do that in Magellan ?
How ?
I've never developed a Progress Bar, I'm new to WPF and to Magellan, please, be kind ..
I know I'm probably asking something very easy (or even stupid), but I swear the last days I've been doing research and I can't find a way of doing it in Magellan ..
I found something with Prism and interactions but I don't understand how to integrate it in Magellan (and probably it's more confusing because I could be implementing code in the places they do not belong) ..
I really appreciate your help.
Regards,

Caleb Vear

unread,
Feb 27, 2013, 10:48:12 PM2/27/13
to magellan...@googlegroups.com
Hi Francisco,

First off, Magellan is not being actively maintained anymore.  It is however still quite a usable framework.

For what you are wanting to do I would probably:
  • Make the controller do the work.
  • Make the controller execute asynchronously, the approach in the article you linked should work for that.
  • Define an INavigationProgressReporter and implementation (or just implementation if you aren't unit testing).  The implementation should have a way of marshalling updates to the UI thread and your root view can bind to it.
  • Give the controller an instance of INavigationProgressReporter (in the constructor) and have your action call its methods.
Cheers,

Caleb

--
You received this message because you are subscribed to the Google Groups "magellan-friends" group.
To unsubscribe from this group and stop receiving emails from it, send an email to magellan-frien...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.
 
 

Reply all
Reply to author
Forward
0 new messages