“WEI Share” 分享Windows 7 Experience Index

     众所周知在Windows 7 中我们可以通过右键“我的电脑”->“属性”查看系统性能综合得分。这个分数包含了Processor、Memory、Graphics、Gaming Graphics、Hard drive 五方面性能测评分数。CodePlex 中有一个叫做“WEI Share” 的项目,涉及WPF、WCF、Silverlight、Azure 多种.NET 技术。通过该软件不但可以获得计算机性能分数,还能够将本地数据分享到社区。例如,WEI Share 云端服务器、Facebook。

System

Score

软件使用

     应用程序既可以到WEI Share 网站直接下载使用,也可以下载源代码编译生成,大多数Dev可能都喜欢后者。运行程序后因个人机器不同可能会提示需要重新测评计算机性能。

测评过程软件会调用C:\Windows\System32\WinSAT.ext 对系统各项性能指标进行测试。

 

     漫长的等待后,最终通过GetLatestWinSATFileInfo 方法得到C:\Windows\Performance\WinSAT\DataStore 目录中刚刚完成的最新测评数据。

public static System.IO.FileInfo GetLatestWinSATFileInfo()
{
    // Check if the computer has a \WinSAT dir.
    if (System.IO.Directory.Exists(Helpers.Globals.WinSatDataStoreFolderPath))
    {
        // Because the program makes a new XML file on every update of the score,
        // we need to calculate the most recent, just incase the owner has upgraded.

        System.IO.DirectoryInfo xmlFolder = new System.IO.DirectoryInfo(Helpers.Globals.WinSatDataStoreFolderPath);
        DateTime lastAccessTime = DateTime.MinValue;

        return xmlFolder.GetFiles("*.WinSAT.xml").ToList().OrderByDescending(i => i.Name).FirstOrDefault();
    }

    return null;
}

分享WEI 数据

     在上图分数列表右侧有两个按键“add to WEI Share”和“post to facebook”,提供了将测评数据分享到“WEI Share” 或“Facebook”的功能。程序通过WCF 将数据上传到由Silverlight 开发的WEI Share 云端服务器(感兴趣的朋友可以下载源码自行研究)。在该站点我们可以参考其他分值测评数据的配置信息。

9

也可以将数据发送到个人Facebook 分享给好友参考。

7

8 

相关参考

WEI Share
http://weishare.cloudapp.net/

http://weishare.codeplex.com/

Channel9 Video

http://channel9.msdn.com/posts/LarryLarsen/WEI-Share-Share-you-Windows-7-Experience-Index/

posted @ 2010-06-11 14:04  Gnie  阅读(3918)  评论(27编辑  收藏  举报
Copyright © 2010 Gnie