2009年9月28日 星期一

MsoTriState Enumeration

http://msdn.microsoft.com/en-us/library/aa432714.aspx

Name Value Description
msoCTrue 1 Not supported.
msoFalse 0 False.
msoTriStateMixed -2 Not supported.
msoTriStateToggle -3 Not supported.
msoTrue -1 True.

Open Excel 很難找

很難找到 記錄起來
http://msdn.microsoft.com/zh-tw/library/microsoft.office.interop.excel.workbooks.open(office.11).aspx

Parameters
Filename
Required String. The file name of the workbook to be opened.

UpdateLinks
Optional Object. Specifies the way links in the file are updated. If this argument is omitted, the user is prompted to specify how links will be updated. Otherwise, this argument is one of the values listed in the following table.

Value
Meaning
1
User specifies how links will be updated
2
Never update links for this workbook on opening
3
Always update links for this workbook on opening
If Microsoft Excel is opening a file in the WKS, WK1, or WK3 format and the UpdateLinks argument is 2, Microsoft Excel generates charts from the graphs attached to the file. If the argument is 0, no charts are created.

ReadOnly
Optional Object. True to open the workbook in read-only mode.

Format
Optional Object. If Microsoft Excel is opening a text file, this argument specifies the delimiter character, as shown in the following table. If this argument is omitted, the current delimiter is used.

Value
Delimiter
1
Tabs
2
Commas
3
Spaces
4
Semicolons
5
Nothing
6
Custom character (see the Delimiter argument)
Password
Optional Object. A string that contains the password required to open a protected workbook. If this argument is omitted and the workbook requires a password, the user is prompted for the password.

WriteResPassword
Optional Object. A string that contains the password required to write to a write-reserved workbook. If this argument is omitted and the workbook requires a password, the user will be prompted for the password.

IgnoreReadOnlyRecommended
Optional Object. True to have Microsoft Excel not display the read-only recommended message (if the workbook was saved with the Read-Only Recommended option).

Origin
Optional Object. If the file is a text file, this argument indicates where it originated (so that code pages and Carriage Return/Line Feed (CR/LF) can be mapped correctly). Can be one of the following XlPlatform constants: xlMacintosh, xlWindows, or xlMSDOS. If this argument is omitted, the current operating system is used.

Delimiter
Optional Object. If the file is a text file and the Format argument is 6, this argument is a string that specifies the character to be used as the delimiter. For example, use Chr(9) for tabs, use "," for commas, use ";" for semicolons, or use a custom character. Only the first character of the string is used.

Editable
Optional Object. If the file is a Microsoft Excel 4.0 add-in, this argument is True to open the add-in so that it’s a visible window. If this argument is False or omitted, the add-in is opened as hidden, and it cannot be unhidden. This option doesn't apply to add-ins created in Microsoft Excel 5.0 or later. If the file is an Excel template, use True to open the specified template for editing or False to open a new workbook based on the specified template. The default value is False.

Notify
Optional Object. If the file cannot be opened in read/write mode, this argument is True to add the file to the file notification list. Microsoft Excel will open the file as read-only, poll the file notification list, and then notify the user when the file becomes available. If this argument is False or omitted, no notification is requested, and any attempts to open an unavailable file will fail.

Converter
Optional Object. The index of the first file converter to try when opening the file. The specified file converter is tried first; if this converter doesn’t recognize the file, all other converters are tried. The converter index consists of the row numbers of the converters returned by the FileConverters property.

AddToMru
Optional Object. True to add this workbook to the list of recently used files. The default value is False.

Local
Optional Object. True saves files against the language of Microsoft Excel (including control panel settings). False (default) saves files against the language of Visual Basic for Applications (VBA) (which is typically U.S. English unless the VBA project where Workbooks.Open is run from is an old internationalized XL5/95 VBA project).

CorruptLoad
Optional Object. Can be one of the following constants: xlNormalLoad, xlRepairFile, and xlExtractData. The default behavior if no value is specified is usually normal, but may be safe load or data recovery if Excel has already attempted to open the file. The first attempt is normal. If Excel stops operating while opening the file, the second attempt is safe load. If Excel again stops operating, the next attempt is data recovery.

2009年9月25日 星期五

98年7月、8月統一發票中獎號碼單

