Friday, May 6, 2011

New Features, Bug Fixes - Version 0.9.2

Hey everyone.  This update is gonna be huge!

Download JHSMovieSheets v0.9.2 

Features added to the templates during this release.
  1. JHS Movie Sheets
    • Tokens Centralized - Put the Thumbgen tokens that the JHSMovieSheets suite uses, into its own file.
    • General Code Optimizations and Documentation - Removed unused functions + code.
    • Studios Image Automation - Shows you the first available studio image in your repository, from your list of studios.
  2. JHS Season Sheets
    • Tokens Centralized - Put the Thumbgen tokens that the JHSMovieSheets suite uses, into its own file.
    • General Code Optimizations and Documentation - Removed unused functions + code.
    • Automatic Episode Name Newline Spacing - If an episode name takes up too much space to fit on a single line, the episode numbering will automatically be adjusted to accommodate the extra line.
    • Dynamic Season / Disc Boxes - Added dynamic resizing capability to Season / Disc statistic boxes.
  3. JHS EpisodeSheets
    • Tokens Centralized - Put the Thumbgen tokens that the JHSMovieSheets suite uses, into its own file.
    • General Code Optimizations and Documentation - Removed unused functions + code. 
    • Dynmaic Season / Episode Boxes - Added dynamic resizing capability to Season / Episode statistic boxes. 
    • Added Studio Graphic and Image Automation -  Shows you the first available studio image in your repository, from your list of studios. 
    • Added A Guest Cast Auto Value - If no value exists for this, "n/a" is automatically displayed.
    • Inconsistent Image Quality Badge Image - Fixed this bug.
  4. Generic
    • Development Run/Compile Time Debug Output Capability - This provides a template developer a hook to get data at run time to view variables as they are processed, without having to short-circuit your method.  (You would be more or less, pausing execution) This is HUGELY helpful when designing the C# methods.

The new-line capability was especially tricky to get working.  The first approach I tried was counting the number of times that a certain character could be typed on a single line without going to a new line.  I then divided that number by 254 (the line width for episode names) to produce the width of the character.  However, I recognized pretty quickly this approach had problems.  Not only do you have up to .0005 rounding error, but also the end of line error since the individual characters won't divide into 254 evenly every time.  For example, if you have a line length of 30 and a character's ACTUAL width is 9, you can put 3 of those characters on a single line without it resetting to the next line. However, the calculated width would be 10 (30 width / 3 total), so you can see how error can be introduced that way.  When I decided that this error was producing too many false positives for new lines, I discovered that I can use Window's system libraries by using an XSL import statement (SO COOL!!) I started using the MeasureString( ) method to get the pixel count.  From the preliminary testing I have done, it looks pretty spot on, with no (or at least, a WHOLE lot less) false positives.

Anyways, it was fun creating this and I hope you guys have as much fun using it as I did making it.

Jim

No comments:

Post a Comment