How to Limit the Input of a Textbox of Windows Phone

Some time ago I have written about the keycode glitch. Other than this glitch, sometimes you might need to limit the scope of input to certain set of characters.Changing the inputscope of the keyboard helps alot. But, sometimes you need more specific filters. For example, if you’re expecting an all-numbers input and you use the “TelephoneNumber” keyboard, you’ll still be able to get “.” or other symbols. Another example is if you need to get an email address input which you would prefer to have in small letters.

Anyway, let’s get to the code. The code is simply one line. Lets assume that you have textbox name txtInput. You’ll just have to add the following code in the event handler of “KeyDown” for the txtInput control.

[crayon lang=”vb”]If “0123456789”.IndexOf(e.Key.ToString) = -1 Then e.Handled=True[/crayon]

This line limits the input of the textbox to the numbers 0 to 9. You can change the content between the qoutations into any range of acceptable input characters that you need.

I hope this helps.

App: Saudi Calendar

App Link in WP Store

لقد توقفت عن العمل ببرامج ويندوز فون – هذا التطبيق لم يعد متوفرا

I have stopped developing for Windows Phone – This app is no longer available

التقويم السعودي هو تطبيق لنظام ويندوز فون لعرض التقويم الهجري و القيام بالتحويل بين التواريخ الهجرية و الميلادية. يستخدم هذا التطبيق تقويم أم القرى للتحويل وهو التقويم الرسمي في المملكة العربية السعودية.

خصائص التطبيق

الواجهة المبسطة و المتوفرة باللغة العربية و الإنكليزية
إمكانية عرض تأريخ اليوم الهجري على شاشة القفل (إبتداءا من الإصدار الثاني)
خاصية الأيقونات الحية (لايف تايل) بالأحجام الثلاثة (إبتداءا من الإصدار الثاني)
خاصية عرض التقويمين الهجري و الميلادي بشكل متداخل لسهولة العرض
يوفر خاصية تحويل التواريخ الهجري إلى الميلادي و بالعكس
يوفر خاصية اللايف تايل ليقوم بعرض تأريخ اليوم على سطح المكتب
نطاق التحويل يبدأ من يوم الأول من شهر محرم سنة واحد هجرية ويمتد بشكل غير محدود

إمكانية التغيير اليدوي للتأريخ الهجري بزيادة و نقصان يومين.
و المزيد في الإصدارات القادمة إن شاء الله.

ملاحظة: التطبيق يستخدم تقويم أم القرى للسنوات الهجرية 1350-1500 و خارج هذا النطاق يتبنى التطبيق طريقة التحويل المستخدمة في مركز الدراسات الشرقية في جامعة زيورخ بسويسرا.

إذا كانت لديكم أي ملاحظات أو مقترحات، يرجى كتابتها هنا بشكل تعليق و سأقوم بالرد عليها في أقرب فرصة ممكنة.

Saudi Calendar is a Windows Phone application that displays Hijri calendar and performs Hijri-Gregorian date conversion using Hijrical.org online conversion service. This service uses Um-Alqura calendar for calculation which is the official calendar in Saudi Arabia.

The app has the following features:

  • easy it use interface with Arabic and English interface.
  • Ability to manually shift Hijri date ±2 days
  • support of showing todays hijri date on lockscreen.
  • support of all three sizes of live tiles.
  • Mixed calendar showing Hijri and Gregorian dates.
  • provides any-date Hijri-to-Gregorian and Gregorian to Hijri conversion
  • provides a live tile that is automatically updated to show today’s hijri date simply there on your phone’s desktop.
  • the conversion range starts from Muharram 1st, 1 Hijri and has no limit.
  • more features to come in the future.

Note: The app uses Um-Alqura Calendar for the Hijri years 1350-1500. Out of that range a mathematical conversion method used by the center of oriental studies in Zurich University was adopted.

 

Changlog:

  • v2.1 (July 16th, 2013)
  • Addign the ability to manually shift Hijri dates ±2 days.
  • v2.0 (Mar. 5th, 2013)
  • A completely re-written user interface.
  • The conversions and calendar calculations are done locally now so there is no need for Internet connection.
  • Support for showing today’s hijri date on the lockscreen.
  • Support for all three sizes of live tiles.
  • v1.1 (Jan. 3rd, 2013)
  • minor bug fixes
  • v1.0:  ( Dec 28th, 2012)
  • First Release

 

Privacy policy: By using versions 1 and 1.1 of this app, you are agreeing to the terms of use and privacy policy of Hijrical.org. Starting from version 2 there are no user data being collected whatsoever. All correspondence between app users and the developer are not to be disclosed to anyone else.

