<?xml version="1.0" encoding="utf-8"?>
<rss xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:pingback="http://madskills.com/public/xml/rss/module/pingback/" xmlns:trackback="http://madskills.com/public/xml/rss/module/trackback/" xmlns:wfw="http://wellformedweb.org/CommentAPI/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/" xmlns:dc="http://purl.org/dc/elements/1.1/" version="2.0">
  <channel>
    <title>Chris Craft's Blog - 30 Days of .Net</title>
    <link>http://www.cjcraft.com/blog/</link>
    <description>A .NET Compact Framework Blog</description>
    <language>en-us</language>
    <copyright>Chris Craft</copyright>
    <lastBuildDate>Mon, 02 Jun 2008 05:48:15 GMT</lastBuildDate>
    <generator>newtelligence dasBlog 2.0.7226.0</generator>
    <managingEditor>cjcraft@mail.com</managingEditor>
    <webMaster>cjcraft@mail.com</webMaster>
    <item>
      <trackback:ping>http://www.cjcraft.com/blog/Trackback.aspx?guid=7b384735-c541-4952-ae82-8fe2dc1d28d1</trackback:ping>
      <pingback:server>http://www.cjcraft.com/blog/pingback.aspx</pingback:server>
      <pingback:target>http://www.cjcraft.com/blog/PermaLink,guid,7b384735-c541-4952-ae82-8fe2dc1d28d1.aspx</pingback:target>
      <dc:creator>Chris Craft</dc:creator>
      <wfw:comment>http://www.cjcraft.com/blog/CommentView,guid,7b384735-c541-4952-ae82-8fe2dc1d28d1.aspx</wfw:comment>
      <wfw:commentRss>http://www.cjcraft.com/blog/SyndicationService.asmx/GetEntryCommentsRss?guid=7b384735-c541-4952-ae82-8fe2dc1d28d1</wfw:commentRss>
      <slash:comments>3</slash:comments>
      <body xmlns="http://www.w3.org/1999/xhtml">
        <p>
One goal I have for the "30 Days of .NET" series is that I write each application
on the day I publish it. That really doesn't leave me any room to spare. I'm not sure
I can do it, but that's part of the fun and challenge. I do have a life. And between
family, friends, career, hobbies, and dreams, there isn't as much time in day as I
would like sometimes. One thing that would be useful for me is to know how much time
left I have in day to complete that day's application.
</p>
        <blockquote>
          <p>
            <strong>“When you can measure what you are speaking about, and express it in numbers,
you know something about it; but when you cannot express it in numbers, your knowledge
is of a meager and unsatisfactory kind; it may be the beginning of knowledge, but
you have scarcely in your thoughts advanced to the state of science.“<br />
- Lord Kelvin (William Thomson)</strong>
          </p>
          <p>
            <strong>
            </strong> 
</p>
          <p>
            <a href="http://www.cjcraft.com/blog/content/binary/WindowsLiveWriter/30D.NETWindowsMobileApplicationsDay01Min_F6A2/image_2.png">
              <img style="margin: 5px 15px 5px 5px" height="455" alt="image" src="http://www.cjcraft.com/blog/content/binary/WindowsLiveWriter/30D.NETWindowsMobileApplicationsDay01Min_F6A2/image_thumb.png" width="293" align="left" border="0" />
            </a>
          </p>
          <p>
            <strong>Minutes to Midnight</strong>  
</p>
        </blockquote>
        <p>
Simple, simple application, but I would say it is useful. At first I just had it say
2 hours, 45 minutes, and 38 seconds remaining. But I decided that was <strong>too</strong> simple.
I decided to use progress bars, because it adds a visual element that gives the application
a little, let's call it, "weight". 
</p>
        <p>
Then I looked at the application and felt it looked a little sterile, aka dull, dull,
dull. I decided the answer was to add some color. I did this by going to <a title="http://www.colourlovers.com/" href="http://www.colourlovers.com/">http://www.colourlovers.com/</a> and
browsing their color <a href="http://www.colourlovers.com/palettes/new">palettes</a>.
I was even able to search color palettes by using the color of the progress bar, which
I got by doing a screen capture and getting the hex color from <a href="http://www.getpaint.net/">Paint
.NET</a>.
</p>
        <p>
I didn't take me long to notice I had an issue. From my point of view, it's subjective,
the progress bar wasn't right. <strong>progressBarHours.Value = timeSpan.Hours;</strong> needed
to be <strong>progressBarHours.Value = 24 - timeSpan.Hours;</strong>. Once I did this
it was working like I wanted it to.
</p>
        <p>
