2013年7月28日 星期日

統一發票 102年05-06月中獎號碼


102年01-02月中獎號碼                                                                                  102年03-04月中獎號碼
獎別 中獎號碼
特別獎
1,000 萬元
40148354
同期統一發票收執聯8位數號碼與上列號碼相同者獎金1,000 萬元
特獎
200 萬元
64348046
同期統一發票收執聯8位數號碼與上列號碼相同者獎金200 萬元
頭獎
20 萬元
64782404、88904036、17250629
同期統一發票收執聯8位數號碼與上列號碼相同者獎金20 萬元
二獎
4 萬元
同期統一發票收執聯末7 位數號碼與頭獎中獎號碼末7 位相同者各得獎金4 萬元
三獎
1 萬元
同期統一發票收執聯末6 位數號碼與頭獎中獎號碼末6 位相同者各得獎金1 萬元
四獎
4 千元
同期統一發票收執聯末5 位數號碼與頭獎中獎號碼末5 位相同者各得獎金4 千元
五獎
1 千元
同期統一發票收執聯末4 位數號碼與頭獎中獎號碼末4 位相同者各得獎金1 千元
六獎
2 百元
同期統一發票收執聯末3 位數號碼與頭獎中獎號碼末3 位相同者各得獎金2 百元
增開六獎
2 百元
516
同期統一發票收執聯末3 位數號碼與上列號碼相同者各得獎金2 百元
領獎期間自102年08月6日起至102年11月5日止

2013年6月20日 星期四

[Windows 8] How to set TextBlock and TextBox to wrap in XAML

TextBlock and TextBox by setting TextWrapping = "Wrap" attribute to make the text exceeds the width of the control automatically wrap. The default is nowrap.
<TextBlock HorizontalAlignment="Left" TextWrapping="Wrap" Text="TextBlock" VerticalAlignment="Top"/>


2013年6月18日 星期二

[Windows 8] How to check windows 8 UI modes by C#

Sample:

using Windows.UI.ViewManagement;

private void pageRoot_SizeChanged(object sender, SizeChangedEventArgs e)
{
    ApplicationViewState viewState = ApplicationView.Value;
    if (viewState == ApplicationViewState.Filled)
    {
        System.Diagnostics.Debug.WriteLine("viewState is Filled");
    }
    else if (viewState == ApplicationViewState.FullScreenLandscape)
    {
        System.Diagnostics.Debug.WriteLine("viewState is FullScreenLandscape");
    }
    else if (viewState == ApplicationViewState.Snapped)
    {
        System.Diagnostics.Debug.WriteLine("viewState is Snapped");
    }
    else if (viewState == ApplicationViewState.FullScreenPortrait)
    {
        System.Diagnostics.Debug.WriteLine("viewState is FullScreenPortrait");
    }
    else
    {
        System.Diagnostics.Debug.WriteLine("viewState is something unexpected");
    }
}

[Windows 8] How to create a circle mask image with XAML

The example creates an ImageBrush and sets the ImageSource to an image named people.png, which you must include as a resource in the app. The ImageBrush then paints the area defined by an Ellipse shape.
<Ellipse Height="200" Width="200"> 
    <Ellipse.Fill> 
        <ImageBrush ImageSource="people.png" /> 
    </Ellipse.Fill> 
</Ellipse>

Result:

Reference:
Quickstart: Using brushes (Windows Store apps using C#/VB/C++ and XAML)

2013年6月4日 星期二

[DirectX] Solution: Error code S1023 installing DirectX SDK on Windows 7

The solution:
1. Remove the Visual C++ 2010 Redistributable Package version 10.0.40219 (Service Pack 1) from the system (both x86 and x64 if applicable). This can be easily done via a command-line with administrator rights:
    MsiExec.exe /passive /X{F0C3E5D1-1ADE-321E-8167-68EF0DE699A5}
    MsiExec.exe /passive /X{1D8E6291-B0D5-35EC-8441-6616F567A0F7}

2. Install the DirectX SDK (June 2010)

3. Reinstall the Visual C++ 2010 Redistributable Package version 10.0.40219 (Service Pack 1). On an x64 system, you should install both the x86 and x64 versions of the C++ REDIST. Be sure to install the most current version available, which at this point is the KB 2565063 with a security fix.

Reference:
Known Issue: DirectX SDK (June 2010) Setup and the S1023 error

2013年5月30日 星期四

[Windows 8] How to show message dialog in Windows 8 store app

You can use the MessageDialog class to Represents a dialog.
    public sealed class MessageDialog : Object
If you don't specify any commands, then a default command is added to close the dialog.

Sample

private async void testButton_Click(object sender, RoutedEventArgs e)
{
    // Create the message dialog and set its content
    var messageDialog = new MessageDialog("No internet connection has been found.");

    // Show the message dialog
    await messageDialog.ShowAsync();
}
Result:

You want to add custom commands by Commands.Add.

Sample

private async void testButton_Click(object sender, RoutedEventArgs e)
{
    // Create the message dialog and set its content
    var messageDialog = new MessageDialog("No internet connection has been found.");

    // Add commands and set their callbacks; both buttons 
    // use the same callback function instead of inline event handlers
    messageDialog.Commands.Add(new UICommand("Try again", 
        new UICommandInvokedHandler(this.doTryAgain)));
    messageDialog.Commands.Add(new UICommand("Close",
        new UICommandInvokedHandler(this.doClose)));

    // Set the command that will be invoked by default
    messageDialog.DefaultCommandIndex = 0;

    // Set the command to be invoked when escape is pressed
    messageDialog.CancelCommandIndex = 1;

    // Show the message dialog
    await messageDialog.ShowAsync();
}

private void doTryAgain(IUICommand command)
{
    // do something
}

private void doClose(IUICommand command)
{
    // do something
}

Result:

Reference:
MessageDialog class

2013年5月28日 星期二

統一發票 102年03-04月中獎號碼


獎別 中獎號碼
特別獎
1,000 萬元
13393774
同期統一發票收執聯8位數號碼與上列號碼相同者獎金1,000 萬元
特獎
200 萬元
25894576
同期統一發票收執聯8位數號碼與上列號碼相同者獎金200 萬元
頭獎
20 萬元
43792479、01973003、71347425
同期統一發票收執聯8位數號碼與上列號碼相同者獎金20 萬元
二獎
4 萬元
同期統一發票收執聯末7 位數號碼與頭獎中獎號碼末7 位相同者各得獎金4 萬元
三獎
1 萬元
同期統一發票收執聯末6 位數號碼與頭獎中獎號碼末6 位相同者各得獎金1 萬元
四獎
4 千元
同期統一發票收執聯末5 位數號碼與頭獎中獎號碼末5 位相同者各得獎金4 千元
五獎
1 千元
同期統一發票收執聯末4 位數號碼與頭獎中獎號碼末4 位相同者各得獎金1 千元
六獎
2 百元
同期統一發票收執聯末3 位數號碼與頭獎中獎號碼末3 位相同者各得獎金2 百元
增開六獎
2 百元
997
同期統一發票收執聯末3 位數號碼與上列號碼相同者各得獎金2 百元
領獎期間自102年06月6日起至102年09月5日止