介紹
重新想象 Windows 8 Store Apps 之 通知
Tile - 基本應用參見 http://www.cnblogs.com/webabcd/archive/2013/06/17/3139740.html
Tile - 全部 Tile 模板
Tile - 在一個 Tile 上循環顯示多個 TileNotification
Tile - 一個 app 多個 Tile
Tile - 按計劃更新 Tile 通知, 輪詢服務端以更新 Tile 通知
示例
1、顯示 Tile 的全部 46 種模板
Notification/Tile/AllTemplates.xaml
<Page
x:Class="XamlDemo.Notification.Tile.AllTemplates"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:local="using:XamlDemo.Notification.Tile"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
mc:Ignorable="d">
<Grid Background="Transparent">
<Grid.Resources>
<Style x:Key="ItemTitleStyle" TargetType="TextBlock">
<Setter Property="FontSize" Value="14.667"/>
</Style>
<ItemsPanelTemplate x:Key="StoreFrontGridItemsPanelTemplate">
<WrapGrid MaximumRowsOrColumns="3" VerticalChildrenAlignment="Top" HorizontalChildrenAlignment="Left"/>
</ItemsPanelTemplate>
<Style x:Key="StoreFrontTileStyle" TargetType="GridViewItem">
<Setter Property="FontFamily" Value="Segoe UI" />
<Setter Property="Height" Value="300" />
<Setter Property="Width" Value="260" />
<Setter Property="Padding" Value="0" />
<Setter Property="Margin" Value="0" />
<Setter Property="HorizontalContentAlignment" Value="Left" />
<Setter Property="VerticalContentAlignment" Value="Top" />
<Setter Property="BorderThickness" Value="0"/>
<Setter Property="TabNavigation" Value="Local" />
</Style>
<DataTemplate x:Key="StoreFrontTileTemplate">
<Grid HorizontalAlignment="Left" Background="Transparent">
<StackPanel Orientation="Vertical">
<TextBlock TextWrapping="Wrap" VerticalAlignment="Center" Text="{Binding FileName}" HorizontalAlignment="Left" />
<Image Source="{Binding Path}" Stretch="None" VerticalAlignment="Center" HorizontalAlignment="Left" Margin="0,10,0,0"/>
</StackPanel>
</Grid>
</DataTemplate>
</Grid.Resources>
<!--顯示 46 種不同的 Tile 模板-->
<GridView x:Name="gridView" Margin="120 0 0 0"
ItemTemplate="{StaticResource StoreFrontTileTemplate}"
ItemContainerStyle="{StaticResource StoreFrontTileStyle}"
ItemsPanel="{StaticResource StoreFrontGridItemsPanelTemplate}"
BorderBrush="LightGray" VerticalAlignment="Top"
ScrollViewer.VerticalScrollBarVisibility="Auto"
ScrollViewer.HorizontalScrollBarVisibility="Auto"
SelectionMode="None" />
</Grid>
</Page>
Notification/Tile/AllTemplates.xaml.cs
/*
* 顯示 Tile 的全部 46 種模板
*/
using System;
using System.Linq;
using Windows.ApplicationModel;
using Windows.UI.Xaml.Controls;
using Windows.UI.Xaml.Navigation;
namespace XamlDemo.Notification.Tile
{
public sealed partial class AllTemplates : Page
{
public AllTemplates()
{
this.InitializeComponent();
}
protected async override void OnNavigatedTo(NavigationEventArgs e)
{
// XamlDemo/Notification/Tile/TemplateDemo 文件夾內 46 張圖片分別用於演示 Tile 的 46 種模板
var folder = await Package.Current.InstalledLocation.GetFolderAsync(@"Notification\Tile\TemplateDemo");
var files = await folder.GetFilesAsync();
var dataSource = from p in files
select new
{
FileName = p.DisplayName,
Path = "ms-appx:///Notification/Tile/TemplateDemo/" + p.Name
};
gridView.ItemsSource = dataSource;
}
}
}
2、演示 Tile 通知隊列的應用,每個 Tile 最多可循環顯示 5 個不同的 TileNotification
Notification/Tile/Queue.xaml
<Page
x:Class="XamlDemo.Notification.Tile.Queue"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:local="using:XamlDemo.Notification.Tile"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
mc:Ignorable="d">
<Grid Background="Transparent">
<StackPanel Margin="120 0 0 0">
<TextBox Name="lblMsg" Height="100" TextWrapping="Wrap" AcceptsReturn="True" FontSize="14.667" Margin="0 0 10 0" />
<Button Name="btnSendNewTile" Content="發送一個新的 Tile 通知" Click="btnSendNewTile_Click_1" Margin="0 10 0 0" />
</StackPanel>
</Grid>
</Page>
Notification/Tile/Queue.xaml.cs
/*
* 演示 Tile 通知隊列的應用,每個 Tile 最多可循環顯示 5 個不同的 TileNotification,隊列中的 TileNotification 按先進先出的原則維護
*
* TileNotification - Tile 通知
* Tag - Tile 通知的標識,同一個標識代表同一個通知,不同的標識代表不同的通知,最大 16 個字符
*
* TileUpdater - Tile 更新器
* EnableNotificationQueue() - 是否啟用 Tile 的隊列功能,默認是禁用的
*/
using NotificationsExtensions.TileContent;
using System;
using Windows.UI.Notifications;
using Windows.UI.Xaml;
using Windows.UI.Xaml.Controls;
using Windows.UI.Xaml.Navigation;
namespace XamlDemo.Notification.Tile
{
public sealed partial class Queue : Page
{
public Queue()
{
this.InitializeComponent();
}
private void btnSendNewTile_Click_1(object sender, RoutedEventArgs e)
{
// 生成一個隨機數
string randomString = new Random().Next(1000, 10000).ToString();
// 構造小 tile 數據
ITileSquareText04 squareTileContent = TileContentFactory.CreateTileSquareText04();
squareTileContent.TextBodyWrap.Text = randomString;
// 構造 tile 數據(包括大 tile 數據和小 tile 數據)
ITileWideText03 tileContent = TileContentFactory.CreateTileWideText03();
tileContent.TextHeadingWrap.Text = randomString;
tileContent.SquareContent = squareTileContent;
string tag = randomString;
// 創建 TileNotification,並指定其 Tag
TileNotification tileNotification = tileContent.CreateNotification();
tileNotification.Tag = tag;
// 更新指定的 TileNotification(不同的標識代表不同的通知,多個不同的通知會放到 Tile 隊列循環顯示,隊列最多支持 5 個 TileNotification)
TileUpdater tileUpdater = TileUpdateManager.CreateTileUpdaterForApplication();
tileUpdater.EnableNotificationQueue(true);
tileUpdater.Update(tileNotification);
lblMsg.Text = "Tag: " + tag;
lblMsg.Text += Environment.NewLine;
lblMsg.Text += tileContent.GetContent();
}
}
}
3、演示如何固定多個 Tile,即 SecondaryTile 的應用
Notification/Tile/MultipleTiles.xaml
<Page
x:Class="XamlDemo.Notification.Tile.MultipleTiles"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:local="using:XamlDemo.Notification.Tile"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
mc:Ignorable="d">
<Grid Background="Transparent">
<StackPanel Margin="120 0 0 0">
<TextBlock Name="lblMsg" FontSize="14.667" />
<Button Name="btnPinSecondaryTile" Content="固定一個新的 SecondaryTile" Click="btnPinSecondaryTile_Click_1" Margin="0 10 0 0" />
<Button Name="btnUpdateAllSecondaryTiles" Content="更新全部 SecondaryTile(不包括主 Tile)" Click="btnUpdateAllSecondaryTiles_Click_1" Margin="0 10 0 0" />
<Button Name="btnUpdateAllSecondaryTilesNotification" Content="更新全部 SecondaryTile 的 Tile 通知(不包括主 Tile)" Click="btnUpdateAllSecondaryTilesNotification_Click_1" Margin="0 10 0 0" />
<Button Name="btnClearAllSecondaryTiles" Content="清除全部 SecondaryTile(不包括主 Tile)" Click="btnClearAllSecondaryTiles_Click_1" Margin="0 10 0 0" />
</StackPanel>
</Grid>
</Page>
Notification/Tile/MultipleTiles.xaml.cs
/*
* 演示如何固定多個 Tile,即 SecondaryTile 的應用
* 當由 SecondaryTile 啟動 app 時,相關參數的獲取詳見:App.xaml.cs 中的 OnLaunched() 方法
*
* SecondaryTile - App 的其它 Tile
* TileId - SecondaryTile 的標識
* Arguments - 用戶單擊圖塊後,會啟動應用程序,同時帶著此參數
* ShortName - 在圖塊上顯示的名稱,其顯示在整個圖塊的左下角
* DisplayName - 在所有應用程序列表中顯示的名稱,圖塊的 ToolTip 也使用此值
* BackgroundColor - 背景色
* ForegroundText - 在圖塊上顯示的文字的顏色(Windows.UI.StartScreen.ForegroundText 枚舉)
* ForegroundText.Dark 或 ForegroundText.Light(默認值)
* Logo - 徽標
* WideLogo - 寬徽標
* SmallLogo - 小徽標
* TileOptions - 選項(flag 枚舉)
* None, ShowNameOnLogo, ShowNameOnWideLogo, CopyOnDeployment(用戶使用同一帳戶在另一台終端安裝此 app 時,會自動固定此 SecondaryTile)
*
* RequestCreateAsync(), RequestCreateForSelectionAsync() - 請求固定此 SecondaryTile,將會彈出一個確認框(可以指定此確認框的顯示位置)
* RequestDeleteAsync(), RequestDeleteForSelectionAsync() - 請求取消固定此 SecondaryTile,將會彈出一個確認框(可以指定此確認框的顯示位置)
* UpdateAsync() - 更新此 SecondaryTile(這裡不是更新 Tile 通知,而只是更新 SecondaryTile 對象的相關信息)
*
* Exists(string tileId) - 是否存在指定的 Tile(靜態方法)
* FindAllAsync() - 獲取此 app 固定到開始屏幕的所有 SecondaryTile 集合(靜態方法)
* FindAllAsync(string applicationId) - 獲取指定 app 的所有 SecondaryTile 集合(這裡指定的是
同一 package 內的其他 app 。注:一個 package 中可以有多個 app,但是目前無法通過商店審核)
* FindAllForPackageAsync() - 獲取此 app 所在 package 內的所有 SecondaryTile 集合(一個
package 中可以有多個 app,但是目前無法通過商店審核)
*
*
* TileUpdateManager - Tile 更新管理器
* CreateTileUpdaterForSecondaryTile(string tileId) - 為指定的 SecondaryTile 創建一個 Tile
更新器,返回 TileUpdater 類型的數據
*/
using NotificationsExtensions.TileContent;
using System;
using System.Collections.Generic;
using System.Threading.Tasks;
using Windows.UI.Notifications;
using Windows.UI.Popups;
using Windows.UI.StartScreen;
using Windows.UI.Xaml;
using Windows.UI.Xaml.Controls;
using Windows.UI.Xaml.Navigation;
using XamlDemo.Common;
namespace XamlDemo.Notification.Tile
{
public sealed partial class MultipleTiles : Page
{
public MultipleTiles()
{
this.InitializeComponent();
}
// 固定一個新的 SecondaryTile
private async void btnPinSecondaryTile_Click_1(object sender, RoutedEventArgs e)
{
Uri logo = new Uri("ms-appx:///Assets/Logo.png"); // 方塊圖塊的 Logo
Uri wideLogo = new Uri("ms-appx:///Assets/WideLogo.png"); // 寬圖塊的 Logo
Uri smallLogo = new Uri("ms-appx:///Assets/SmallLogo.png"); // 所有應用程序列表中的 Logo
string tileId = new Random().Next(1000, 10000).ToString();
// 創建一個 SecondaryTile 對象
SecondaryTile secondaryTile = new SecondaryTile(
tileId,
"ShortName",
"DisplayName",
"Arguments(TileId: " + tileId + ")",
TileOptions.ShowNameOnLogo | TileOptions.ShowNameOnWideLogo | TileOptions.CopyOnDeployment,
logo);
// 相關屬性的設置
secondaryTile.ForegroundText = ForegroundText.Light;
secondaryTile.SmallLogo = smallLogo;
secondaryTile.WideLogo = wideLogo;
// 請求固定此 SecondaryTile,並指定確認框的顯示位置
bool isPinned = await secondaryTile.RequestCreateForSelectionAsync(Helper.GetElementRect((FrameworkElement)sender), Placement.Below);
// 顯示此 App 的固定到開始屏幕的全部 SecondaryTile
await ShowAllTilesForApplication();
}
// 更新全部 SecondaryTile(注:此處用於更新 SecondaryTile 對象,而不是更新 Tile 通知)
private async void btnUpdateAllSecondaryTiles_Click_1(object sender, RoutedEventArgs e)
{
IReadOnlyList<SecondaryTile> tileList = await SecondaryTile.FindAllAsync();
foreach (SecondaryTile tile in tileList)
{
/*
* 此處無法直接修改 tile 對象,只有通過 new SecondaryTile(tile.TileId) 獲取到的 SecondaryTile 對象才能被修改,但是不能修改 ShortName 和 DisplayName 等參數
*/
SecondaryTile secondaryTile = new SecondaryTile(tile.TileId);
secondaryTile.WideLogo = new Uri("ms-appx:///Assets/Logo.png");
secondaryTile.Arguments = "Updated Arguments(TileId: " + tile.TileId + ")";
// 更新此 SecondaryTile
bool success = await secondaryTile.UpdateAsync();
}
}
// 更新全部 SecondaryTile 的 Tile 通知
private async void btnUpdateAllSecondaryTilesNotification_Click_1(object sender, RoutedEventArgs e)
{
IReadOnlyList<SecondaryTile> tileList = await SecondaryTile.FindAllAsync();
foreach (var tile in tileList)
{
ITileWideText04 tileContent = TileContentFactory.CreateTileWideText04();
tileContent.TextBodyWrap.Text = "hi webabcd";
ITileSquareText04 squareContent = TileContentFactory.CreateTileSquareText04();
squareContent.TextBodyWrap.Text = "hi webabcd";
tileContent.SquareContent = squareContent;
// 在指定的 SecondaryTile 上更新指定的 TileNotification
TileNotification tileNotification = tileContent.CreateNotification();
TileUpdater tileUpdater = TileUpdateManager.CreateTileUpdaterForApplication(tile.TileId);
tileUpdater.Update(tileNotification);
}
}
// 清除全部 SecondaryTile
private async void btnClearAllSecondaryTiles_Click_1(object sender, RoutedEventArgs e)
{
IReadOnlyList<SecondaryTile> tileList = await SecondaryTile.FindAllAsync();
foreach (var tile in tileList)
{
// 請求取消固定此 SecondaryTile,並指定確認框的顯示位置
bool isUnpinned = await tile.RequestDeleteForSelectionAsync(Helper.GetElementRect((FrameworkElement)sender), Placement.Below);
}
// 顯示此 App 的固定到開始屏幕的全部 SecondaryTile
await ShowAllTilesForApplication();
}
// 顯示此 App 固定到開始屏幕的全部 SecondaryTile
private async Task ShowAllTilesForApplication()
{
IReadOnlyList<SecondaryTile> tileList = await SecondaryTile.FindAllAsync();
lblMsg.Text += "此 app 的全部 SecondaryTile 的 tileId 列表: ";
foreach (var tile in tileList)
{
lblMsg.Text += tile.TileId + " ";
}
}
}
}
App.xaml.cs
protected async override void OnLaunched(LaunchActivatedEventArgs
args)
{
/*
* 注:當由主 Tile 啟動 app 時,args.TileId 的值為 Package.appxmanifest 中 <Application Id="Win8App" /> 所配置的值
*/
// 當由 SecondaryTile 啟動 app 時,顯示傳遞過來的參數
if (args.TileId != "Win8App")
{
await new Windows.UI.Popups.MessageDialog(args.Arguments).ShowAsync();
}
}
4、演示如何按計劃顯示 Tile 通知,以及如何輪詢服務端以更新 Tile 通知
Notification/Tile/ScheduledTile.xaml
<Page
x:Class="XamlDemo.Notification.Tile.ScheduledTile"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:local="using:XamlDemo.Notification.Tile"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
mc:Ignorable="d">
<Grid Background="Transparent">
<StackPanel Margin="120 0 0 0">
<!--顯示當前 app 的全部 ScheduledTileNotification 對象列表-->
<ListBox Name="listBox" Width="800" Height="300" HorizontalAlignment="Left">
<ListBox.ItemTemplate>
<DataTemplate>
<StackPanel Orientation="Horizontal">
<TextBlock Text="{Binding TileId}" VerticalAlignment="Center" />
<TextBlock Text="{Binding Text}" Margin="15 0 0 0" VerticalAlignment="Center" />
<HyperlinkButton Name="btnRemove" Content="刪除此 ScheduledTileNotification" Tag="{Binding TileId}" Margin="15 0 0 0" Click="btnRemove_Click_1"
/>
</StackPanel>
</DataTemplate>
</ListBox.ItemTemplate>
</ListBox>
<Button Name="btnScheduledTile" Content="ScheduledTileNotification 的 Demo(15 秒後更新指定的 Tile 通知)" Click="btnScheduledTile_Click_1" Margin="0 10 0 0" />
<Button Name="btnStartPeriodicUpdate" Content="啟動一個“輪詢服務端,而後更新 Tile”的任務" Click="btnStartPeriodicUpdate_Click_1" Margin="0 10 0 0" />
</StackPanel>
</Grid>
</Page>
Notification/Tile/ScheduledTile.xaml.cs
/*
* 演示如何按計劃顯示 Tile 通知,以及如何輪詢服務端以更新 Tile 通知
*
* ScheduledTileNotification - 按計劃顯示 Tile 通知
* Content - Tile 的內容,XmlDocument 類型的數據,只讀,其需要在構造函數中指定
* DeliveryTime - 顯示 Tile 通知的時間,只讀,其需要在構造函數中指定
* ExpirationTime - Tile 通知的過期時間,即如果系統在此屬性指定的時間到了之後還沒有更新對應的 Tile 通知,那麼之後也不要再更新了
* Id - ScheduledTileNotification 的標識
* Tag - Tile 通知的標識(Tile 的通知隊列用),同一個標識代表同一個通知,不同的標識代表不同的通知,最大 16 個字符
*
* TileUpdater - Tile 更新器
* AddToSchedule() - 將指定的 ScheduledTileNotification 添加到計劃列表
* RemoveFromSchedule() - 從計劃列表中移除指定的 ScheduledTileNotification
* GetScheduledTileNotifications() - 獲取當前 app 的全部 ScheduledTileNotification 集合
*
* StartPeriodicUpdate(Uri tileContent, DateTimeOffset startTime, PeriodicUpdateRecurrence requestedInterval) - 啟動一個“輪詢服務端,而後更新 Tile”的任務
* StartPeriodicUpdateBatch(IEnumerable<Uri> tileContents, DateTimeOffset startTime, PeriodicUpdateRecurrence requestedInterval) - 啟動一個“輪詢服務端,而後更新 Tile”的任務
* tileContent - Tile 通知的內容(xml 格式數據)的 uri 地址(指定多個則會循環顯示)
* startTime - 可以指定啟動此任務的時間
* requestedInterval - 輪詢服務端的周期
(Windows.UI.Notifications.PeriodicUpdateRecurrence 枚舉)
* HalfHour, Hour, SixHours, TwelveHours, Daily
* StopPeriodicUpdate() - 停止“輪詢服務端,而後更新 Tile”的任務
*/
using NotificationsExtensions.TileContent;
using System;
using System.Collections.Generic;
using Windows.UI.Notifications;
using Windows.UI.Xaml;
using Windows.UI.Xaml.Controls;
using Windows.UI.Xaml.Navigation;
namespace XamlDemo.Notification.Tile
{
public sealed partial class ScheduledTile : Page
{
public ScheduledTile()
{
this.InitializeComponent();
}
protected override void OnNavigatedTo(NavigationEventArgs e)
{
ShowScheduledTiles();
}
// 添加指定的 ScheduledTileNotification 到計劃列表中
private void btnScheduledTile_Click_1(object sender, RoutedEventArgs e)
{
ITileSquareText04 squareContent = TileContentFactory.CreateTileSquareText04();
squareContent.TextBodyWrap.Text = "ScheduledTileNotification Demo";
ITileWideText09 tileContent = TileContentFactory.CreateTileWideText09();
tileContent.TextHeading.Text = "ScheduledTileNotification Demo";
tileContent.TextBodyWrap.Text = "received: " + DateTime.Now.ToString("hh:mm:ss");
tileContent.SquareContent = squareContent;
// 15 秒後更新指定的 Tile 通知
ScheduledTileNotification tile = new ScheduledTileNotification(tileContent.GetXml(), DateTime.Now.AddSeconds(15));
string tileId = new Random().Next(1000, 10000).ToString();
tile.Id = tileId;
// 將指定的 ScheduledTileNotification 添加進計劃列表
TileUpdater tileUpdater = TileUpdateManager.CreateTileUpdaterForApplication();
tileUpdater.AddToSchedule(tile);
ShowScheduledTiles();
}
// 顯示當前 app 的全部 ScheduledTileNotification 列表
private void ShowScheduledTiles()
{
List<MyScheduledTile> dataSource = new List<MyScheduledTile>();
// 獲取當前 app 計劃列表中的全部 ScheduledTileNotification 對象列表
TileUpdater tileUpdater = TileUpdateManager.CreateTileUpdaterForApplication();
IReadOnlyList<ScheduledTileNotification> scheduledTiles = tileUpdater.GetScheduledTileNotifications();
int tileCount = scheduledTiles.Count;
for (int i = 0; i < tileCount; i++)
{
ScheduledTileNotification tile = scheduledTiles[i];
dataSource.Add(new MyScheduledTile()
{
TileId = tile.Id,
Text = tile.Content.GetElementsByTagName("text")[0].InnerText
});
}
listBox.ItemsSource = dataSource;
}
// 根據 TileId 刪除指定的 ScheduledTileNotification
private void btnRemove_Click_1(object sender, RoutedEventArgs e)
{
string tileId = (string)(sender as FrameworkElement).Tag;
// 獲取當前 app 計劃列表中的全部 ScheduledTileNotification 對象列表
TileUpdater tileUpdater = TileUpdateManager.CreateTileUpdaterForApplication();
IReadOnlyList<ScheduledTileNotification> scheduledTiles = tileUpdater.GetScheduledTileNotifications();
int tileCount = scheduledTiles.Count;
for (int i = 0; i < tileCount; i++)
{
if (scheduledTiles[i].Id == tileId)
{
// 從計劃列表中移除指定的 ScheduledTileNotification 對象
tileUpdater.RemoveFromSchedule(scheduledTiles[i]);
ShowScheduledTiles();
break;
}
}
}
class MyScheduledTile
{
public string TileId { get; set; }
public string Text { get; set; }
}
// 啟動一個“輪詢服務端,而後更新 Tile”的任務
private void btnStartPeriodicUpdate_Click_1(object sender, RoutedEventArgs e)
{
// 啟動一個循環更新 Tile 的任務,並指定 Tile 內容的數據源和輪詢周期
TileUpdater tileUpdater = TileUpdateManager.CreateTileUpdaterForApplication();
tileUpdater.StartPeriodicUpdate(new Uri("http://localhost:39629/TileContent.xml", UriKind.Absolute), PeriodicUpdateRecurrence.HalfHour);
// Tile 內容的數據源示例參見 WebServer 項目的 TileContent.xml 文件
// 此處僅用於演示,實際項目中此 Tile 內容通常是變化的
}
}
}
OK
[源碼下載]:http://files.cnblogs.com/webabcd/Windows8.rar