I wasn't thrilled with the top progress bar. It was meant to show the total remaining
time left in the day, but I didn't have room for another label. But there is a saying, <a href="http://en.wikiquote.org/wiki/Voltaire">"The
perfect is the enemy of the good."</a> I think of this as, <strong>if you follow the
road to Perfect forever, you may never get to Good</strong>. If Another reason to
use the color scheme to help break the form into logical sections: yes, there is method
to my madness, well, at least sometimes.
</p>
        <p>
The only other thing I had to handle was <strong>total minutes left</strong>. Depending
on the math, it would sometimes display "<strong>X.666666666 of 1440 total minutes
left"</strong>. Fortunately, there is an easy fix for this, <a href="http://msdn.microsoft.com/en-us/library/0c899ak8.aspx">custom
numeric format strings</a>: <strong>timeSpan.TotalMinutes.ToString("#.0")</strong>.
</p>
        <p>
Download Executable: <a href="http://cid-0779b8ef58de4561.skydrive.live.com/self.aspx/Public/Minutes2Midnight.cab">minutes2Midnight.cab</a></p>
        <p>
Download Source Code: <a href="http://cid-0779b8ef58de4561.skydrive.live.com/self.aspx/Public/Minutes2Midnight.zip">minuates2Midnight.zip</a></p>
        <p>
          <strong>[Be sure to check out the </strong>
          <a href="http://www.christec.co.nz/blog/archives/350">
            <strong>C++
Edition</strong>
          </a>
          <strong> of 30 Days of Windows Mobile Applications] </strong>
        </p>
        <p>
 
</p>
        <p>
 
</p>
        <p>
 
</p>
        <p>
          <strong>Feedback</strong>
        </p>
        <p>
Ok guys, I really need everyone's help here. I need some ideas for applications to
write for the next 29 days. I have some, but I could use more. Also I'd love to hear
your thoughts on how we make this series even better. I always open to ideas, and
suggestions so please feel free to let me know what you think, because if I think
it is a good idea I will do it.
</p>
        <img width="0" height="0" src="http://www.cjcraft.com/blog/aggbug.ashx?id=7b384735-c541-4952-ae82-8fe2dc1d28d1" />
      </body>
      <title>30 Days of .NET [Windows Mobile Applications] - Day 01: Minutes to Midnight Countdown</title>
      <guid isPermaLink="false">http://www.cjcraft.com/blog/PermaLink,guid,7b384735-c541-4952-ae82-8fe2dc1d28d1.aspx</guid>
      <link>http://www.cjcraft.com/blog/2008/06/02/30DaysOfNETWindowsMobileApplicationsDay01MinutesToMidnightCountdown.aspx</link>
      <pubDate>Mon, 02 Jun 2008 05:48:15 GMT</pubDate>
      <description>&lt;p&gt;
