Sunday, May 13, 2012

Personalplaner sources are online

I uploaded all sources of the new Personalplaner to personalplaner.codeplex.com.

For development I use a different reopsitory. When I started on the project I didn't expect to ever complete it. So I chose to host it on unfuddle.com.
When I decided to host the setup on codeplex as shareware I also came to the decision to upload the code. Now whenever I create a new stable version I upload the code as well.

I guess it doesn't allways end as expected. Originaly I didn't expect to ever finish the project. And by now I created 14 stable releases that are finished, useable, free and open source :-)

Have fun!

Thursday, May 10, 2012

Personalplaner v2 is stable


The stable version of the Personalplaner is 2.0.1.12131.

http://personalplaner.codeplex.com/

For this version the Personalplaner was completely redesigned.
A complete new Look was created. This was accomplished by porting the Personalplaner to WPF.
The Application was split into different layers.

  1. The Visual layer 
  2. The Logic layer
  3. The Application Data layer
  4. The Storage Logic layer
  5. The Data Storage
The Data Storage was not touched much. This is still a MSSQL Server.

The Storage Logic layer still uses Stored Procedures. These were modified or recreated.

The Application Data layer is the connection to the Storage. This was redesigned to a kind of service provider so that it could easily be replaced/ported to eg. WebServices.

The Logic layer was completely recreated. This layer now has an MVVM implementation uses a ServiceLocator pattern. With this redesign the Visual Layer could easily be replaced.

The Visual Layer was a complete redesign. 
  • There is only one main view in the window.
  • The main view can be displayed in a dark or a gray style
  • Secondary views are allways in a white style
  • When a secondary view is created, it is displayed insted of the main view. 
  • All secondary views are designed to look alike. 
  • The same user handling was applied to all views. 
  • Ending a view allways leads back to the previous view.
  • A view can be ended with a cancel button, a ok button or a 'back' arrow button
  • Windows/Dialogs are seldomely used
  • The content of the main view can be extended with plugins
  • The main menu is redesigned and split into tabs that can be selected
  • Descriptions are displayed in most functions










Thursday, April 12, 2012

Personalplaner v2

Soon I will be able to create the final and stable release of the Personalplaner v2.

I did a lot of development for the version 2.
I ported the GUI to the WPF platform. With this step I was able to completely redesign the whole layout of the application. I could template all controls and easily create new Styles for the complete application.




In addition the application was redesigned and split into different layers. All layers are strictly separated into their parts.

  1. The Gui layer
  2. The Logic and Busines layer
  3. The Data transport layer
  4. The Data/Storage layer
In addition I implemented a MVVM Framework (or something similar to a Framework...) to strengthen the separation betwean the Gui and the Logic/Business layers.


Some additional features since the first beta releas:

  • Added description Texts to most relevant Functions
  • Summs of the times of the Dienste are displayed in the Dienstestamm
  • Every Plan can be closed
  • Times can be set as decimals
  • Menu Delete and Finalize were moved to Extras
  • The layout for the displayed names can be chosen
  • The name of the database can be displayed in the main window
  • The pensum can optionaly be printed as well
  • Only Personalplaner Databases can be selected in the Logindialog and the Databasewizard
  • Creating the users in the database could cause errors on case sensitive databases
  • Most StoredProcedures were checked
At the moment the application is still only avaliable in german. But I have prepared everything to create a english version as well. I just need to do the translations and recheck everything to make shure I didn't miss anything. This will be done in a future release because at the moment I am primarily working to get the german version stable.

Thursday, September 22, 2011

Extending the Personalplaner

Every application should be extensible!
That's why I added the ability to create plugins for the Personalplaner. Well actually I did it mainly just for the fun of it...

To achieve this I used MEF. MEF started as a Codeplex project but now is fully integrated in the .NET Framework in the Assembly System.ComponentModel.Composition.

With the help of MEF it is realy easy to create and use plugins resp. export and import objects.
In my case I only had to create an Interface and implement this in the plugin class and add the class attribute [Export(typeof(IPlugin))] (IPlugin is the interface I created...)

[Export(typeof(IPlugin))]
public partial class PlanAnalysisPlugin : BaseControl, IPlugin
{
    ...
}


In the class that imports the plugins, I only needed to create a CompositionContainer that creates/imports the objects and a container that will containe the imported objects.

