PDF Lite Viewer

I have decided to release the PDF Lite Viewer app that I built initially for my own personal use, but others may find it useful.

Its a keyboard driven PDF viewer that allows me to read PDF Books on my GPD Pocket 2 computer, rotated, like a book, and using the arrow keys to page through it.

Trying to emulate the traditional eBook experience, but as none of the eReaders seem to have decent PDF support, I thought I would see if this works. Check out the video below, and you can download it from its own page.

It can be downloaded here.

How it was built

This application is actually built using the Windows Presentation Framework for the main application in C#, however, it actually uses the Windows 10 API’s to work with the PDF files as it has suitable methods built in. It reads the PDF, and renders each page to a bitmap and is then displayed on screen.

Standard Keyboard events are used to trap the keys.

The main window itself is simply a canvas to which the bitmap versions of the PDF files are displayed.

Its a fairly simply application, but I am pleased with the result.

CRM Utilities for Visual Studio – Generating Entity Classes

Most CRM Developers either use, or have at least heard of CrmSvcUtil for generating early bound classes for developing code and using the resulting classes to manipulate CRM data.  I personally do not like working with early bound entities as the resulting class files are huge, and I personally prefer working with the standard Entity Framework for creating and updating entities, and for Linq queries.

Often, I use some helper class libraries that I can use to represent the custom entity names and attributes, so that they can be referenced in code and provide a degree of separation from the actual Schema names and to make code easier to write, and support Intelli-sense.

Something like the code sample below:


public static class Contact
{
    public static const string EntityName = "contact";
    public static const string Name = "fullname";
}

This would then allow you to do the following:

public void createContact()
{
    Entity contact = new Entity(Contact.EntityName);
    contact[Contact.Name] = "Joe Blogs";
    service.Create(contact);
}

I was offered a suggestion by a fellow developer that wouldn’t it be good if my CRM Utilities for Visual Studio allowed you to generate this kind of Class file automatically.  Well, I thought it was a brilliant idea, and so thanks to the wonderful gentleman  of XRTSoft, here it is.

Its split into two options, one to generate classes for your Custom Entities, and one to do the Standard CRM entities.

The resulting file will look something like this:

Notice that for each Entity, it will add the Logical Name, Primary ID Attribute, and the Primary Name Attribute as standard, and then all of the attributes as well.  It will also add sub classes for any Option Sets to allow you to reference specific Option Set Values without having to look them up in CRM.

 

Download
Please note this feature is only available in the Visual Studio 2017 version. This version may still install on VS2015, although I have not personally tested it.