I’ve taken the application that I last mentioned here and I’ve been working on it a little more. I’m not quite where I want to be just yet but I thought I’d walk through it a little and share the code.
The application runs up like this;
and it immediately tries to connect to the Local Live Operating Environment ( it depends on a Local Live Operating Environment ( LOE ) and will fail if you don’t have one ).
It pulls the user id from that Local LOE and offers a chance to log in but you can skip it if you like as it’s only needed for Contacts which have to come from the Cloud LOE as the Live Framework doesn’t make them available from the Local LOE yet.
Either way, it then shows something like this;
one that UI is present I can drag and drop single photos or multiple photos from the desktop to the UI as in;
It’s not possible to see the drop location on the screen capture above but it’s over the window on the left where I’m about to drop the 3 selected image files. On the right is a Virtual PC where I have a Windows XP machine running the same client using the same Live Id.
So, if I drop the 3 images I should get a new photo album;
and I captured the screenshot after the data had sync’d across to the client running on Windows XP.
Now, I can rename the photo album by just clicking on the label;
although ( unfortunately ) that change does not seem to get sync’d across to the other machine at this point – I’m investigating MeshObject.ChangeNotificationReceived for this and I believe that it doesn’t work in the current preview bits so I’m missing a change notification somewhere here.
I can also add new photos to that album by dragging and dropping;
again – the screen capture doesn’t quite capture that I’m dragging the car photo onto the Critters album. If I drop it and then double click on the album I can see ( on both the VPC and my own PC – notice the VPC has the wrong album name 😦 );
and then I can go and rename the photos on either of these machines ( which works ok ) and/or drag new pictures into the album on this display as well.
and I can select any number of images and hit the delete key and that’ll replicate in both places;
I can then navigate back up to the albums view;
where I can delete albums in the same way if I want to or I can drag more photos to create another album;
and then rename that as a “Cars” album;
Now if I login to MESH locally as one account and on my Virtual PC as another account as in;
and then re-run the application and either log-in to the Cloud LOE when it first asks me or Click on the Contacts tab which will ask the same question ( because it needs the Cloud LOE as previously explained );
then it asynchronously goes to get my Contacts from the Cloud LOE;
and now my “left hand” user has no albums and my right hand user has the 2 albums I made previously ( with the wrong names );
my “left hand” user can go ahead and create a new album;
and then open the contacts tab ( note, I blanked a few of my contacts out here – those black rectangles aren’t actually on the UI 🙂 );
and then drag a contact across to that album;
At that point, the code goes off to invite the contact(s) that have been dropped into this particular MeshObject.
This is a relatively lengthy process and involves an email travelling to the invited contacts and they then open that email, click a link which takes them to the Live Desktop and they either accept/decline the invitation that’s been sent to them. I have some screenshots of this process here.
It’d be nice if there was some way for this invitation process to be managed without having to leave a rich client environment. Going via a route of [rich client]->[email]->[browser]->[rich client] feels like too lengthy a process to me but it’s the only way in which this can be done today.
Once the receiving user ( which for me, is the “right hand side” of my screen running in a VPC ) has accepted the invitation then their UI should update with a new photo album;
and that album has a little “Messenger” icon to indicate that it’s someone else’s album and so you can’t change its title, add photographs to it or invite your own Contacts to share it but you can browse it.
Note – that “read only” nature is not a restriction of the Live Framework, I just decided arbitrarily that you’d not really want someone else messing around with your photo albums that you’d shared with them.
The Contacts UI tries to reflect the current selected album in that it hides Contacts that are already members of that album as in;
but it doesn’t do that right now without a re-start of the app following a successful invite 😦 and if you do a multi-select it’ll display UI to say it can’t handle multi-select 🙂
Unusually for me, this code comes with a license.
That’s because I’ve picked up a couple of themes for WPF controls that I got from CodePlex and those themes originated in Silverlight so they also make use of the Visual State Manager and so that meant bringing in the WPF Toolkit from CodePlex as well.
After all that – here’s the current code for download if anyone wants to have a play around with it.