One goal I have for the "30 Days of .NET" series is that I write each application
on the day I publish it. That really doesn't leave me any room to spare. I'm not sure
I can do it, but that's part of the fun and challenge. I do have a life. And between
family, friends, career, hobbies, and dreams, there isn't as much time in day as I
would like sometimes. One thing that would be useful for me is to know how much time
left I have in day to complete that day's application.
&lt;/p&gt;
&lt;blockquote&gt; 
&lt;p&gt;
&lt;strong&gt;“When you can measure what you are speaking about, and express it in numbers,
you know something about it; but when you cannot express it in numbers, your knowledge
is of a meager and unsatisfactory kind; it may be the beginning of knowledge, but
you have scarcely in your thoughts advanced to the state of science.“&lt;br&gt;
- Lord Kelvin (William Thomson)&lt;/strong&gt;
&lt;/p&gt;
&lt;p&gt;
&lt;strong&gt;&lt;/strong&gt;&amp;nbsp;
&lt;/p&gt;
&lt;p&gt;
&lt;a href="http://www.cjcraft.com/blog/content/binary/WindowsLiveWriter/30D.NETWindowsMobileApplicationsDay01Min_F6A2/image_2.png"&gt;&lt;img style="margin: 5px 15px 5px 5px" height="455" alt="image" src="http://www.cjcraft.com/blog/content/binary/WindowsLiveWriter/30D.NETWindowsMobileApplicationsDay01Min_F6A2/image_thumb.png" width="293" align="left" border="0"&gt;&lt;/a&gt;
&lt;/p&gt;
&lt;p&gt;
&lt;strong&gt;Minutes to Midnight&lt;/strong&gt;&amp;nbsp; 
&lt;/p&gt;
&lt;/blockquote&gt; 
&lt;p&gt;
Simple, simple application, but I would say it is useful. At first I just had it say
2 hours, 45 minutes, and 38 seconds remaining. But I decided that was &lt;strong&gt;too&lt;/strong&gt; simple.
I decided to use progress bars, because it adds a visual element that gives the application
a little, let's call it, "weight". 
&lt;/p&gt;
&lt;p&gt;
Then I looked at the application and felt it looked a little sterile, aka dull, dull,
dull. I decided the answer was to add some color. I did this by going to &lt;a title="http://www.colourlovers.com/" href="http://www.colourlovers.com/"&gt;http://www.colourlovers.com/&lt;/a&gt; and
browsing their color &lt;a href="http://www.colourlovers.com/palettes/new"&gt;palettes&lt;/a&gt;.
I was even able to search color palettes by using the color of the progress bar, which
I got by doing a screen capture and getting the hex color from &lt;a href="http://www.getpaint.net/"&gt;Paint
.NET&lt;/a&gt;.
&lt;/p&gt;
&lt;p&gt;
I didn't take me long to notice I had an issue. From my point of view, it's subjective,
the progress bar wasn't right. &lt;strong&gt;progressBarHours.Value = timeSpan.Hours;&lt;/strong&gt; needed
to be &lt;strong&gt;progressBarHours.Value = 24 - timeSpan.Hours;&lt;/strong&gt;. Once I did this
it was working like I wanted it to.
&lt;/p&gt;
&lt;p&gt;
I wasn't thrilled with the top progress bar. It was meant to show the total remaining
time left in the day, but I didn't have room for another label. But there is a saying, &lt;a href="http://en.wikiquote.org/wiki/Voltaire"&gt;"The
perfect is the enemy of the good."&lt;/a&gt; I think of this as, &lt;strong&gt;if you follow the
road to Perfect forever, you may never get to Good&lt;/strong&gt;. If Another reason to
use the color scheme to help break the form into logical sections: yes, there is method
to my madness, well, at least sometimes.
&lt;/p&gt;
&lt;p&gt;
The only other thing I had to handle was &lt;strong&gt;total minutes left&lt;/strong&gt;. Depending
on the math, it would sometimes display "&lt;strong&gt;X.666666666 of 1440 total minutes
left"&lt;/strong&gt;. Fortunately, there is an easy fix for this, &lt;a href="http://msdn.microsoft.com/en-us/library/0c899ak8.aspx"&gt;custom
numeric format strings&lt;/a&gt;: &lt;strong&gt;timeSpan.TotalMinutes.ToString("#.0")&lt;/strong&gt;.
&lt;/p&gt;
&lt;p&gt;
Download Executable: &lt;a href="http://cid-0779b8ef58de4561.skydrive.live.com/self.aspx/Public/Minutes2Midnight.cab"&gt;minutes2Midnight.cab&lt;/a&gt;
&lt;/p&gt;
&lt;p&gt;
Download Source Code: &lt;a href="http://cid-0779b8ef58de4561.skydrive.live.com/self.aspx/Public/Minutes2Midnight.zip"&gt;minuates2Midnight.zip&lt;/a&gt;
&lt;/p&gt;
&lt;p&gt;
&lt;strong&gt;[Be sure to check out the &lt;/strong&gt;&lt;a href="http://www.christec.co.nz/blog/archives/350"&gt;&lt;strong&gt;C++
Edition&lt;/strong&gt;&lt;/a&gt;&lt;strong&gt; of 30 Days of Windows Mobile Applications] &lt;/strong&gt;
&lt;/p&gt;
&lt;p&gt;
&amp;nbsp;
&lt;/p&gt;
&lt;p&gt;
&amp;nbsp;
&lt;/p&gt;
&lt;p&gt;
&amp;nbsp;
&lt;/p&gt;
&lt;p&gt;
&lt;strong&gt;Feedback&lt;/strong&gt;
&lt;/p&gt;
&lt;p&gt;
Ok guys, I really need everyone's help here. I need some ideas for applications to
write for the next 29 days. I have some, but I could use more. Also I'd love to hear
your thoughts on how we make this series even better. I always open to ideas, and
suggestions so please feel free to let me know what you think, because if I think
it is a good idea I will do it.
&lt;/p&gt;
&lt;img width="0" height="0" src="http://www.cjcraft.com/blog/aggbug.ashx?id=7b384735-c541-4952-ae82-8fe2dc1d28d1" /&gt;</description>
      <comments>http://www.cjcraft.com/blog/CommentView,guid,7b384735-c541-4952-ae82-8fe2dc1d28d1.aspx</comments>
      <category>.Net Programming</category>
      <category>30 Days of .Net</category>
      <category>compact framework</category>
      <category>cool</category>
      <category>MVP</category>
      <category>pocket pc</category>
      <category>programming</category>
      <category>windows mobile</category>
    </item>
  </channel>
</rss>