0 Comments

So I just did a presentation on SignalR for the Chicago .NET User Group

If you want to check out the slide they are on my skydrive at http://sdrv.ms/1bLoO6R

The code i used in my demos is up on github at https://github.com/AndyConlisk/SignalR-LetsTalkPresentation

If you are in the Chicago area join the meet up chicagodev.net

If you attended, thank you for coming up. If you didn’t come to our next one!

0 Comments

While building my apps for WP7 that users will pay for, I like to create a trial so the users can try out my app before they buy it. But when you are debugging your app there is no Trial simulation. So Looking on the web I found one.

Here is what i do to simulate trial mode in my Windows Phone 7 apps.

First at the top of your App.xaml.cs file add this

*EDIT*
I forgot to put this in here at the top. You need it to access the licence information.

 

//Used to determine if app is running under a trail license.

private static LicenseInformation _licenseInfo = new LicenseInformation();

and to use that you will need to add in the folling using statment.

 

using Microsoft.Phone.Marketplace;

*END EDIT*

 

private static bool _isTrial = true;

public bool IsTrial

{

get

{

return _isTrial;

}

}

I usually add that in right under my RootFrame property.

I then create a method in my App.xaml.cs

private void CheckLicense()

{

#if DEBUG

if (MessageBox.Show("This is for debugging purposes. This allows trial mode to be set. Press 'OK' to simulate trial mode. Press 'Cancel' to run the application in normal mode.", "Debug Trial",

MessageBoxButton.OKCancel) == MessageBoxResult.OK)

{

_isTrial = true;

}

else

{

_isTrial = false;

}

#else

_isTrial = _licenseInfo.IsTrial();

#endif

}

I then put the CheckLicence method into my Application_Launching and Application_Activated methods in my App.xaml.cs file to check if the application is bought or a trial version.

Then in your code you set up what will happen in your trial version and all you have to is check the IsTrial if true, it is a trail version. If false it is a full/paid version.

 

if ((Application.Current as App).IsTrial)

{

//Do trial things in here

}

I hope this helps you out creating your WP7 app!

0 Comments

Now I will explain a little bit about MVVM. MVVM is an architectural pattern. It stands for Model View ViewModel. Wikipedia has a decent explanation about it (http://en.wikipedia.org/wiki/Model_View_ViewModel)

The way I view MVVM is like this. It separates the Data(Model), from the presentation(View) and the ViewModel handles updating the Data when something changes on the View. It is useful, but I also feel if you are doing simple little apps you don’t need to use MVVM as it just takes up to much time and resources. But it is also a good thing to know and understand.

If you created have checked out my previous posts and followed along, you should have noticed folders in the project that separated the Model, View and ViewModel out. If you wanted you could also check out the MVVM example from here (http://msdn.microsoft.com/en-us/library/ff431744(v=VS.92).aspx#BKMK_Common) also check out this short video if you want. http://msdn.microsoft.com/en-us/Video/gg241309

So if you start to notice in those examples, The view uses the ViewModel to get and set data to display and change, and the ViewModel updates the Model when it is saved. They do this as seperation of data and presentation. Separation helps with cleaner looking code and also has the ability to have a designer working on the View while a developer works on the data and that. But like I mentioned before if you are building a simple app, doing it in MVVM can cause a lot of overhead that isn’t really needed, but I still encourage you to try building an app with the MVVM pattern to get use to it.

I am still learning MVVM and have only had so much experience with it, but if you plan on really getting into WP7 application development, I suggest you read up on MVVM and try to build an app using the MVVM pattern. Any suggestions for me about MVVM or any questions please let me know.

0 Comments

So lets get started on a little project. I am going to start writing about how I came up with an idea for a Windows Phone 7 app, started a little simple design, programmed it, tested it, and then released it to the marketplace. My app is currently going though the approval process so I hope to have it published soon.

Before you even start, you need to have the right tools. The first and most important tool you will need is the Windows Phone 7 SDK that comes with Visual Studio for Windows Phone which you can download at the apphub (http://create.msdn.com). Download and install that then the next thing I suggest you download is the Silverlight for Windows Phone 7 toolkit. (http://silverlight.codeplex.com/)

Download and install those, While doing that some suggested reading is on the apphub like http://create.msdn.com/en-US/education/basics/developer_resources and you can view some sample code at http://msdn.microsoft.com/en-us/library/ff431744.aspx

If you want to get started developing Windows Phone 7 app, or even just getting started into some C# programming, download the WP7 SDK and start reading.

0 Comments

I think this subject line is very fitting for this first entry of my blog. When every I hear Hello World! I think of the very first program I created in C++. That was quite a few years ago in highschool, but that is what started me in the wonderful world of being a programmer.

This blog will be mostly about my programming experiences, about how I solved problems, how I went about programming something, and other wonderful random stuff mostly dealing with programming.

I will soon be posting a series about how I went about creating a small simple little Windows Phone 7 game, and how I am going to continue adding to it to make it better. I plan on making it about the whole process (planning, designing, coding, testing, submitting, and updating)

Thank you for reading and I hope my writting will help you in some way.

-Andrew