App store link:

http://www.windowsphone.com/en-us/store/app/saudi-calendar/9467aa14-9c13-4674-b3cc-8e8804512beb

 

The Agony of Dealing with YallaApps

Before the Dev center registeration was open in Oman, I registered through Microsoft Publishing partner called YallaApps (Paying the same 99$/year). That was about a year ago. I published many apps with them and the process in overall was nothing less than agony. Very slow responses, and most of the time wrong responses an I have to repeat what I need many many times.

Anyway, I felt so happy back in August when I knew that the Dev center is opening in the country I live in. YallaApps informed all their subscribers that they need to register for new accounts in the dev center and pay full and then in November Microsoft would refund your subscriptions. They said if you like to keep the rating and reviews (which are many for my apps) you need to file a request on a specific online form. Which I did very early once they announced it. They also said if you don’t need to keep your ratings and reviews, you can send us a request for deleting the apps from our side and you submit them again with your account.

So, after registering and finishing all their requirments, I waited. And waited some more. I wrote to their blog as a comment and the comment is still waiting moderation for about a month now.

I wrote on their facebook page asking about the migration and no reply for about a week.

I wrote to their support email and I received an auto-reply saying that we received your email, and we’ll respond to you within 48 hours. And for over a week now, nothing.

I received an email three days ago from Microsoft Global Publishing Partner Program saying that a refund will be issued for you dev center subscription and they mentioned nothing about the apps migration. I replied to their email asking about an ETA for the mogration of apps and they replied to me saying that the app migration has already been done. We did not receive a request from Yalla to transfer any apps to you account. No further migration is possible now..!!!

I do not know specifically whose mistake is this, but I am very sure it is not mine and I do not want to pay for the mistakes of Microsoft and/or their partners.

So I looked-up YallaApps and their mother company “Prototype Interactive” in Dubai Media City and I called their phone number many times and all I get is voice mail.

Me and all other people stuck with YallaApps would like Microsoft to take action and protect our rights from a bad Microsoft partner. How can you ask for more devs to come in when the ones you already have are jumping out?

* Update 11-Dec-2012: Someone actually answered my 5th or 6th phone call and I re-explained the issue and they said they will look into it and get bak to me TODAY.

* Update 11-Dec-2012: I received an email from YallaApps asking for details and acknowledging that the migration was finished and my apps we not migrated.

* Update 21-Dec-2012: I received and email from Microsoft (replying to my email on Dec. 10th) saying that there will be a second batch of migrations and they do not guarantee that it will be successful nor they can give a time line.

Number System Converter

I have stopped developing for Windows Phone – This app is no longer available

 

This is a simple app that performs conversion of numbers between different numbering systems; Binary, Octal, Decimal, Hexadecimal, and Binary-Coded Decimal (BCD). Starting from v1.1, the app supports fraction conversion also with accuracy of up to 12 binary digits.
More systems will be supported in the upcoming versions.
If you would like to suggest a feature for the next version or you have found an issue in the app, contact me on info (at) mohammedalani.com
This app supports Windows phone 7.5 and 8.

Winodws Phone store link:

http://www.windowsphone.com/s?appid=6ede0b59-f2dd-4022-bba2-db0ae14c0aa4

Changlog:

* v1.1: (Expected publishing date: Dec. 12th, 2012)

  • added BCD conversion.
  • added fraction conversion.

* v1.0:

  • published on Dec. 5th, 2012

WP7NUMConvert

Earlier this year I published a small library that performs multiple tasks of number system conversion on this post. As some fellow devs were a bit skeptic about the code and demanded to see the source code, I have created an open-source project on Codeplex with the name WP7NUMConvert and included the conversion library in there.

The link to the project is:

http://wp7nc.codeplex.com/

If anyone would like to particpate in the project, be my guest.

 

Book: Guide to Cisco Routers Configuration

  • Provides a guide to the configuration of Cisco routers
  • Presents detailed and easy-to-follow “how-to” instructions
  • For beginners and advanced users alike

This work provides a guide to the configuration of Cisco routers, from tasks for beginners to advanced operations. A collection of detailed “how-to” instructions are presented, which will be of use to all professionals and students who engage with Cisco routers in the field or in the lab. The guide starts with the simple step-by-step task of connecting the router and performing basic configuration, before building up to complex and sensitive operations such as router IOS upgrade and Site-to-Site VPNs.

Published: August, 2012 by Springer

Guide to Cisco Routers Configuration

Guide to Cisco Routers Configuration