Sunday, February 25, 2018

Tracker - Printing is still hard!

But I've got a start. Using some UWP Community tools to help with the print. What really needs to happen is a more generic way (there is a pretty good MVVM version that almost works, and might if I was doing the whole MVVM thing. But I am not).

I do have it printing the list control (the list of cargos themselves), but what really needs to happen is I need to create a nice looking RTF (Rich Text Format) and go from there. I now know how to get the print to work using the OS native print control, so there is a preview and all that. Now I just need to make a good-looking document and print from there.

And this is slow going not because it is hard (well, that too), but because I have a severe lack of time due to classes. Who knew that getting a 2nd masters would take so much time? Rhetorical question - I figured I'd give up any personal life the next 2 years.  I am adapting (and so far have a 49.5 / 50 so must be doing something right!). Any free time though goes to family. They all happen to be away today and I've caught up on classes. So here we are!

Wish I had a picture or something. Heck - I'll put in the ugly print I've got now.  I do plan on making this into a better document, and I am really thinking adding graphics - i.e., allow the user to upload stamps and stuff.  Down the road assuming I keep going down the road...

Monday, February 12, 2018

Tracker - printing is hard

Sadly, printing in a UWP app is a lot more difficult than it should be.  I've tried a few things, but in the end, I may end creating an HTML doc internally, and then saving that to a PDF.  I've not really had enough time to go through all the options, and there is a printer helper that in theory allows you to print a UI component, such as a grid.  But the component can't be attached to anything, and there is no simple way to clone a UI element.  I've got some code from Code Project that in theory allows for a deep clone of an element, but it is having issues I need to work through.

I want to get a generic print thing going as more than just the cargo manifest will need to be printed.

And it was a leg day on Monday - never a great way to start off the week!

Monday, February 05, 2018

Tracker - world images, logs now pivot

Switched the world control around a bit, so now the world image (primary image), notes, log and general images are all in a pivot control.  Still need to set the 1st image when the images get loaded - there's always a blank image until you scroll, then that image goes away.

The idea for the world log is to have a date-based log for the worlds just as we do for the ships. I don't think I've actually implemented that though.

Friday, February 02, 2018

Adding images to the worlds

I've added the image carousel to the world control.  Found a few things:
  1. I need to either set the height in that control or do something - the image will come out at the size they are, and that means it rolls off the screen.  Maybe a pivot to have info & image?
  2. it seems to lave a blank spot to being with, but once you scroll it is no longer there.  I think I need to set the first image as selected.
  3. Drag & dropping images would be nice
  4. a way to delete images would be nice
  5. the world image can cover data - pivot to the rescue?
But it did work! And even more fun - it's a control using a control!