蘭嶼。岸邊有事

嗯嗯~~
希望是有人能看到這一篇…
蘭嶼。岸邊有事
待會去找找行政院還是某某報的信箱來丟好了….
應該會比較有效吧…
這種問題還是應該早點解決比較好,要不然,台灣又少一個地方可以玩了…
其實我想媒體應該可以固定(好吧,念在追八卦的人要很多的份上,”偶爾“也不錯)去追蹤一些在地在人的消息,像是,捐款哪裡去啦,某些事情的處理狀況啊…等等的,這樣會比較好吧.
免得像現在,要等到有人報說國庫還沒撥捐款下來,才在報,這就已經是太晚啦…

Google Talk

今天的熱門消息…逛了幾個 blog, 都有在報…
Google Talk
不過逛Forever geeks的時候看到,原來Google Talkjabber?!
看這幾篇文章:

應該是沒錯囉…
國內也有人提到這消息了
不過,我自己用gaim試的結果,目前還沒成功
設置方法如下:

Server: talk.google.com
Username: youremail@gmail.com
Password: yourpassword

這樣就行啦…

RFMaintainer 的 statechart (補)

昨天的RFMaintainer 的 statechart並沒有實作部份,今天補上…
你可以看到這些都是寫在 Form 裡面,並沒有跟 UI 切開….
這就是我疑問的地方…
不過對照圖之後,你會發現這樣的寫法很清楚…不會有補東牆挖西牆,東改一塊西改一塊的問題…

		#region State Chart Implementation.
private int _StateVariable = 0;
private int _StateVariable_A = 0;
private int _StateVariable_B = 0;
private int _StateVariable_C = 0;
/// 
/// State 1: Transient
/// 
private void go_state_1()
{
_StateVariable = 1;
if( txtConnectString.Text == "" )
go_state_2();
else
go_state_3();
}
/// 
/// State 2: Connection string null
/// 
private void go_state_2()
{
_StateVariable = 2;
// disable controls.
radioButton1.Enabled = false;
radioButton2.Enabled = false;
dtpFrom.Enabled = false;
dtpTo.Enabled = false;
cboType.Enabled = false;
txtPath.Enabled = false;
btnBrowse.Enabled = false;
btnExport.Enabled = false;
}
/// 
/// State 3: Connection string not null
/// 
private void go_state_3()
{
_StateVariable = 3;
// enable controls.
radioButton1.Enabled = true;
radioButton1.Checked = true;
radioButton2.Enabled = true;
cboType.Enabled = true;
txtPath.Enabled = true;
btnBrowse.Enabled = true;
go_state_4();
go_state_7();
go_state_10();
}
/// 
/// State 4: Region A: Transient
/// 
private void go_state_4()
{
_StateVariable_A = 4;
if( radioButton2.Checked )
go_state_5();
else if( radioButton1.Checked )
go_state_6();
}
/// 
/// State 5: Region A: "Period" checked
/// 
private void go_state_5()
{
_StateVariable_A = 5;
dtpFrom.Enabled = true;
dtpTo.Enabled = true;
}
/// 
/// State 6: Region A: "All" checked
/// 
private void go_state_6()
{
_StateVariable_A = 6;
dtpFrom.Enabled = false;
dtpTo.Enabled = false;
}
/// 
/// State 7: Region B: Transient
/// 
private void go_state_7()
{
_StateVariable_B = 7;
if( txtPath.Text == "" )
go_state_8();
else
go_state_9();
}
/// 
/// State 8: Region B: "output file" null
/// 
private void go_state_8()
{
btnExport.Enabled = false;
}
/// 
/// State 9: Region B: "output file" not null
/// 
private void go_state_9()
{
btnExport.Enabled = true;
}
/// 
/// State 10: Region C: "Export type" is XML
/// 
private void go_state_10()
{
_StateVariable_C = 10;
cboType.SelectedIndex = 0;
}
/// 
/// State 11: Export
/// 
/// 
private void go_state_11()
{
}
#endregion
#region UI independence routines
/// 
/// I don't consider this button in State chart.
/// And I am lazy to change....
/// 
/// 
private bool testConnection( string connectString )
{
}
private bool export( int type, DateTime dtFrom, DateTime dtTo, string outputFile )
{
}
#endregion
#region Event handler
private void btnExport_Click(object sender, System.EventArgs e)
{
int iType = 0;
if( radioButton1.Checked == true )
iType = 1;
else if( radioButton2.Checked == true )
iType = 2;
if( export( iType, dtpFrom.Value, dtpTo.Value, txtPath.Text ) )
MessageBox.Show( "Finished!" );
else
MessageBox.Show( "Fail!!" );
}
private void btnBrowse_Click(object sender, System.EventArgs e)
{
// Displays a SaveFileDialog so the user can save the Image
SaveFileDialog saveFileDialog1 = new SaveFileDialog();
saveFileDialog1.Filter = "XML file|*.xml";
saveFileDialog1.Title = "Save to XML File";
saveFileDialog1.ShowDialog();
saveFileDialog1.OverwritePrompt = true;
// If the file name is not an empty string open it for saving.
if(saveFileDialog1.FileName != "")
{
txtPath.Text = saveFileDialog1.FileName;
}
}
private void btnTest_Click(object sender, System.EventArgs e)
{
testConnection( txtConnectString.Text );
}
private void radioButton1_CheckedChanged(object sender, System.EventArgs e)
{
go_state_6();
}
private void radioButton2_CheckedChanged(object sender, System.EventArgs e)
{
go_state_5();
}
private void txtPath_TextChanged(object sender, System.EventArgs e)
{
go_state_7();
}
private void txtConnectString_TextChanged(object sender, System.EventArgs e)
{
go_state_1();
}
#endregion
}