Sonntag, 2. Dezember 2012

Windows Phone 8– WorkTime app weekend

Normally this weekend I planned to participate a Duathlon, but because of my current cold I switch the plan and made my own Windows Phone 8 Hackathon weekend (the same as the last one).

Me as designer, programmer and product owner of the nice new app WorkTime. Windows Phone 8 development with all the fun and pains, if you want to implement pattern like MVVM straight forward. Especially this week I fight with a general validation mechanism. I will post some of my approaches to implement a very smart solution at the next days:

Validation code is than looking in the view model constructor like this:

            AddValidationFor(() => CustomerName)
               .When(x => string.IsNullOrEmpty(x._customerName))
               .Show(AppResources.InvalidNotNullOrEmpty);

            AddValidationFor(() => OrderName)
                .When(x => string.IsNullOrEmpty(x._orderName))
                .Show(AppResources.InvalidNotNullOrEmpty);

            AddValidationFor(() => ProjectHoursMax)
              .When(x => x._projectHoursMax<=0)
              .Show(AppResources.InvalidZeroNotAllowed);

            AddValidationFor(() => Start)
            .When(x => x._end <= x._start)
            .Show(AppResources.InvalidStartIsGreaterThanEnd);

Here are some screenshots of the WorkTime app (sorry in German, but English will be also supported. Besides multi language support with sharing Resources among assemblies will be another next post – I need more time :-():

wp_ss_20121202_0016wp_ss_20121202_0007wp_ss_20121202_0008wp_ss_20121202_0009wp_ss_20121202_0010

Keine Kommentare:

Kommentar veröffentlichen