CompositionContainer _container;

//public IEnumerable<Lazy<IPlugin, IPluginMetadata>> Plugins
/// <summary>
/// Enumeration containing all loaded pluginsEnumeration containing all loaded plugins
/// </summary>
[ImportMany]
public IEnumerable<IPlugin> Plugins
{
    get;
    set;
}

private bool Compose()
{
    if (!Directory.Exists("plugins"))
        return false;

    var catalog = new AggregateCatalog();
    catalog.Catalogs.Add(new DirectoryCatalog("plugins"));

    _container = new CompositionContainer(catalog);

    try
    {
        this._container.ComposeParts(this);
    }
    catch (Exception)
    {
        return false;
    }

    return true;
}

In my case I decided to keep the plugins in the subfolder named plugins.


If the folder is empty then the application should look like this. On the left side there are only the options for Plan and About.


If I put my plugin into the folder plugins, the application should load and insert it in between Plan and About. In this case I created a plugin that shows some reports and displays some additional inforamation to the plans.


I know that I will most probably be the only person that will ever create a plugin or an extension for the Personalplaner. But with this I can easily extend the Personalplaner with new features without having to create a new version and a setup every time.

Monday, September 12, 2011

Animated loading screen

When loading big data collections or switching between views that contain a lot of data, there is often a big timespan where the user is not sure if the application has crashed or if it is doing something.
So I wanted to draw a semi transparent overlaying layer over the window and create an animation that indicates that the application is doing some work.

Sounds easy... In reality it's something that's almost impossible!

In wpf the UI thread is not the same as the main application thread. But still they are linked to each other so that the UI thread gets blocked when the main thread is working hard. With this restriction there can't be any semi transparent layer and especialy no animation that gets shown or executed while the main thread is working.

When I was about to give up I stumbled upon a grea thread by Dwayne Need describing how single elements in wpf can be run in a separate thread. This means some complicated threading and trying to get the data binding and the resizing of the controls syncronized between the different threads, but in the end I managed to get it all worked out.

Now I am able to display an animation while the main tread is doing some hard work trying to accomplish whatever tasks I let it do.



Wednesday, September 7, 2011

Print preview in Personalplaner 2.0

I implemented the new print dialog and the print preview for the Personalplaner.


I was not shure if I should create my own new implementation of a print dialog or use the default dialog, even though it doesn't suit my needs very well.
And how should I create the preview of the printout?

I decided to create my own version of a print dialog and implement the preview both in one...
And I like it!


On the left side the user can choos which teams and which columns of that should be printed and which printer to use.
The user has the possibility to preview all pages with the pageing at the bottom left of the preview image.

 For previewing the printout I developed a pageviewer, with paging ability and the preview completely new and all from scratch. If the window is smaller than the printout/pagesize, the pageviewer automaticaly scales the pages down so that the whole page is allways visible.

 I'm realy pleased with the result I got.

Wednesday, August 31, 2011

New Personalplaner Icon

I'm not too happy with the Icon of the Personalplaner. It doesn't show any meaning that can be associated with the personalplaner and it doesn't realy look good.
So I made some designs for a new Icon for the Personalplaner.
I'm not really a good graphics designer so it took a while for me to think of some ideas and to be able to draw them.

For the drawing I used VecDraw and paint.net. paint.net is great and ideal for me because ist not too big, easy to use and most of all: it's for free.
This was also another good opurtunity for me to use and test VecDraw and see if it is really useable.


I want the Icon to show what the application is about or at least show a meaning that can be associated with it.

This was the first idea I had. It shows a P instead of the G that is contained in the original icon. But in the end this is not really an option because it doesn't look good at all...

1.

I thought something round would be nice but I discarded the idea right when I was finished:

2.

From then on it started getting better. I made a PP instead of of only just one P. In some I tried to add a layout displaying a plan.

I think one of the following will be the new icon.

3.

4.

5.

6.

7.



I will still try out some more things like adding a dropshadow to the letters. But basicaly I think it will be with one of the last designs.
I especialy like nr. 3, 4, 6 and 7. I am considering if it maybe should be a combination of the last 2 depending on the size of the image. You can't read much when the image is only 16x16 px...

Feel free to leave a comment adn tell me which one you favour.



Update:

I added a dropshadow and a little alpha blend to the letters because the red was too bright

4.1

4.2