<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>APBilbo&#039;s blog</title>
	<atom:link href="http://www.throttlelauncher.com/blog/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.throttlelauncher.com/blog</link>
	<description>The developer of ThrottleApps.</description>
	<lastBuildDate>Fri, 15 Oct 2010 19:04:30 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0.1</generator>
		<item>
		<title>Calculate appointments between two dates in NET.CF</title>
		<link>http://www.throttlelauncher.com/blog/2010/10/15/calculate-appointments-between-two-dates-in-net-cf/</link>
		<comments>http://www.throttlelauncher.com/blog/2010/10/15/calculate-appointments-between-two-dates-in-net-cf/#comments</comments>
		<pubDate>Fri, 15 Oct 2010 16:47:56 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Windows Mobile development]]></category>

		<guid isPermaLink="false">http://www.throttlelauncher.com/blog/?p=37</guid>
		<description><![CDATA[Recently I&#8217;ve been trying to solve a problem with the Calendar plugin of ThrottleLauncher. It was not showing the recurring appointments. To be honest, I&#8217;ve not done so much work with PocketOutlook or POOM until now. The problem I was facing seems to be eassy to solve in C++  and C cause there&#8217;s a property [...]]]></description>
			<content:encoded><![CDATA[<p>Recently I&#8217;ve been trying to solve a problem with the Calendar plugin of ThrottleLauncher. It was not showing the recurring appointments. To be honest, I&#8217;ve not done so much work with PocketOutlook or POOM until now. The problem I was facing seems to be eassy to solve in C++  and C cause there&#8217;s a property available for the IPOutlookItemCollection implementation called IncludeRecurrences (put_IncludeRecurrences method). Unfortunatelly this method is not available for NET.CF. The obvious way to solve this is to make a complet POOM wrapper in .NET in order to use C++ implementation directly instead of using the provided one&#8230;. Though I though I could try to try to find the recurrences by myself.</p>
<p><span id="more-37"></span>So, it&#8217;s probable that there&#8217;s a better method to make this but I hope this piece of code could help someone in the same problem. Here it comes my solution.</p>
<p>Note that what be try to do here is taking the appointment list between two different dates. In this case we want to make it for the 5/6 weeks of a month (but including the days from the other months that are inside those same wees), or a single week. So we cannot asume that the first and last dates are in the same month. So, to start we will have to search the recurring appointments that are active between those two dates. To do that we make the following.</p>

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
</pre></td><td class="code"><div class="csharp" style="font-family:monospace;"><span style="color: #008080; font-style: italic;">//For each appointment we will return a list of the dates it happens between the dates</span><br />
<br />
<span style="color: #008080; font-style: italic;">//We asume that if the list is empty the date is the one of the appointment and it's not recurring</span><br />
<br />
Dictionary<span style="color: #008000;">&lt;</span>Appointment, List<span style="color: #008000;">&lt;</span>DateTime<span style="color: #008000;">&gt;&gt;</span> rt <span style="color: #008000;">=</span> <span style="color: #008000;">new</span> Dictionary<span style="color: #008000;">&lt;</span>Appointment, List<span style="color: #008000;">&lt;</span>DateTime<span style="color: #008000;">&gt;&gt;</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><span style="color: #008000;">;</span><br />
<br />
List<span style="color: #008000;">&lt;</span>DateTime<span style="color: #008000;">&gt;</span> empty <span style="color: #008000;">=</span> <span style="color: #008000;">new</span> List<span style="color: #008000;">&lt;</span>DateTime<span style="color: #008000;">&gt;</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><span style="color: #008000;">;</span><br />
<br />
<span style="color: #008080; font-style: italic;">//dstart and dend are out start and end DateTime objects</span><br />
<br />
<span style="color: #FF0000;">String</span> start <span style="color: #008000;">=</span> dstart.<span style="color: #0000FF;">ToShortDateString</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span> <span style="color: #008000;">+</span> <span style="color: #666666;">&quot; 00:00&quot;</span><span style="color: #008000;">;</span><br />
<br />
<span style="color: #FF0000;">String</span> end <span style="color: #008000;">=</span> dend.<span style="color: #0000FF;">ToShortDateString</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span> <span style="color: #008000;">+</span> <span style="color: #666666;">&quot; 23:59&quot;</span> <span style="color: #008000;">;</span><br />
<br />
<span style="color: #FF0000;">String</span> strRestriction <span style="color: #008000;">=</span> <span style="color: #666666;">&quot;[Start] &gt;= <span style="color: #008080; font-weight: bold;">\&quot;</span>&quot;</span> <span style="color: #008000;">+</span> start <span style="color: #008000;">+</span> <span style="color: #666666;">&quot;<span style="color: #008080; font-weight: bold;">\&quot;</span> AND [Start] &lt;= <span style="color: #008080; font-weight: bold;">\&quot;</span>&quot;</span> <span style="color: #008000;">+</span> end <span style="color: #008000;">+</span> <span style="color: #666666;">&quot;<span style="color: #008080; font-weight: bold;">\&quot;</span>&quot;</span><span style="color: #008000;">;</span><br />
<br />
<span style="color: #008080; font-style: italic;">//Get OL is a singleton method to get a single PocketOutlook object for the application</span><br />
<br />
AppointmentCollection ac <span style="color: #008000;">=</span> GetOL<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span>.<span style="color: #0000FF;">Appointments</span>.<span style="color: #0000FF;">Items</span>.<span style="color: #0000FF;">Restrict</span><span style="color: #000000;">&#40;</span>strRestriction<span style="color: #000000;">&#41;</span><span style="color: #008000;">;</span></div></td></tr></table></div>

<p>In &#8216;ac&#8217; now we have a coolection of all the appoitments that happen between the dates. The problem is that this list only includes the non recurring appointments. Now we save the appointments in the Dictionary with the emty list:</p>

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>1
2
3
4
</pre></td><td class="code"><div class="csharp" style="font-family:monospace;"><span style="color: #0600FF;">foreach</span> <span style="color: #000000;">&#40;</span>Appointment ap <span style="color: #0600FF;">in</span> ac<span style="color: #000000;">&#41;</span><br />
<span style="color: #000000;">&#123;</span><br />
&nbsp; &nbsp; rt<span style="color: #000000;">&#91;</span>ap<span style="color: #000000;">&#93;</span> <span style="color: #008000;">=</span> empty<span style="color: #008000;">;</span><br />
<span style="color: #000000;">&#125;</span></div></td></tr></table></div>

<p>Ok, now let&#8217;s face the main problem here&#8230; the recurring appointments. To do that we compose a query that will return all the recurring appointments. A good way to optimize this could be to look only for the active appointments between the dates&#8230; but I think the start and end dates of the recurring pattern are not available for the querys (if you think they are, please comment the article <img src='http://www.throttlelauncher.com/blog/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> ).</p>

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>1
</pre></td><td class="code"><div class="csharp" style="font-family:monospace;">ac <span style="color: #008000;">=</span> GetOL<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span>.<span style="color: #0000FF;">Appointments</span>.<span style="color: #0000FF;">Items</span>.<span style="color: #0000FF;">Restrict</span><span style="color: #000000;">&#40;</span><span style="color: #666666;">&quot;[IsRecurring] = TRUE&quot;</span><span style="color: #000000;">&#41;</span><span style="color: #008000;">;</span></div></td></tr></table></div>

<p>Now that we have the collection we have to think on the strategy to follow in processing the appointments. For each one we will have to recover it&#8217;s RecurrencePattern and check wich type of recurrence it&#8217;s following. There are several kinds of recurring appointment according to the RecurrenceType enumeration:</p>
<ul>
<li><strong>NoRecurrence</strong>: simple&#8230; it&#8217;s not recurrent. Job done! <img src='http://www.throttlelauncher.com/blog/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </li>
<li><strong>Daily</strong>: The appointment will happen on a daily basis. Commonly this will be every X days.</li>
<li><strong>Weekly</strong>: it will happen every X weeks, and on the days especified by the DaysOfWeekMask.</li>
<li><strong>Monthly</strong>: will happen every X months on the Nth day. For example the 13th of every 5 months.</li>
<li><strong>MonthByNumber</strong>: the appointment will happen the Nth week day (according to the DaysOfWeekMask) of every X months. For example the 2nd wednesday of every 3 months.</li>
<li><strong>Yearly</strong>: will happen the Nth day of the X month every year. For example birthdays <img src='http://www.throttlelauncher.com/blog/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> .</li>
<li><strong>YearByNumber</strong>: will happen every Nth week day of an specific month. For example every 2nd monday of november.</li>
</ul>
<p>Now that we know how each pattern applies to the dates we need to find a &#8220;simple&#8221; algorithm to find the instances of them between the two dates. The first approach is to go through all the dates trying to instanciate the appointment using it RecurrencePattern, this is way to slow to be usable&#8230; So be will have to  find another way <img src='http://www.throttlelauncher.com/blog/wp-includes/images/smilies/icon_smile.gif' alt=':-)' class='wp-smiley' /> .</p>
<p>For each appointment we will need it&#8217;s ReccurencePattern and it&#8217;s start date and time. As we have not been capable of dirscarding in the query those recurrent appointments that are already due or not started jet we will check them here.</p>

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>1
2
3
4
5
6
7
8
9
10
11
12
13
14
</pre></td><td class="code"><div class="csharp" style="font-family:monospace;">AppointmentRecurrence ar <span style="color: #008000;">=</span> ap.<span style="color: #0000FF;">RecurrencePattern</span><span style="color: #008000;">;</span><br />
<br />
<span style="color: #008080; font-style: italic;">//We dicard the due or non started appointments and the ones that are not recurring.</span><br />
<br />
<span style="color: #0600FF;">if</span><span style="color: #000000;">&#40;</span>ar.<span style="color: #0000FF;">PatternStartDate</span> <span style="color: #008000;">&gt;</span> dend <span style="color: #008000;">||</span> ar.<span style="color: #0000FF;">PatternEndDate</span> <span style="color: #008000;">&lt;</span> dstart <span style="color: #008000;">||</span> ar.<span style="color: #0000FF;">RecurrenceType</span> <span style="color: #008000;">==</span> RecurrenceType.<span style="color: #0000FF;">NoRecurrence</span><span style="color: #000000;">&#41;</span><span style="color: #000000;">&#123;</span><br />
&nbsp; &nbsp; continue<span style="color: #008000;">;</span><br />
<span style="color: #000000;">&#125;</span><br />
<br />
DateTime aux2 <span style="color: #008000;">=</span> ar.<span style="color: #0000FF;">PatternStartTime</span><span style="color: #008000;">;</span><br />
DateTime aux1 <span style="color: #008000;">=</span> ar.<span style="color: #0000FF;">PatternStartDate</span><span style="color: #008000;">;</span><br />
<br />
<span style="color: #008080; font-style: italic;">//We will store here the date we are processing eachtime</span><br />
<br />
DateTime current<span style="color: #008000;">;</span></div></td></tr></table></div>

<p>Now let&#8217;s evaluate each of the cases. The daily recurrence is simple, we just have to find the first day that it applies to inside our range. In order to do that we can take it&#8217;s first ocurrent ever and calculate the total days that have passed until the start date. Then using the modulus we can calculate the first occurence after the start date:</p>

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>1
2
3
4
5
6
7
8
</pre></td><td class="code"><div class="csharp" style="font-family:monospace;"><span style="color: #0600FF;">case</span> RecurrenceType.<span style="color: #0000FF;">Daily</span><span style="color: #008000;">:</span><br />
          current <span style="color: #008000;">=</span> <span style="color: #008000;">new</span> DateTime<span style="color: #000000;">&#40;</span>aux1.<span style="color: #0000FF;">Year</span>, aux1.<span style="color: #0000FF;">Month</span>, aux1.<span style="color: #0000FF;">Day</span>, aux2.<span style="color: #0000FF;">Hour</span>, aux2.<span style="color: #0000FF;">Minute</span>, aux2.<span style="color: #0000FF;">Second</span><span style="color: #000000;">&#41;</span><span style="color: #008000;">;</span><br />
<span style="color: #FF0000;">int</span> sdays <span style="color: #008000;">=</span> <span style="color: #000000;">&#40;</span>dstart <span style="color: #008000;">-</span> current<span style="color: #000000;">&#41;</span>.<span style="color: #0000FF;">Days</span><span style="color: #008000;">;</span><br />
<span style="color: #0600FF;">if</span> <span style="color: #000000;">&#40;</span>sdays <span style="color: #008000;">&gt;</span> <span style="color: #FF0000;">0</span><span style="color: #000000;">&#41;</span><br />
<span style="color: #000000;">&#123;</span><br />
&nbsp; &nbsp; current.<span style="color: #0000FF;">AddDays</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#40;</span>sdays <span style="color: #008000;">%</span> ar.<span style="color: #0000FF;">Interval</span><span style="color: #000000;">&#41;</span> <span style="color: #008000;">*</span> ar.<span style="color: #0000FF;">Interval</span><span style="color: #000000;">&#41;</span><span style="color: #008000;">;</span><br />
<span style="color: #000000;">&#125;</span><br />
break<span style="color: #008000;">;</span></div></td></tr></table></div>

<p>After getting the first ocurrence of the pattern after the start date, be can calculate the rest by adding the RecurrencePattern Interval property value.</p>
<p>Another simple one to solve is the YearByNumber recurrency pattern. We just have to calculate the date of the date start year, and if that one is not inside the interval,  add one other year and recheck. The main loop will check this part (we will see it latter).</p>

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>1
2
3
</pre></td><td class="code"><div class="csharp" style="font-family:monospace;"><span style="color: #0600FF;">case</span> RecurrenceType.<span style="color: #0000FF;">YearByNumber</span><span style="color: #008000;">:</span><br />
current <span style="color: #008000;">=</span> <span style="color: #008000;">new</span> DateTime<span style="color: #000000;">&#40;</span>dstart.<span style="color: #0000FF;">Year</span>, <span style="color: #000000;">&#40;</span><span style="color: #FF0000;">int</span><span style="color: #000000;">&#41;</span>ar.<span style="color: #0000FF;">MonthOfYear</span>, dstart.<span style="color: #0000FF;">Day</span>, aux2.<span style="color: #0000FF;">Hour</span>, aux2.<span style="color: #0000FF;">Minute</span>, aux2.<span style="color: #0000FF;">Second</span><span style="color: #000000;">&#41;</span><span style="color: #008000;">;</span><br />
break<span style="color: #008000;">;</span></div></td></tr></table></div>

<p>In the weekly recurrency pattern we find a different problem. We  have to search the first day of the interval that matches the pattern in the DaysOfWeekMask. The problem is that the mask can contain several week days so we will have to start from the first day of the pattern and check the mask with a loop.  We will have to apply the same procedure to all the recurrency patterns that rely to the DaysOfWeekMasks:</p>

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>1
2
3
4
5
6
7
8
</pre></td><td class="code"><div class="csharp" style="font-family:monospace;"><span style="color: #0600FF;">if</span> <span style="color: #000000;">&#40;</span>ar.<span style="color: #0000FF;">RecurrenceType</span> <span style="color: #008000;">==</span> RecurrenceType.<span style="color: #0000FF;">MonthByNumber</span> <span style="color: #008000;">||</span> ar.<span style="color: #0000FF;">RecurrenceType</span> <span style="color: #008000;">==</span> RecurrenceType.<span style="color: #0000FF;">YearByNumber</span> <span style="color: #008000;">||</span> ar.<span style="color: #0000FF;">RecurrenceType</span> <span style="color: #008000;">==</span> RecurrenceType.<span style="color: #0000FF;">Weekly</span><span style="color: #000000;">&#41;</span><br />
<span style="color: #000000;">&#123;</span><br />
&nbsp; &nbsp; <span style="color: #FF0000;">int</span> count <span style="color: #008000;">=</span> <span style="color: #FF0000;">0</span><span style="color: #008000;">;</span><br />
&nbsp; &nbsp; <span style="color: #0600FF;">while</span> <span style="color: #000000;">&#40;</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#40;</span><span style="color: #FF0000;">int</span><span style="color: #000000;">&#41;</span>Math.<span style="color: #0000FF;">Pow</span><span style="color: #000000;">&#40;</span><span style="color: #FF0000;">2</span>, <span style="color: #000000;">&#40;</span><span style="color: #FF0000;">int</span><span style="color: #000000;">&#41;</span>current.<span style="color: #0000FF;">DayOfWeek</span><span style="color: #000000;">&#41;</span><span style="color: #000000;">&#41;</span> <span style="color: #008000;">&amp;</span>amp<span style="color: #008000;">;</span> <span style="color: #000000;">&#40;</span><span style="color: #000000;">&#40;</span><span style="color: #FF0000;">int</span><span style="color: #000000;">&#41;</span>ar.<span style="color: #0000FF;">DaysOfWeekMask</span><span style="color: #000000;">&#41;</span><span style="color: #000000;">&#41;</span> <span style="color: #008000;">==</span> <span style="color: #FF0000;">0</span><span style="color: #000000;">&#41;</span> <span style="color: #008000;">&amp;</span>amp<span style="color: #008000;">;&amp;</span>amp<span style="color: #008000;">;</span> count<span style="color: #008000;">++</span> <span style="color: #008000;">&lt;</span> <span style="color: #FF0000;">7</span><span style="color: #000000;">&#41;</span><br />
&nbsp; &nbsp; <span style="color: #000000;">&#123;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; current <span style="color: #008000;">=</span> current.<span style="color: #0000FF;">AddDays</span><span style="color: #000000;">&#40;</span><span style="color: #FF0000;">1</span><span style="color: #000000;">&#41;</span><span style="color: #008000;">;</span><br />
&nbsp; &nbsp; <span style="color: #000000;">&#125;</span><br />
<span style="color: #000000;">&#125;</span></div></td></tr></table></div>

<p>The initialization of the current date for each of those three methods varies but are very similar:</p>

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
</pre></td><td class="code"><div class="csharp" style="font-family:monospace;"><span style="color: #0600FF;">case</span> RecurrenceType.<span style="color: #0000FF;">Weekly</span><span style="color: #008000;">:</span><br />
&nbsp; &nbsp; current <span style="color: #008000;">=</span> <span style="color: #008000;">new</span> DateTime<span style="color: #000000;">&#40;</span>dstart.<span style="color: #0000FF;">Year</span>, dstart.<span style="color: #0000FF;">Month</span>, dstart.<span style="color: #0000FF;">Day</span>, aux2.<span style="color: #0000FF;">Hour</span>, aux2.<span style="color: #0000FF;">Minute</span>, aux2.<span style="color: #0000FF;">Second</span><span style="color: #000000;">&#41;</span><span style="color: #008000;">;</span><br />
&nbsp; &nbsp; break<span style="color: #008000;">;</span><br />
<span style="color: #0600FF;">case</span> RecurrenceType.<span style="color: #0000FF;">MonthByNumber</span><span style="color: #008000;">:</span><br />
&nbsp; &nbsp; <span style="color: #000000;">&#123;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; current <span style="color: #008000;">=</span> <span style="color: #008000;">new</span> DateTime<span style="color: #000000;">&#40;</span>aux1.<span style="color: #0000FF;">Year</span>, aux1.<span style="color: #0000FF;">Month</span>, dstart.<span style="color: #0000FF;">Day</span>, aux2.<span style="color: #0000FF;">Hour</span>, aux2.<span style="color: #0000FF;">Minute</span>, aux2.<span style="color: #0000FF;">Second</span><span style="color: #000000;">&#41;</span><span style="color: #008000;">;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #0600FF;">if</span> <span style="color: #000000;">&#40;</span>dend <span style="color: #008000;">&lt;</span> current<span style="color: #000000;">&#41;</span> continue<span style="color: #008000;">;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #FF0000;">int</span> smonths <span style="color: #008000;">=</span> <span style="color: #000000;">&#40;</span>dstart.<span style="color: #0000FF;">Year</span> <span style="color: #008000;">*</span> <span style="color: #FF0000;">12</span> <span style="color: #008000;">+</span> dstart.<span style="color: #0000FF;">Month</span> <span style="color: #008000;">-</span> current.<span style="color: #0000FF;">Year</span> <span style="color: #008000;">*</span> <span style="color: #FF0000;">12</span> <span style="color: #008000;">-</span> current.<span style="color: #0000FF;">Month</span><span style="color: #000000;">&#41;</span><span style="color: #008000;">;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #0600FF;">if</span> <span style="color: #000000;">&#40;</span>smonths <span style="color: #008000;">&gt;</span> <span style="color: #FF0000;">0</span><span style="color: #000000;">&#41;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #000000;">&#123;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; current.<span style="color: #0000FF;">AddMonths</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#40;</span>smonths <span style="color: #008000;">%</span> ar.<span style="color: #0000FF;">Interval</span><span style="color: #000000;">&#41;</span> <span style="color: #008000;">*</span> ar.<span style="color: #0000FF;">Interval</span><span style="color: #000000;">&#41;</span><span style="color: #008000;">;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #000000;">&#125;</span><br />
&nbsp; &nbsp; <span style="color: #000000;">&#125;</span><br />
break<span style="color: #008000;">;</span><br />
<br />
<span style="color: #0600FF;">case</span> RecurrenceType.<span style="color: #0000FF;">YearByNumber</span><span style="color: #008000;">:</span><br />
&nbsp; &nbsp; current <span style="color: #008000;">=</span> <span style="color: #008000;">new</span> DateTime<span style="color: #000000;">&#40;</span>dstart.<span style="color: #0000FF;">Year</span>, <span style="color: #000000;">&#40;</span><span style="color: #FF0000;">int</span><span style="color: #000000;">&#41;</span>ar.<span style="color: #0000FF;">MonthOfYear</span>, dstart.<span style="color: #0000FF;">Day</span>, aux2.<span style="color: #0000FF;">Hour</span>, aux2.<span style="color: #0000FF;">Minute</span>, aux2.<span style="color: #0000FF;">Second</span><span style="color: #000000;">&#41;</span><span style="color: #008000;">;</span><br />
&nbsp; &nbsp; break<span style="color: #008000;">;</span></div></td></tr></table></div>

<p>The most peculiar one is the MonthByNumber, in wich we have to calculate the months passed synce the first ocurrence of the appointment. We will have to do almost exactly the same for the monthly pattern, but changing the day:</p>

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>1
2
3
4
5
6
7
8
9
10
11
</pre></td><td class="code"><div class="csharp" style="font-family:monospace;"><span style="color: #0600FF;">case</span> RecurrenceType.<span style="color: #0000FF;">Monthly</span><span style="color: #008000;">:</span><br />
&nbsp; &nbsp; <span style="color: #000000;">&#123;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; current <span style="color: #008000;">=</span> <span style="color: #008000;">new</span> DateTime<span style="color: #000000;">&#40;</span>aux1.<span style="color: #0000FF;">Year</span>, aux1.<span style="color: #0000FF;">Month</span>, ar.<span style="color: #0000FF;">DayOfMonth</span>, aux2.<span style="color: #0000FF;">Hour</span>, aux2.<span style="color: #0000FF;">Minute</span>, aux2.<span style="color: #0000FF;">Second</span><span style="color: #000000;">&#41;</span><span style="color: #008000;">;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #0600FF;">if</span> <span style="color: #000000;">&#40;</span>dend <span style="color: #008000;">&lt;</span> current<span style="color: #000000;">&#41;</span> continue<span style="color: #008000;">;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #FF0000;">int</span> smonths <span style="color: #008000;">=</span> <span style="color: #000000;">&#40;</span>dstart.<span style="color: #0000FF;">Year</span> <span style="color: #008000;">*</span> <span style="color: #FF0000;">12</span> <span style="color: #008000;">+</span> dstart.<span style="color: #0000FF;">Month</span> <span style="color: #008000;">-</span> current.<span style="color: #0000FF;">Year</span> <span style="color: #008000;">*</span> <span style="color: #FF0000;">12</span> <span style="color: #008000;">-</span> current.<span style="color: #0000FF;">Month</span><span style="color: #000000;">&#41;</span><span style="color: #008000;">;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #0600FF;">if</span> <span style="color: #000000;">&#40;</span>smonths <span style="color: #008000;">&gt;</span> <span style="color: #FF0000;">0</span><span style="color: #000000;">&#41;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #000000;">&#123;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; current.<span style="color: #0000FF;">AddMonths</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#40;</span>smonths <span style="color: #008000;">%</span> ar.<span style="color: #0000FF;">Interval</span><span style="color: #000000;">&#41;</span> <span style="color: #008000;">*</span> ar.<span style="color: #0000FF;">Interval</span><span style="color: #000000;">&#41;</span><span style="color: #008000;">;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #000000;">&#125;</span><br />
&nbsp; &nbsp; <span style="color: #000000;">&#125;</span><br />
&nbsp; &nbsp; break<span style="color: #008000;">;</span></div></td></tr></table></div>

<p>Now that we have the start point for each of the patterns we are ready to handle the main loop. In this loop we will be incrementing the current date according to each pattern and checking that the current date doesn&#8217;t exceed the end date of out interval. Then for each date we will try to take an instance of the appointment using the RecurrencePattern GetOccurrence method. If that method returns null then the appointment doesn&#8217;t happen that day, think that is possible in some cases like the weekly pattern due to that we have not taken in account the Interval property, or in some other like the pattern exceptions. Here you have the complete source of the loop:</p>

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
</pre></td><td class="code"><div class="csharp" style="font-family:monospace;"><span style="color: #0600FF;">while</span> <span style="color: #000000;">&#40;</span>current <span style="color: #008000;">&lt;</span> dend<span style="color: #000000;">&#41;</span><br />
<span style="color: #000000;">&#123;</span><br />
&nbsp; &nbsp; <span style="color: #0600FF;">if</span> <span style="color: #000000;">&#40;</span>current <span style="color: #008000;">&gt;</span> dstart<span style="color: #000000;">&#41;</span><br />
&nbsp; &nbsp; <span style="color: #000000;">&#123;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; Appointment ap2 <span style="color: #008000;">=</span> ar.<span style="color: #0000FF;">GetOccurrence</span><span style="color: #000000;">&#40;</span>current<span style="color: #000000;">&#41;</span><span style="color: #008000;">;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #0600FF;">if</span> <span style="color: #000000;">&#40;</span>ap2 <span style="color: #008000;">!=</span> <span style="color: #0600FF;">null</span><span style="color: #000000;">&#41;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #000000;">&#123;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; List<span style="color: #008000;">&lt;</span>DateTime<span style="color: #008000;">&gt;</span> lst<span style="color: #008000;">;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #0600FF;">if</span> <span style="color: #000000;">&#40;</span><span style="color: #008000;">!</span> rt.<span style="color: #0000FF;">TryGetValue</span><span style="color: #000000;">&#40;</span>ap2,<span style="color: #0600FF;">out</span> lst<span style="color: #000000;">&#41;</span><span style="color: #000000;">&#41;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #000000;">&#123;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; lst <span style="color: #008000;">=</span> <span style="color: #008000;">new</span> List<span style="color: #008000;">&lt;</span>DateTime<span style="color: #008000;">&gt;</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><span style="color: #008000;">;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; rt<span style="color: #000000;">&#91;</span>ap2<span style="color: #000000;">&#93;</span> <span style="color: #008000;">=</span> lst<span style="color: #008000;">;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #000000;">&#125;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; lst.<span style="color: #0000FF;">Add</span><span style="color: #000000;">&#40;</span>current<span style="color: #000000;">&#41;</span><span style="color: #008000;">;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #000000;">&#125;</span><br />
&nbsp; &nbsp; <span style="color: #000000;">&#125;</span><br />
&nbsp; &nbsp; <span style="color: #0600FF;">switch</span> <span style="color: #000000;">&#40;</span>ar.<span style="color: #0000FF;">RecurrenceType</span><span style="color: #000000;">&#41;</span><br />
&nbsp; &nbsp; <span style="color: #000000;">&#123;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #0600FF;">case</span> RecurrenceType.<span style="color: #0000FF;">Daily</span><span style="color: #008000;">:</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; current <span style="color: #008000;">=</span> current.<span style="color: #0000FF;">AddDays</span><span style="color: #000000;">&#40;</span>ar.<span style="color: #0000FF;">Interval</span><span style="color: #000000;">&#41;</span><span style="color: #008000;">;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; break<span style="color: #008000;">;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #0600FF;">case</span> RecurrenceType.<span style="color: #0000FF;">Weekly</span><span style="color: #008000;">:</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; current <span style="color: #008000;">=</span> current.<span style="color: #0000FF;">AddDays</span><span style="color: #000000;">&#40;</span><span style="color: #FF0000;">1</span><span style="color: #000000;">&#41;</span><span style="color: #008000;">;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; break<span style="color: #008000;">;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #0600FF;">case</span> RecurrenceType.<span style="color: #0000FF;">Monthly</span><span style="color: #008000;">:</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; current <span style="color: #008000;">=</span> current.<span style="color: #0000FF;">AddMonths</span><span style="color: #000000;">&#40;</span>ar.<span style="color: #0000FF;">Interval</span><span style="color: #000000;">&#41;</span><span style="color: #008000;">;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; break<span style="color: #008000;">;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #0600FF;">case</span> RecurrenceType.<span style="color: #0000FF;">MonthByNumber</span><span style="color: #008000;">:</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; current <span style="color: #008000;">=</span> current.<span style="color: #0000FF;">AddDays</span><span style="color: #000000;">&#40;</span><span style="color: #FF0000;">7</span><span style="color: #000000;">&#41;</span><span style="color: #008000;">;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; break<span style="color: #008000;">;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #0600FF;">case</span> RecurrenceType.<span style="color: #0000FF;">YearByNumber</span><span style="color: #008000;">:</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; current <span style="color: #008000;">=</span> current.<span style="color: #0000FF;">AddDays</span><span style="color: #000000;">&#40;</span><span style="color: #FF0000;">7</span><span style="color: #000000;">&#41;</span><span style="color: #008000;">;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; break<span style="color: #008000;">;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #0600FF;">case</span> RecurrenceType.<span style="color: #0000FF;">Yearly</span><span style="color: #008000;">:</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; current <span style="color: #008000;">=</span> current.<span style="color: #0000FF;">AddYears</span><span style="color: #000000;">&#40;</span><span style="color: #FF0000;">1</span><span style="color: #000000;">&#41;</span><span style="color: #008000;">;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; break<span style="color: #008000;">;</span><br />
&nbsp; &nbsp; <span style="color: #000000;">&#125;</span><br />
&nbsp; &nbsp; <span style="color: #0600FF;">if</span> <span style="color: #000000;">&#40;</span>ar.<span style="color: #0000FF;">RecurrenceType</span> <span style="color: #008000;">==</span> RecurrenceType.<span style="color: #0000FF;">MonthByNumber</span> <span style="color: #008000;">||</span> ar.<span style="color: #0000FF;">RecurrenceType</span> <span style="color: #008000;">==</span> RecurrenceType.<span style="color: #0000FF;">YearByNumber</span> <span style="color: #008000;">||</span> ar.<span style="color: #0000FF;">RecurrenceType</span> <span style="color: #008000;">==</span> RecurrenceType.<span style="color: #0000FF;">Weekly</span><span style="color: #000000;">&#41;</span><br />
&nbsp; &nbsp; <span style="color: #000000;">&#123;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #FF0000;">int</span> count <span style="color: #008000;">=</span> <span style="color: #FF0000;">0</span><span style="color: #008000;">;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #0600FF;">while</span> <span style="color: #000000;">&#40;</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#40;</span><span style="color: #FF0000;">int</span><span style="color: #000000;">&#41;</span>Math.<span style="color: #0000FF;">Pow</span><span style="color: #000000;">&#40;</span><span style="color: #FF0000;">2</span>, <span style="color: #000000;">&#40;</span><span style="color: #FF0000;">int</span><span style="color: #000000;">&#41;</span>current.<span style="color: #0000FF;">DayOfWeek</span><span style="color: #000000;">&#41;</span><span style="color: #000000;">&#41;</span> <span style="color: #008000;">&amp;</span> <span style="color: #000000;">&#40;</span><span style="color: #000000;">&#40;</span><span style="color: #FF0000;">int</span><span style="color: #000000;">&#41;</span>ar.<span style="color: #0000FF;">DaysOfWeekMask</span><span style="color: #000000;">&#41;</span><span style="color: #000000;">&#41;</span> <span style="color: #008000;">==</span> <span style="color: #FF0000;">0</span><span style="color: #000000;">&#41;</span> <span style="color: #008000;">&amp;&amp;</span> count<span style="color: #008000;">++</span> <span style="color: #008000;">&lt;</span> <span style="color: #FF0000;">7</span><span style="color: #000000;">&#41;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #000000;">&#123;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; current <span style="color: #008000;">=</span> current.<span style="color: #0000FF;">AddDays</span><span style="color: #000000;">&#40;</span><span style="color: #FF0000;">1</span><span style="color: #000000;">&#41;</span><span style="color: #008000;">;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #000000;">&#125;</span><br />
&nbsp; &nbsp; <span style="color: #000000;">&#125;</span><br />
<span style="color: #000000;">&#125;</span></div></td></tr></table></div>

<p>Hope you find this usefull and interesting&#8230; I did <img src='http://www.throttlelauncher.com/blog/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> .</p>
]]></content:encoded>
			<wfw:commentRss>http://www.throttlelauncher.com/blog/2010/10/15/calculate-appointments-between-two-dates-in-net-cf/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>ThrottleLauncher 1.0&#8230; behind the scenes</title>
		<link>http://www.throttlelauncher.com/blog/2010/03/14/throttlelauncher-1-0-behind-the-scenes/</link>
		<comments>http://www.throttlelauncher.com/blog/2010/03/14/throttlelauncher-1-0-behind-the-scenes/#comments</comments>
		<pubDate>Sun, 14 Mar 2010 12:48:02 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[ThrottleApps]]></category>

		<guid isPermaLink="false">http://www.throttlelauncher.com/blog/?p=32</guid>
		<description><![CDATA[After almost 4 months of really hard work I&#8217;ve released ThrottleLauncher 1.0!! You can check it at throttlelauncher&#8217;s portal. This version includes quite a lot of improvements. From OpenGL ES support to a full redesigned finger friendly configuration dialogs. I&#8217;ve already written some blog entries about OpenGL ES in ThrottleLauncher. They key in the implementation [...]]]></description>
			<content:encoded><![CDATA[<p>After almost 4 months of really hard work I&#8217;ve released ThrottleLauncher 1.0!! You can check it at <a title="ThrottleLauncher official webpage" href="http://www.throttlelauncher.com/portal/" target="_blank">throttlelauncher&#8217;s portal.</a></p>
<p>This version includes quite a lot of improvements. From OpenGL ES support to a full redesigned finger friendly configuration dialogs.</p>
<p><span id="more-32"></span></p>
<p>I&#8217;ve already written some blog entries about OpenGL ES in ThrottleLauncher. They key in the implementation of this feature has been the multilayered core design that I implemented for the previous RC3. The ThrottleLauncher&#8217;s core is structured in different layers (following a pattern similar to MVC, but with even more layers <img src='http://www.throttlelauncher.com/blog/wp-includes/images/smilies/icon_razz.gif' alt=':P' class='wp-smiley' /> ). That design has allowed me to implement the OpenGL support while keeping compatibility with GDI rendering. I will upload eventually a diagram of the core design.</p>
<p>The worst part of using OpenGL ES, IMHO, was making it compatible with all devices. I&#8217;ve had some hard time trying to make it work for the Common Lite profile while allowing the Common profile to render pixel perfect graphics. Finally I&#8217;ve had to branch the code in order to make it work for CL. I&#8217;ve not released the CL profile version because it doesn&#8217;t seem to work properly on Dell Axim.</p>
<p>Other of the improvements of this release is the APNG and MNG (partial) support. The implementation is not fully compatible with both specifications. The animations are a pain to handle because the take so many memory, and the take to much time to load. I finally decided to use the same method with the animations than with the rest of the graphics: they are loaded when needed and released when the page is exited.</p>
<p>I&#8217;ve also spent to much time optimizing the app. To do this I&#8217;ve used the NET.CF 3.5 CLR profiler tool. One of the biggest problems I was trying to solve there was reducing the number of garbage collection. The GC was causing the scrolling to stop from time to time leading to a poor user experience. Thanks to the CLR profiler I reduced the creation of objects, specially the ones caused by the user events. In fact I discovered that NET.CF creates a MouseEventArgs item for every mouse movement over the form or a control. I shorted this by wrapping the windows proc with my own function (see  <span style="font-size: x-small;">SetWindowLong native function).</span></p>
<p>The last great improvment in this version is the fully redesigned configuration dialogs. This dialogs are implemented by using a custom Control set, not based in the .NET controls (wich I hate <img src='http://www.throttlelauncher.com/blog/wp-includes/images/smilies/icon_razz.gif' alt=':P' class='wp-smiley' /> ), but done directly by rendering. This custom set allows the kinetic scrolling to work equally in a WM5 or WM6.5 device, and also provides multiple resolutions support.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.throttlelauncher.com/blog/2010/03/14/throttlelauncher-1-0-behind-the-scenes/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Thank you!!</title>
		<link>http://www.throttlelauncher.com/blog/2010/01/19/thank-you/</link>
		<comments>http://www.throttlelauncher.com/blog/2010/01/19/thank-you/#comments</comments>
		<pubDate>Tue, 19 Jan 2010 10:52:48 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[ThrottleApps]]></category>

		<guid isPermaLink="false">http://www.throttlelauncher.com/blog/?p=30</guid>
		<description><![CDATA[Thanks to your donations I&#8217;ve been able to buy an HTC Diamond on ebay . I hope to receive it this week or the next. It will allow me to finally test applications using a real hardware accelerated device. Oh, BTW, I tested TL in my brother&#8217;s HTC HD2 device the past weekend and&#8230; it&#8217;s [...]]]></description>
			<content:encoded><![CDATA[<p>Thanks to your donations I&#8217;ve been able to buy an HTC Diamond on ebay <img src='http://www.throttlelauncher.com/blog/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> . I hope to receive it this week or the next. It will allow me to finally test applications using a real hardware accelerated device.</p>
<p>Oh, BTW, I tested TL in my brother&#8217;s HTC HD2 device the past weekend and&#8230; it&#8217;s awesome. Transitions are smooth and fast even with the most complex themes&#8230; and without using any OpenGL!! (when I tried to enable OpenGL rendering it crashed X-D so I tested using the GDI engine).</p>
<p>Thank you everyone for the support!</p>
]]></content:encoded>
			<wfw:commentRss>http://www.throttlelauncher.com/blog/2010/01/19/thank-you/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Little problems testing OpenGL ES</title>
		<link>http://www.throttlelauncher.com/blog/2010/01/14/little-problems-testing-opengl-es/</link>
		<comments>http://www.throttlelauncher.com/blog/2010/01/14/little-problems-testing-opengl-es/#comments</comments>
		<pubDate>Thu, 14 Jan 2010 09:51:49 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[ThrottleApps]]></category>

		<guid isPermaLink="false">http://www.throttlelauncher.com/blog/?p=27</guid>
		<description><![CDATA[I&#8217;m experimenting some problems when developing ThrottleLauncher due to the lack of hardware acceleration of my Omnia. I&#8217;m using Vincent&#8217;s software OpenGL driver, but I cannot get real taste on how the changes affect performance. Also there seems to be some problems with the old libgles_cl.dll powered devices (Axim&#8217;s V51X)&#8230; I&#8217;m trying to get somewhere [...]]]></description>
			<content:encoded><![CDATA[<p>I&#8217;m experimenting some problems when developing ThrottleLauncher due to the lack of hardware acceleration of my Omnia. I&#8217;m using Vincent&#8217;s software OpenGL driver, but I cannot get real taste on how the changes affect performance.</p>
<p>Also there seems to be some problems with the old libgles_cl.dll powered devices (Axim&#8217;s V51X)&#8230;</p>
<p>I&#8217;m trying to get somewhere an HTC Diamond device for testing <img src='http://www.throttlelauncher.com/blog/wp-includes/images/smilies/icon_razz.gif' alt=':-P' class='wp-smiley' /> . May be I can also make my brother test ThrottleLauncher in his new HTC HD2 <img src='http://www.throttlelauncher.com/blog/wp-includes/images/smilies/icon_biggrin.gif' alt=':D' class='wp-smiley' /> .</p>
<p>I&#8217;m also thinking of starting anew ThrottleLock development using OpenGLES for rendering.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.throttlelauncher.com/blog/2010/01/14/little-problems-testing-opengl-es/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>FireSlave&#8217;s MeizuM8 suite theme about to come</title>
		<link>http://www.throttlelauncher.com/blog/2009/12/18/fireslave-xpertfs-theme-about-to-come/</link>
		<comments>http://www.throttlelauncher.com/blog/2009/12/18/fireslave-xpertfs-theme-about-to-come/#comments</comments>
		<pubDate>Fri, 18 Dec 2009 21:35:25 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[ThrottleApps]]></category>

		<guid isPermaLink="false">http://www.throttlelauncher.com/blog/?p=17</guid>
		<description><![CDATA[FireSlave has just uploaded a video to youtube with a preview of his new theme MeizuM8. It&#8217;s a pity than the quality of the video is not too good. Anyway in the video we can see how cool the theme looks . I specially love the batery charging animation! The calendar view is also incredible. [...]]]></description>
			<content:encoded><![CDATA[<p>FireSlave has just uploaded a video to youtube with a preview of his new theme MeizuM8. It&#8217;s a pity than the quality of the video is not too good. Anyway in the video we can see how cool the theme looks <img src='http://www.throttlelauncher.com/blog/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> . I specially love the batery charging animation! The calendar view is also incredible.</p>
<p><span id="more-17"></span></p>
<p>This version requires the upcomming ThrottleLauncher 1.0.1  so I think it will be released right after it <img src='http://www.throttlelauncher.com/blog/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> .</p>
<p>I&#8217;ve tested some of the previous versions of the theme on my Omnia and I can say it&#8217;s pure awesomeness.</p>
<p>Here you have the video!</p>
<p><object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" width="425" height="344" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,40,0"><param name="allowFullScreen" value="true" /><param name="allowscriptaccess" value="always" /><param name="src" value="http://www.youtube.com/v/_YM_pcjYrTc&amp;hl=es_ES&amp;fs=1&amp;color1=0x006699&amp;color2=0x54abd6" /><param name="allowfullscreen" value="true" /><embed type="application/x-shockwave-flash" width="425" height="344" src="http://www.youtube.com/v/_YM_pcjYrTc&amp;hl=es_ES&amp;fs=1&amp;color1=0x006699&amp;color2=0x54abd6" allowscriptaccess="always" allowfullscreen="true"></embed></object></p>
<p>23 &#8211; 03 &#8211; 2010:</p>
<p>FiReSlAvE is currently working full time on a WindosPhone7 theme. You can follow his progress at xda-developers. I hope he will be back into Meizu theme soon <img src='http://www.throttlelauncher.com/blog/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> .</p>
]]></content:encoded>
			<wfw:commentRss>http://www.throttlelauncher.com/blog/2009/12/18/fireslave-xpertfs-theme-about-to-come/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Two new awesome themes for TL by Jappie</title>
		<link>http://www.throttlelauncher.com/blog/2009/12/18/two-new-aweome-themes-for-tl-by-jappie/</link>
		<comments>http://www.throttlelauncher.com/blog/2009/12/18/two-new-aweome-themes-for-tl-by-jappie/#comments</comments>
		<pubDate>Fri, 18 Dec 2009 21:22:27 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[ThrottleApps]]></category>

		<guid isPermaLink="false">http://www.throttlelauncher.com/blog/?p=13</guid>
		<description><![CDATA[Jappie has recently released two awesome themes for ThrottleLauncher. They remind me a little bit to the new WM6.5 Titanium plugin. They are both very functional, fast and cool themes. Definatelly worth a try . Here you have some screenshots. Click on them to access to the theme forum page.]]></description>
			<content:encoded><![CDATA[<p>Jappie has recently released two awesome themes for ThrottleLauncher. They remind me a little bit to the new WM6.5 Titanium plugin. They are both very functional, fast and cool themes. Definatelly worth a try <img src='http://www.throttlelauncher.com/blog/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> .</p>
<p><span id="more-13"></span>Here you have some screenshots. Click on them to access to the theme forum page.</p>
<div class="wp-caption alignnone" style="width: 278px"><a href="http://www.throttlelauncher.com/forum/showthread.php?p=10015#post10015"><img title="QwerTytantic theme screenshot" src="http://sites.google.com/site/tldestri/pix/preview.jpg" alt="" width="268" height="444" /></a><p class="wp-caption-text">QwerTytantic theme</p></div>
<div class="wp-caption alignnone" style="width: 276px"><a href="http://www.throttlelauncher.com/forum/showthread.php?t=1375"><img class=" " title="QwertyWorkPlus theme screenshot" src="http://sites.google.com/site/tldestri/pix/QwertyWorkPlus.jpg" alt="QwertyWorkPlus theme" width="266" height="443" /></a><p class="wp-caption-text">QwertyWorkPlus theme</p></div>
]]></content:encoded>
			<wfw:commentRss>http://www.throttlelauncher.com/blog/2009/12/18/two-new-aweome-themes-for-tl-by-jappie/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>ThrottleLauncher + OpenGL = 3x Speed</title>
		<link>http://www.throttlelauncher.com/blog/2009/12/18/throttlelauncher-opengl-3x-speed/</link>
		<comments>http://www.throttlelauncher.com/blog/2009/12/18/throttlelauncher-opengl-3x-speed/#comments</comments>
		<pubDate>Fri, 18 Dec 2009 21:03:11 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[ThrottleApps]]></category>

		<guid isPermaLink="false">http://www.throttlelauncher.com/blog/?p=11</guid>
		<description><![CDATA[After figthing with OpenGL ES and solving some integration problems I&#8217;ve finally been able to release for beta testing a fully functional version of ThrottleLauncher with hardware acceleration support. The results are just incredible. Almost a 3x speed improvement over the GDI rendering engine!! I&#8217;ve to say that this improvement is only posible in hardware [...]]]></description>
			<content:encoded><![CDATA[<p>After figthing with OpenGL ES and solving some integration problems I&#8217;ve finally been able to release for beta testing a fully functional version of ThrottleLauncher with hardware acceleration support.</p>
<p>The results are just incredible. Almost a 3x speed improvement over the GDI rendering engine!!</p>
<p>I&#8217;ve to say that this improvement is only posible in hardware accelerated devices with NVidia OpenGL ES implementation (opengles_cm.dll driver).</p>
<p>I hope to have this version released to public in january <img src='http://www.throttlelauncher.com/blog/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> .</p>
]]></content:encoded>
			<wfw:commentRss>http://www.throttlelauncher.com/blog/2009/12/18/throttlelauncher-opengl-3x-speed/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>ThrottleLauncher with OpenGL.</title>
		<link>http://www.throttlelauncher.com/blog/2009/12/16/throttlelauncher-with-opengl/</link>
		<comments>http://www.throttlelauncher.com/blog/2009/12/16/throttlelauncher-with-opengl/#comments</comments>
		<pubDate>Wed, 16 Dec 2009 18:32:52 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[ThrottleLauncher]]></category>

		<guid isPermaLink="false">http://www.throttlelauncher.net/blog/?p=3</guid>
		<description><![CDATA[Right now I&#8217;m working in a new version of ThrottleLauncher. During the development of this version I&#8217;ve tried to improve rendering speed and performance without too much success&#8230; I think the rendering framework works as fast as it&#8217;s posible with GDI . Thus I&#8217;ve tried to extend the rendering framework to use DirectX first (without [...]]]></description>
			<content:encoded><![CDATA[<p>Right now I&#8217;m working in a new version of ThrottleLauncher. During the development of this version I&#8217;ve tried to improve rendering speed and performance without too much success&#8230; I think the rendering framework works as fast as it&#8217;s posible with GDI <img src='http://www.throttlelauncher.com/blog/wp-includes/images/smilies/icon_sad.gif' alt=':-(' class='wp-smiley' /> . Thus I&#8217;ve tried to extend the rendering framework to use DirectX first (without too much success) and OpenGL ES, wich  I&#8217;ve recently sent to ThrottleApps beta testers.</p>
<p>I&#8217;ve used the wrapper provided by Koush here:</p>
<p><a href="http://www.koushikdutta.com/2008/08/net-compact-framework-wrapper-for.html">http://www.koushikdutta.com/2008/08/net-compact-framework-wrapper-for.html</a></p>
<p>I&#8217;ve encountered some problems though when using the wrapper so I&#8217;ve had to extend it and make some modifications like:</p>
<p>- Adding some more font&#8217;s to the GlyphRun class.</p>
<p>- Adding some more methods to create templates. So I can build them with my current framework instead of using Image API</p>
<p>By know the result are promissing&#8230; Seems like OpenGL ES could be the solution for ThrottleLauncher low speed in big screen devices (like VGA and wVGA).</p>
<p>There is no ETA on when the new version will be ready.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.throttlelauncher.com/blog/2009/12/16/throttlelauncher-with-opengl/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

