Mohammad M. Ramezanpour It's all about my life...

Windows Mobile Arabic/Persian language support

7. January 2009 00:49 by Mohammad Mahdi Ramezanpour in SmartDevices

Arabic/Persian language support on Windows Mobile using Arabizer - Photo taken from http://i4.tinypic.com/8511r1w.jpg Recently, I developed a SmartDevice application using .NET Compact Framework 3.5 Windows Mobile 5 SDK. Customer wanted me to develop the application with Persian language support so I started normally and used Persian because I didn’t feel anything bad. After I wanted to deploy it for tests, I realized that Windows Mobile 5 doesn’t support Arabic/Persian language by default! I also understood that Windows Mobile 5 does not support some specific SQL collations such as “SQL_Latin1_General_CP1256_CS_AS” because it hasn’t that kind of encoding until you install a specific encoder for it.

After some researches, I found a Pocket PC software name Arabizer which enables Windows Mobile to support Arabic language and it’s free to try. But as you may know, there are some specific characters in Persian language that Arabic doesn’t have.

I went through forums and found out that there is a company which had been developed an application based on Arabizer which adds Persian characters to it. This application is monetary but you will need it when want to develop a Persian application in Windows Mobile environment.

Because it was very difficult for me to find such an application, I decided to upload it here so you can download and have a free trial and I’m sure you’ll be definitely buying it if you want to develop an Arabic/Persian language SmartDevice application. Click here to download Arabizer.

With IMAGiNET Pocket Arabizer, you can Enter, Edit, and View Arabic Data inside Microsoft Applications, not only using an Arabic Soft Keyboard, but also using Arabic Handwriting character Recognition. You also get Prayer Times, Hijri Calendar and Arabic English bidirectional dictionary.

You can also download iPhone version if you want Arabic/Persian language support on iPhone.

Note: For those who want to add Persian language support to Arabizer I have to say that the name of that company is Part Asia.

What I’m going to do in 2009

4. January 2009 16:00 by Mohammad Mahdi Ramezanpour in Other

Scheduling - Photo taken from http://www.viev.com/images/vievstock/scheduling_solutions_small_355048.jpg Planning is one of the best ways in order to keep organize, in my opinion. It’s good to have a plan every now and then. I myself fill out my Outlook calendar every week and also have an annual calendar which I’m using in order to schedule for a year. Today I’m going to publish some of my schedules for the year 2009 to public.

Move my blogs to my website

As you may know, I have some blogs such as Yahoo 360 (which I’m using to publish my non-technical blogs). I decided to move all of them to my website.

Last year, I launched http://ramezanpour.net as my website after I lost my previous (http://ramezanpour.net) in order to publish my technical articles and separated my personal and technical blogs. After a while, I realized that it’s possible to combine them.

I used .NETBlogEngine for my website and it satisfied me and now I think it can host even my personal blogs.

BlogEngine.NET is an open source .NET blogging project that was born out of desire for a better blog platform. A blog platform with less complexity, easy customization, and one that takes advantage of the latest .NET features.

BlogEngine.NET was designed using the current .NET framework and focused on simplicity, ease of extendibility, and innovative features. With BlogEngine.NET, we hope to create the natural blog of choice for all .NET developers worldwide.

Complete my self-studies

As I scheduled, I have to complete about 7 books until 2010. It’s not too easy for me because I spend about 60 hours of my life at work every week. According to my calculations, I must read up to 40 pages everyday in order to achieve my goal in studying.

The only thing I can do to achieve this is to plan in a right way.

The books have been bought and ready to read and I’ll start my reading from February 3rd (Right after my birthday).

Certifications

The year 2010 is a deadline for me so I have to take my IELTES till 2010. Also one of my IT certifications is going to expire in May, 2009 and I have to renew then whereas I must take some new certifications.

Reduce playing video games

It was about 3 years ago that I started playing games in a professional team. We were playing Counter-Strike in tournaments and more. Since I quitted playing Counter-Strike, I used to play some games in my free time. Every year I’m trying to reduce playing games and this year is something like before and I’m trying to develop some applications for free when I’m free. Maybe I want to start some open source applications and publish them in websites such as CodePlex, SourceForge, etc.

There are a lot to say about my planning for this year but I think, these were the most important.

Things you may need to know, when want to start working on Windows Services

As you may know, recently, I’ve done a project based on Windows Mobile for a hotel and because of their restaurants orders.

As one of their requests, they wanted me to use their previous ordering system in order to print bills. Their previous developer had been developed a parametric exe file that takes 4 parameters and then prints the bill out. So I needed to develop something on their servers in order to execute that old application. I decided to write a Windows Service that takes pocket pc requests via a wireless network connection and then print the bill out.

Working with Windows Service is not very often so you may not be able to find good articles for it but in this post I want to write about Windows Services.

Windows Service classes are very similar to normal classes except that you must implement them from the ServiceBase class. ServiceBase class is available in System.ServiceProcess namespace.

Keep in mind that you must import the System.ServiceProcess name space in your application because you will need this when want to work with Windows Services.

When you implemented your class from ServiceBase class, Visual Studio adds two methods to your class named “OnStart” and “OnStop”.

OnStart method:

This method allows you to write code you want to be executed when starting the service. You will need this method the most!

The OnStart method has an input parameter (A string array) which takes parameters that you may want to send to your service.

OnStop method:

This method will be executed when you’re stopping your service. Imagine that you’ve created a Thread in order to do something but you need to kill it when you stopped the service. In order to do such a thing, you have to make use of OnStop method.

Now what?

Adding an installer - Photo taken by myself. After writing your codes, it’s time to use your service. To make your service usable, you must add an installer to your application. Adding installer is easy when working with Microsoft Visual Studio; just right-click on your service designer and select “Add Installer” like the following picture.

When adding an installer, Visual Studio adds a class named “ProjectInstaller” and then adds two controls to your installer class named “ServiceInstaller” and “ServiceProcessInstaller”. By selecting each of those controls you can set some properties such as ServiceName, Description, DisplayName, etc.

Note: While setting the properties, don’t forget to verify the ServiceName property that must set to your service class.

You can also add your own codes to the ProjectInstaller class depend on your service.

How to install a Windows Service?

After building the service, you can access its files by going to the debug or release folder. You got two ways (Correct me if I’m wrong) to install a Windows Service.

· Programmatically.

· Manually.

Install or uninstall a Windows Service using Command Prompt - Photo taken by myself In this post, I want to install our service manually because it’s more common.

In order to install a Windows Service, you need to use Microsoft Visual Studio Command Prompt.

In the Command Prompt, we have an “installutil.exe” file that enables you to install and uninstall your Windows Services. Here is the syntax:

For install: installutils.exe [Your file path].
For uninstall: installutil.exe /u [Your file path].