資料來源 : http://www.etax.nat.gov.tw/wSite/ct?xItem=60042&ctNode=10715

98年7月、8月統一發票中獎號碼單
月份

7月 ~8 月

特獎

04345144
36415574
61875889

同期統一發票收執聯 8 位數號碼與上列號碼相同者獎金 200 萬元

頭獎

05757045
86551938
90253351

同期統一發票收執聯末 3 位數號碼與頭獎中獎號碼末 3 位相同者各得獎金 2 百元

328








1、領獎期間自98年10月6日起至99年1月5日止,請中獎人填妥領獎收據並在收據上粘貼0.4%印花稅票(中五獎以上者), 攜帶國民身分證及中獎統一發票收執聯兌領獎金。中特獎、頭獎、二獎、三獎者請向各直轄市及各縣、市經指定之郵局領取獎金; 中四獎、五獎、六獎者請向各地郵局兌獎。

2、統一發票收執聯未依規定載明金額者,不得領獎。

3、統一發票買受人為政府機關、公營事業、公立學校、部隊及營業人者,不得領獎。

4、中四獎以上者,依規定應由發獎單位扣繳20﹪所得稅款。

5、中獎之統一發票,每張按其最高中獎獎別限領1個獎金。

6、其他有關領獎事項均依 「 統一發票給獎辦法 」 規定辦理。

7、若有任何兌獎疑義,請洽詢服務專線電話:(02)2396-1651

2009年9月11日 星期五

獻給所有未婚,將要結婚,和已婚的好朋友!!

我的母親是個非常好的人,自小,我就看到她努力地維持一個家。
她總是在清晨五時起床,煮一鍋熱騰騰的稀飯給父親吃,
因為父親胃不好,早餐只能吃稀飯。
然後,還要煮一鍋乾飯給孩子吃,因為孩子正在發育,
需要吃乾飯,上學一天才不會餓。

每個星期,母親會把榻榻米搬出去曬,曬出暖暖的太陽香。
每天下午,母親總是彎著腰,刷著鍋子,
我們家的鍋子每一個都可以當鏡子用,完全沒有一點污垢。
晚上,她努力蹲在地上擦地板,一寸一寸仔細地擦拭,
家裡的地板比別人家的床頭還乾淨,打著赤腳也找不到一絲灰塵。

我母親是個認真辛勞的好女人。
然而,在我父親的眼中,她卻不是一個好伴侶。

我成長過程中,父親不只一次地表示他在婚姻中的孤單,不被瞭解。
我的父親是個負責的男人。
他不抽煙、不喝酒,工作認真,每天準時上下班,
暑假還安排功課表,安排孩子們的作息,
他是個盡責的父親,督促孩子在功課上有所成就。
他喜歡下棋、寫書法,沉浸在古書的世界。
我的父親是個好男人,在孩子們眼中,他就像天一樣大,保護我們、教育我們。

只是,在我母親的眼中,他也不是一個好伴侶,
我成長的過程中,我經常看到母親在院子的角落中,暗暗無聲地掉淚。
父親用語言,母親用行動,表達了他們在婚姻中所面對的痛苦。

成長的過程中,我看到、也聽到父親與母親在婚姻中的無奈,
也看到、感受到他們是如此好的男人與女人,他們值得一椿好婚姻。
可惜的是,父親在世的歲月中,他們彼此的婚姻生活都在挫折中度過,
而我,也一直在困惑中成長,我問自己:「兩個好人為什麼沒有好的婚姻﹖」

自以為是的付出

