2013年10月20日 星期日

[C#]About the way of trace the value of Rectangle.Fill //關於追蹤Rectangle.Fill值的方法

      我最近在研究用C#跟XAML開發 Windows phone APP, 不過遇到了些困難, 其中一個就是我找不到可以直接追蹤Rectangle.Fill值的方法

      I study of Windows phone APP development with C# and XAML nearly, but I experience some troubles, one of them is we have no way to trace to the value of Rectangle.Fill immediately.

      我能理解設計者必須站在高處為開發者考慮通用的功能;矩形不只能填充單一色彩, 也能填充漸層甚至更複雜的圖案, 所以要設計一個參數或者方法去得顏色的值是很困難的

      I can understand that designer need concern the general function for developers; the rectangle not only could be filled with one color,  but also could be filled with linear gradient or even more complicated picture, so it's hard to design a property or a method for show the value of color.

      不過我的要求其實很單純, 我只是要取得Rectangle.Fill的值, 我們只能給Rectangle.Fill設一種顏色對吧?不需要複雜的方法去比較每一個像素, 只需要一個參數去儲存色碼, 為什麼我們沒有方法去追蹤Fill的值呢?

2013年10月8日 星期二

[Java]Alarm Clock with Multi-Thread //多執行緒實做鬧鐘


我試著用多執行緒來實作鬧鐘,如下:
I try to build an alarm clock with multi-thread, as below:

Interface

1. Time column: Show the time now.
2. Countdown column: For input the time of countdown number.
3. Button: For start/stop countdown or stop alarm.