TechnicalArchitectureWorx

The (Unofficial) ITWorx Technical Architecture Blog

Archive for the ‘YShahin’ Category

ITWorx Prayer Times Hot Fixes

Posted by archworx on February 25, 2008

Hi all,

There have been some complaints and questions about the prayer times gadget and I’m here to tell you that we are working on a new release Insha’a Allah that will include many bug fixes and new features.

But in the mean time I would like to tell you about some hacks that you can do

Remember : after any change please close the gadget and open it again for the changes to take affect

  • To fix the Athan sound

Open the folder %userprofile%/AppData/Local/MicrosoftWindows Sidebar/Gadgets/ITWorxPrayerTimes.gadget/sound and you will find Athan123.wav, just replace this file with any wave file you like but it will still be loud so try to put a wave file with low volume. (Don’t worry the volume will be fixed)

  • To fix the cities

Open the folder %userprofile%/AppData/Local/Microsoft/Windows Sidebar/Gadgets/ITWorxPrayerTimes.gadget and you will find data.xml, this is where we store all the cities, all you need is a text editor and you will be able to add any city you like

To add a city:

here is the format

<Country id=”” name=”” city=”” latitude=”” longitude=”” gmt=”” daylight=”” method=””/>

id: insert the next id in the list (not important what number you put)

name: insert the country name

latitude: your new cities latitude in the formate D M [N/S]

D is degrees, M is minutes and [N/S] means north or south

eg. Egypt, Cairo is “30 8 N”; 30 Degrees 8 minutes North; please remember to leave the spaces between them

longitude: your new cities longitude in the formate D M [E/W]

D is degrees, M is minutes and [E/W] means east or west

eg. Egypt, Cairo is “31 24 E”; 31 Degrees 24 minutes East; also please remember to leave the spaces between them

gmt: is simply you timezone, eg “0”, “2”,”-3″ or “-7”

daylight: is if daylight is enabled or not, eg “Y” or “N”

method: this is asr calculation method you use and its a number from 0-4

“0” means Egyptian General Authority of Survey

“1” means Islamic Society of North America

“2” means Umm Al-Qura University

“3” means University Of Islamic Sciences, Karachi

“4” means Muslim World League

I hope that this can help until the new version is released

Thank you

Posted in PrayerTimes, Vista, YShahin | 13 Comments »

Testing Private Methods

Posted by archworx on June 21, 2007

Test Driven Development a practice that is becoming very popular due to the quality assurance that it adds. While it is easy to test public methods, How do I test private methods?

There are 2 ways:

  1. Using Helper Class discussed on The Code Project
  2. Using Microsoft’s build in Testing Tools

Example:

using Microsoft.VisualStudio.TestTools.UnitTesting;
PrivateObject po = new PrivateObject(new TestClass());
po.Invoke('PrivateMethodName'); /*This will invoke the private method*/
po.GetField('PrivateFieldName'); /*This will get the value of a private variable*/

Posted in Unit Testing, YShahin | Leave a Comment »

Scalable Vector Graphics (SVG)

Posted by archworx on May 17, 2007

Scalable Vector Graphics (SVG) is an XML markup language for describing two-dimensional vector graphics, both static and animated, and either declarative or scripted.

SVG was developed by the W3C SVG Working Group starting in 1998, after Macromedia and MicrosoftVector Markup Language (VML) whereas Adobe Systems and Sun Microsystems submitted a competing format known as PGML. The working group was chaired by Chris Lilley of the W3C.

To see exmple please download the Adobe SVG ViewerExample1

Advantages of using SVG over other image formats (like JPEG and GIF) are:

  • SVG files are smaller and more compressible than JPEG and GIF images
  • SVG images are scalable
  • SVG images can be printed with high quality at any resolution
  • SVG images are zoomable. Any part of the image can be zoomed without degradation
  • SVG works with Java technology
  • SVG is an open standard

to learn SVG visit W3Schools

Posted in YShahin | 1 Comment »