我長大後,進入婚姻,漸漸了解這個問題的答案。
在婚姻的初期,我就像母親一樣,努力持家,努力地刷鍋子、擦地板,
認真地為自己的婚姻而努力。
奇怪的是,我不快樂;看看我的先生,似乎他也不快樂。
我心中想,大概是地板不夠乾淨,飯菜燒得不夠好,於是,
我更努力擦地板,用心做飯。
似乎,我們兩個人還是不快樂。
直到有一天,我正忙著擦地板時,先生說﹕「老婆,來陪我聽一下音樂﹗」
我不悅地說﹕「沒看到還有一大半的地方沒有擦﹗」
這句話一說出口,我呆住了,好熟悉的一句話,
在我父親母親的婚姻中,母親也經常這樣對父親說。
我正在重演父母親的婚姻,也重複他們在婚姻中的不快樂。
有一些領悟出現在我的心中。
「你要的是﹖」我停下手邊的工作,看著先生,想到我父親.....
他一直在婚姻中得不到他要的陪伴,母親刷鍋子的時間都比陪他的時間長。
不斷地做家事,是母親維持婚姻的方法,她給父親一個乾淨的家,
卻從未陪伴他,她忙著做家事,她用她的方法在愛父親,這個方法是「做家事」。
而我,我也用我的方法在愛著我的先生。
我的方法也是母親的方法,我的婚姻好像也在走向同一個故事
「兩個好人卻沒有好婚姻。」
我的領悟使我做了不一樣的選擇。

停下手邊的工作,坐到先生的身邊,陪他聽音樂,
遠遠地看著地上擦地板的抹布,像是看著母親的命運。
我問先生﹕「你需要什麼﹖」
「我需要妳陪我聽聽音樂,家裡髒一點沒關係呀,
以後幫妳請個傭人,妳就可以陪我了﹗」先生說。
「我以為你需要家裡乾淨,有人煮飯給你吃,有人為你洗衣服.....」
我一口氣說了一串應該是他需要的事。
「那些都是次要的呀﹗」先生說。「我最希望妳陪陪我。」
原來我作了許多白工,這個結果實在令我大吃一驚。
我們繼續分享彼此的需要,才發現他也做了不少白工,
我們都用自己的方式在愛對方,而不是對方的方式。

幸福的路徑

自此以後,我列了一張先生的需要表,把它放在書桌前,
他也列了一張我的需求表,放在他的書桌前。
洋洋灑灑十幾項的需求,像是有空陪對方聽音樂、有機會抱抱對方、每天早上kiss拜拜。

有些項目比較容易做到,有些項目比較難,像是「聽我說話,不要給建議。」
這是先生的需要。如果我給他建議,他說他會覺得自己像笨蛋。
我想,這真是男人的面子問題。
我也學著不給建議,除非他問我,否則我就只是傾聽,順服到底,連走錯路時也一樣。
這對我實在是一條不容易學習的路,不過,比擦地板要輕鬆多了,
而我們在需求的滿足中,婚姻也愈來愈有活力。
在我累的時候,我就選擇一些容易的項目做,像是「放一首放鬆音樂」,
自己有力氣的時候就規劃「一次外地旅遊」這樣的事情。
有趣的是,「到植物園散步」是我們的共同項目、共同需求,
每次婚姻有爭吵,去到植物園,總能安慰彼此的心靈。
其實,這也可想而知,原本我們就是因為對植物園的喜愛而相知相惜,
一起走入婚姻,回到園子就會回到多年前彼此相愛的心情。
問對方:「你要什麼?」這句話開啟了婚姻另一個幸福之路。
兩個好人終於走上幸福之路。
現在,我也知道父母親的婚姻為何無法幸福,
他們都太執著用「自己」的方法愛對方,而不是用「對方」的方式愛另一半。
自己累得半死,對方還感受不到,最後面對婚姻的期待,也就灰心而死了。
既然上帝創造婚姻,我想,每個人都值得擁有一個好婚姻,
只要方法用對,作「對方要的﹗」而非自己「想給的﹗」
好婚姻,絕對是可預期的。

2009年9月10日 星期四

Static

常常記不起來,還是先Blog 起來好了
Sample 比較容易懂


Static Constructors
public class Bus
{
// Static constructor:
static Bus()
{
System.Console.WriteLine("The static constructor invoked.");
}

public static void Drive()
{
System.Console.WriteLine("The Drive method invoked.");
}
}

A slightly more informative example would be:
static void Main()
{
Bus.Drive();
Bus.Drive();
}
which gives the output:
The static constructor invoked.
The Drive method invoked.
The Drive method invoked.
Thus showing that the constructor is only called once, even though 'Drive()' was called twice.




***Static Variables***
Please enter 5 numbers to be summed
Enter a number: 12
The current total is 12
Enter a number: 23
The current total is 35
Enter a number: 34
The current total is 69
Enter a number: 45
The current total is 114
Enter a number: 56
The current total is 170
Program completed