原文:与众不同 windows phone (27) - Feature(特性)之搜索的可扩展性, 程序的生命周期和页面的生命周期, 页面导航, 系统状态栏

[索引页]
[源码下载]

与众不同 windows phone (27) - Feature(特性)之搜索的可扩展性, 程序的生命周期和页面的生命周期, 页面导航, 系统状态栏

作者:webabcd

介绍
与众不同 windows phone 7.5 (sdk 7.1) 之特性

  • 搜索的可扩展性
  • 程序的生命周期和页面的生命周期
  • 页面导航
  • 系统状态栏

示例
1、关于搜索的可扩展性
SearchExtensibility.xaml

  1. <phone:PhoneApplicationPage
  2. x:Class="Demo.Feature.SearchExtensibility"
  3. xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
  4. xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
  5. xmlns:phone="clr-namespace:Microsoft.Phone.Controls;assembly=Microsoft.Phone"
  6. xmlns:shell="clr-namespace:Microsoft.Phone.Shell;assembly=Microsoft.Phone"
  7. xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
  8. xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
  9. FontFamily="{StaticResource PhoneFontFamilyNormal}"
  10. FontSize="{StaticResource PhoneFontSizeNormal}"
  11. Foreground="{StaticResource PhoneForegroundBrush}"
  12. SupportedOrientations="Portrait" Orientation="Portrait"
  13. mc:Ignorable="d" d:DesignHeight="768" d:DesignWidth="480"
  14. shell:SystemTray.IsVisible="True">
  15.  
  16. <Grid x:Name="LayoutRoot" Background="Transparent">
  17.  
  18. <TextBlock VerticalAlignment="Top" TextWrapping="Wrap" Text="关于搜索的可扩展性:由于需要与“搜索”按钮的 bing 集成,而对于相关的 n 多 bing 特性中国又不支持,所以就不写 Demo 了" />
  19.  
  20. </Grid>
  21.  
  22. </phone:PhoneApplicationPage>

2、页面的生命周期
LifeCycle.xaml

  1. <phone:PhoneApplicationPage
  2. x:Class="Demo.Feature.LifeCycle"
  3. xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
  4. xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
  5. xmlns:phone="clr-namespace:Microsoft.Phone.Controls;assembly=Microsoft.Phone"
  6. xmlns:shell="clr-namespace:Microsoft.Phone.Shell;assembly=Microsoft.Phone"
  7. xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
  8. xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
  9. FontFamily="{StaticResource PhoneFontFamilyNormal}"
  10. FontSize="{StaticResource PhoneFontSizeNormal}"
  11. Foreground="{StaticResource PhoneForegroundBrush}"
  12. SupportedOrientations="Portrait" Orientation="Portrait"
  13. mc:Ignorable="d" d:DesignHeight="768" d:DesignWidth="480"
  14. shell:SystemTray.IsVisible="True">
  15.  
  16. <Grid x:Name="LayoutRoot" Background="Transparent">
  17. <StackPanel Orientation="Vertical">
  18.  
  19. <HyperlinkButton Content="导航到主界面" NavigateUri="/MainPage.xaml" />
  20.  
  21. <TextBlock Name="lblMsg" Text="请模拟器调试,查看 Output 窗口" />
  22.  
  23. </StackPanel>
  24. </Grid>
  25.  
  26. </phone:PhoneApplicationPage>

LifeCycle.xaml.cs

  1. /*
  2. * 演示页面的生命周期
  3. *
  4. * 应用程序的生命周期的演示详见:App.xaml 和 App.xaml.cs
  5. */
  6.  
  7. using System;
  8. using System.Collections.Generic;
  9. using System.Linq;
  10. using System.Net;
  11. using System.Windows;
  12. using System.Windows.Controls;
  13. using System.Windows.Documents;
  14. using System.Windows.Input;
  15. using System.Windows.Media;
  16. using System.Windows.Media.Animation;
  17. using System.Windows.Shapes;
  18. using Microsoft.Phone.Controls;
  19.  
  20. using System.Windows.Navigation;
  21. using System.Diagnostics;
  22.  
  23. namespace Demo.Feature
  24. {
  25. public partial class LifeCycle : PhoneApplicationPage
  26. {
  27. public LifeCycle()
  28. {
  29. InitializeComponent();
  30. }
  31.  
  32. // 导航进此页面时触发
  33. protected override void OnNavigatedTo(NavigationEventArgs e)
  34. {
  35. Debug.WriteLine("OnNavigatedTo");
  36.  
  37. // 当 NavigationMode.New 时由于是一个新的页面示例,所以只执行一次
  38. // 当 NavigationMode.Back, NavigationMode.Forward 时由于是从内存加载的,之前的页面状态都会被保留,所以加上之前注册的事件这里一共会执行两遍
  39. this.Loaded += delegate
  40. {
  41. MessageBox.Show("NavigationMode 为:" + e.NavigationMode.ToString() + ",看看我执行几次?");
  42. };
  43.  
  44. // 当 NavigationMode.New 时由于是一个新的页面示例,所以 State 中不会有数据
  45. // 当 NavigationMode.Back, NavigationMode.Forward 时由于是从内存加载的,所以 State 中可以获取到之前“OnNavigatedFrom”时保存的数据
  46. if (State.Keys.Contains("navigatedFromTime"))
  47. Debug.WriteLine("应用程序在 OnNavigatedFrom 时保存到状态字典的数据:navigatedFromTime - " + ((DateTime)this.State["navigatedFromTime"]).ToString("HH:mm:ss"));
  48. }
  49.  
  50. // 导航出此页面时触发
  51. protected override void OnNavigatedFrom(NavigationEventArgs e)
  52. {
  53. Debug.WriteLine("OnNavigatedFrom");
  54.  
  55. // 导航出此页面时,可以在内存中保存一些状态数据
  56. this.State["navigatedFromTime"] = DateTime.Now;
  57. }
  58. }
  59. }

3、程序的生命周期
App.xaml

  1. <Application
  2. x:Class="Demo.App"
  3. xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
  4. xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
  5. xmlns:phone="clr-namespace:Microsoft.Phone.Controls;assembly=Microsoft.Phone"
  6. xmlns:shell="clr-namespace:Microsoft.Phone.Shell;assembly=Microsoft.Phone">
  7.  
  8. <Application.ApplicationLifetimeObjects>
  9. <shell:PhoneApplicationService
  10. Launching="Application_Launching"
  11. Closing="Application_Closing"
  12. Activated="Application_Activated"
  13. Deactivated="Application_Deactivated"/>
  14. </Application.ApplicationLifetimeObjects>
  15.  
  16. </Application>

App.xaml.cs

  1. /*
  2. * 演示程序的生命周期
  3. *
  4. * 应用程序生命周期相关的事件
  5. * Launching - 创建一个新的应用程序实例时会触发此事件
  6. * Closing - 应用程序终止前会触发此事件
  7. * Activated - 从 dormant 或 tombstone 状态返回时触发此事件
  8. * Deactivated - 用户导航出此应用程序时触发此事件
  9. *
  10. * 注:以上每一个事件处理的任务必须在 10 秒内完成
  11. */
  12.  
  13. private void Application_Launching(object sender, LaunchingEventArgs e)
  14. {
  15. // 全新启动一个应用程序实例时触发(比如从开始屏幕启动,从 toast 启动等)
  16. Debug.WriteLine("Application_Launching");
  17.  
  18. /*
  19. * 将空闲监测设置为 PhoneApplicationService.Current.ApplicationIdleDetectionMode = IdleDetectionMode.Enabled:
  20. * 当系统检测到当前应用程序处于空闲状态时,会主动采取措施以减少设备的耗电量。比如锁屏时,会调用 Deactivated 事件,会转到休眠状态
  21. * 将空闲监测设置为 PhoneApplicationService.Current.ApplicationIdleDetectionMode = IdleDetectionMode.Disabled:
  22. * 禁止进行空闲监测。比如锁屏时,一般不会调用 Deactivated 事件,不会转到休眠状态
  23. */
  24. // 默认值是 IdleDetectionMode.Enabled
  25. PhoneApplicationService.Current.ApplicationIdleDetectionMode = IdleDetectionMode.Enabled;
  26.  
  27. /*
  28. * PhoneApplicationService.Current.ApplicationIdleDetectionMode - 应用程序空闲检测
  29. * 当设备处于锁定状态,则认为此时应用程序处于空闲状态
  30. * PhoneApplicationService.Current.UserIdleDetectionMode - 用户空闲检测
  31. * 当用户在设备锁定超时期后未接触屏幕或硬件按键时,则认为处于用户空闲状态,此时系统会进入低功耗状态(所以举例:靠加速计操控的应用程序就应该禁用用户空闲检测)
  32. */
  33. }
  34.  
  35. private void Application_Activated(object sender, ActivatedEventArgs e)
  36. {
  37. // 从 dormant 状态或 tombstone 状态返回时触发
  38. Debug.WriteLine("Application_Activated");
  39.  
  40. if (e.IsApplicationInstancePreserved)
  41. {
  42. // 从 dormant 状态返回(注:dormant 状态时,系统会保存 app 的状态)
  43. Debug.WriteLine("从 dormant 状态返回");
  44. }
  45. else
  46. {
  47. // 从 tombstone 状态返回(注:tombstone 状态时,系统不会保存 app 的状态)
  48. Debug.WriteLine("从 tombstone 状态返回");
  49. Debug.WriteLine("应用程序在 Application_Deactivated 时保存到状态字典的数据:deactivatedTime - " + ((DateTime)PhoneApplicationService.Current.State["deactivatedTime"]).ToString("HH:mm:ss"));
  50. }
  51. }
  52.  
  53. private void Application_Deactivated(object sender, DeactivatedEventArgs e)
  54. {
  55. // 导航出应用程序、按“开始”按钮、启动其他应用程序、锁屏时触发
  56. Debug.WriteLine("Application_Deactivated");
  57.  
  58. /*
  59. * 应用程序一般会转成 dormant 状态,必要时会转成 tombstone 状态
  60. * 如果应用程序转成了 tombstone 状态,那么由于系统不会再保存 app 的状态,所以需要手动保存
  61. * PhoneApplicationService.Current.State 是一个字典表
  62. *
  63. * 注:
  64. * dormant 状态时,系统会保存 app 的状态(在内存)
  65. * tombstone 状态时,系统不会保存 app 的状态,需要手动保存相关的状态数据到状态字典表(在内存)
  66. * 系统最多只能保存最近 5 个 app 的状态或状态字典表(在内存),长按返回键可以看到
  67. */
  68. PhoneApplicationService.Current.State["deactivatedTime"] = DateTime.Now;
  69. }
  70.  
  71. private void Application_Closing(object sender, ClosingEventArgs e)
  72. {
  73. // 应用程序终止前触发,此时应用程序即将终止,并且不会保存任何状态
  74. Debug.WriteLine("Application_Closing");
  75. }

4、关于页面导航
Navigation.xaml

  1. <phone:PhoneApplicationPage
  2. x:Class="Demo.Feature.Navigation"
  3. xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
  4. xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
  5. xmlns:phone="clr-namespace:Microsoft.Phone.Controls;assembly=Microsoft.Phone"
  6. xmlns:shell="clr-namespace:Microsoft.Phone.Shell;assembly=Microsoft.Phone"
  7. xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
  8. xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
  9. FontFamily="{StaticResource PhoneFontFamilyNormal}"
  10. FontSize="{StaticResource PhoneFontSizeNormal}"
  11. Foreground="{StaticResource PhoneForegroundBrush}"
  12. SupportedOrientations="Portrait" Orientation="Portrait"
  13. mc:Ignorable="d" d:DesignHeight="768" d:DesignWidth="480"
  14. shell:SystemTray.IsVisible="True">
  15.  
  16. <Grid x:Name="LayoutRoot" Background="Transparent">
  17. <StackPanel Orientation="Vertical">
  18.  
  19. <Button Content="导航到主界面" Click="Button_Click" />
  20.  
  21. </StackPanel>
  22. </Grid>
  23.  
  24. </phone:PhoneApplicationPage>

Navigation.xaml.cs

  1. /*
  2. * 演示页面导航相关的操作
  3. *
  4. * NavigationContext.QueryString - 用于获取导航进来的参数
  5. *
  6. *
  7. * NavigationService - 导航服务
  8. * CanGoBack - 能否向后导航
  9. * CanGoForward - 能否向前导航
  10. * CurrentSource - 当前页面的地址
  11. * Source - 指定需要导航到的页面的地址
  12. * BackStack - 后退堆栈中的历史记录的集合
  13. * RemoveBackEntry() - 从后退堆栈中移除最近的条目
  14. * 此操作为异步操作,相关事件:JournalEntryRemoved
  15. * StopLoading() - 页面导航是异步的,可以通过此方法停止尚未处理的异步导航
  16. * 导航的相关事件:Navigating, Navigated, NavigationStopped, NavigationFailed
  17. * GoBack() - 向后导航
  18. * GoForward() - 向前导航
  19. * Navigate() - 导航到指定地址
  20. *
  21. *
  22. * NavigationEventArgs - 导航参数
  23. * Uri - 页面地址
  24. * IsNavigationInitiator - 当前框架内做的导航则为 true;当前框架的父框架做的导航则为 false
  25. * NavigationMode - 导航模式(System.Windows.Navigation.NavigationMode 枚举)
  26. * New, Back, Forward, Refresh
  27. */
  28.  
  29. using System;
  30. using System.Collections.Generic;
  31. using System.Linq;
  32. using System.Net;
  33. using System.Windows;
  34. using System.Windows.Controls;
  35. using System.Windows.Documents;
  36. using System.Windows.Input;
  37. using System.Windows.Media;
  38. using System.Windows.Media.Animation;
  39. using System.Windows.Shapes;
  40. using Microsoft.Phone.Controls;
  41.  
  42. using System.Windows.Navigation;
  43.  
  44. namespace Demo.Feature
  45. {
  46. public partial class Navigation : PhoneApplicationPage
  47. {
  48. public Navigation()
  49. {
  50. InitializeComponent();
  51.  
  52. /*
  53. * PhoneApplicationPage.BackKeyPress - 用户按了“后退”键时触发的事件
  54. */
  55. this.BackKeyPress += new EventHandler<System.ComponentModel.CancelEventArgs>(Navigation_BackKeyPress);
  56. }
  57.  
  58. void Navigation_BackKeyPress(object sender, System.ComponentModel.CancelEventArgs e)
  59. {
  60. MessageBox.Show("你按了“后退”键");
  61. }
  62.  
  63. protected override void OnNavigatedTo(NavigationEventArgs e)
  64. {
  65.  
  66. }
  67.  
  68. protected override void OnNavigatingFrom(NavigatingCancelEventArgs e)
  69. {
  70. base.OnNavigatingFrom(e);
  71.  
  72. if (e.IsCancelable)
  73. {
  74. MessageBoxResult result = MessageBox.Show("确认离开此页吗?", "警告", MessageBoxButton.OKCancel);
  75. if (result == MessageBoxResult.Cancel)
  76. {
  77. e.Cancel = true;
  78. }
  79. }
  80. }
  81.  
  82. protected override void OnNavigatedFrom(NavigationEventArgs e)
  83. {
  84.  
  85. }
  86.  
  87. private void Button_Click(object sender, RoutedEventArgs e)
  88. {
  89. NavigationService.Navigate(new Uri("/MainPage.xaml", UriKind.Relative));
  90. }
  91. }
  92. }

5、关于系统状态栏
SystemTrayDemo.xaml

  1. <phone:PhoneApplicationPage
  2. x:Class="Demo.Feature.SystemTrayDemo"
  3. xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
  4. xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
  5. xmlns:phone="clr-namespace:Microsoft.Phone.Controls;assembly=Microsoft.Phone"
  6. xmlns:shell="clr-namespace:Microsoft.Phone.Shell;assembly=Microsoft.Phone"
  7. xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
  8. xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
  9. FontFamily="{StaticResource PhoneFontFamilyNormal}"
  10. FontSize="{StaticResource PhoneFontSizeNormal}"
  11. Foreground="{StaticResource PhoneForegroundBrush}"
  12. SupportedOrientations="Portrait" Orientation="Portrait"
  13. mc:Ignorable="d" d:DesignHeight="768" d:DesignWidth="480"
  14. shell:SystemTray.IsVisible="True">
  15.  
  16. <!--
  17. 通过 xaml 的方式设置 SystemTray 的 ProgressIndicator
  18. -->
  19. <!--
  20. <shell:SystemTray.ProgressIndicator>
  21. <shell:ProgressIndicator IsIndeterminate="True" IsVisible="True" Text="系统状态栏文本" />
  22. </shell:SystemTray.ProgressIndicator>
  23. -->
  24.  
  25. <Grid x:Name="LayoutRoot" Background="Transparent">
  26.  
  27. </Grid>
  28.  
  29. </phone:PhoneApplicationPage>

SystemTrayDemo.xaml.cs

  1. /*
  2. * 演示如何控制系统状态栏
  3. *
  4. * SystemTray - 系统状态栏
  5. * BackgroundColor, SetBackgroundColor() - 背景
  6. * ForegroundColor, SetForegroundColor() - 前景
  7. * IsVisible, SetIsVisible() - 是否显示
  8. * Opacity, SetOpacity() - 不透明度
  9. * ProgressIndicator, SetProgressIndicator() - 系统状态上的进度条
  10. *
  11. * ProgressIndicator - 系统状态上的进度条
  12. * IsIndeterminate - 是否是进度不确定的进度条
  13. * IsVisible - 是否显示
  14. * Text - 需要显示的文本内容
  15. * Value - 当 IsIndeterminate = false 时,指定实际进度(0 - 1 之间)
  16. */
  17.  
  18. using System;
  19. using System.Collections.Generic;
  20. using System.Linq;
  21. using System.Net;
  22. using System.Windows;
  23. using System.Windows.Controls;
  24. using System.Windows.Documents;
  25. using System.Windows.Input;
  26. using System.Windows.Media;
  27. using System.Windows.Media.Animation;
  28. using System.Windows.Shapes;
  29. using Microsoft.Phone.Controls;
  30.  
  31. using Microsoft.Phone.Shell;
  32.  
  33. namespace Demo.Feature
  34. {
  35. public partial class SystemTrayDemo : PhoneApplicationPage
  36. {
  37. public SystemTrayDemo()
  38. {
  39. InitializeComponent();
  40.  
  41. SystemTray.SetIsVisible(this, true);
  42. SystemTray.SetOpacity(this, 0.7);
  43. SystemTray.SetBackgroundColor(this, Colors.Red);
  44. SystemTray.SetForegroundColor(this, Colors.Green);
  45.  
  46. ProgressIndicator pi = new ProgressIndicator();
  47. pi.IsVisible = true;
  48. pi.IsIndeterminate = true;
  49. pi.Text = "系统状态栏文本";
  50.  
  51. SystemTray.SetProgressIndicator(this, pi);
  52. }
  53. }
  54. }

OK
[源码下载]

与众不同 windows phone (27) - Feature(特性)之搜索的可扩展性, 程序的生命周期和页面的生命周期, 页面导航, 系统状态栏的更多相关文章

  1. 与众不同 windows phone (28) - Feature(特性)之手机方向, 本地化, 应用程序的试用体验, 系统主题资源, 本地数据的加密解密

    原文:与众不同 windows phone (28) - Feature(特性)之手机方向, 本地化, 应用程序的试用体验, 系统主题资源, 本地数据的加密解密 [索引页][源码下载] 与众不同 wi ...

  2. 与众不同 windows phone (3) - Application Bar(应用程序栏)

    原文:与众不同 windows phone (3) - Application Bar(应用程序栏) [索引页][源码下载] 与众不同 windows phone (3) - Application ...

  3. 与众不同 windows phone (47) - 8.0 其它: 锁屏信息和锁屏背景, 电池状态, 多分辨率, 商店, 内置协议, 快速恢复

    [源码下载] 与众不同 windows phone (47) - 8.0 其它: 锁屏信息和锁屏背景, 电池状态, 多分辨率, 商店, 内置协议, 快速恢复 作者:webabcd 介绍与众不同 win ...

  4. 与众不同 windows phone (35) - 8.0 新的启动器: ShareMediaTask, SaveAppointmentTask, MapsTask, MapsDirectionsTask, MapDownloaderTask

    [源码下载] 与众不同 windows phone (35) - 8.0 新的启动器: ShareMediaTask, SaveAppointmentTask, MapsTask, MapsDirec ...

  5. 与众不同 windows phone (36) - 8.0 新的瓷贴: FlipTile, CycleTile, IconicTile

    [源码下载] 与众不同 windows phone (36) - 8.0 新的瓷贴: FlipTile, CycleTile, IconicTile 作者:webabcd 介绍与众不同 windows ...

  6. 与众不同 windows phone (39) - 8.0 联系人和日历

    [源码下载] 与众不同 windows phone (39) - 8.0 联系人和日历 作者:webabcd 介绍与众不同 windows phone 8.0 之 联系人和日历 自定义联系人存储的增删 ...

  7. 与众不同 windows phone (43) - 8.0 相机和照片: 镜头的可扩展性, 图片的可扩展性, 图片的自动上传扩展

    [源码下载] 与众不同 windows phone (43) - 8.0 相机和照片: 镜头的可扩展性, 图片的可扩展性, 图片的自动上传扩展 作者:webabcd 介绍与众不同 windows ph ...

  8. 与众不同 windows phone (17) - Graphic and Animation(画图和动画)

    原文:与众不同 windows phone (17) - Graphic and Animation(画图和动画) [索引页][源码下载] 与众不同 windows phone (17) - Grap ...

  9. 与众不同 windows phone (16) - Media(媒体)之编辑图片, 保存图片到相册, 与图片的上下文菜单“应用程序...”和“共享...”关联, 与 Windows Phone 的图片中心集成

    原文:与众不同 windows phone (16) - Media(媒体)之编辑图片, 保存图片到相册, 与图片的上下文菜单"应用程序..."和"共享..." ...

随机推荐

  1. Jquery学习笔记:获取jquery对象的基本方法

    jquery最大的好处是将js对html页面的操作(读写)进行了封装,隔离了浏览器的差异性,并简化了操作,和提供了强大的功能. 在web页面中,所有的js操作都是围绕操作dom对象来的.而jquery ...

  2. 解决linux下javac -version和java -version版本显示不一致

    解决linux下javac -version和java -version版本显示不一致 [javascript] view plaincopy [root@localhost usr]# $JAVA_ ...

  3. 管理启示,不起毛的鹦鹉——leo锦书54

    下面一个很长的故事后,我真的很期待明确:    一个人去买鹦鹉,看到一仅仅鹦鹉前标:此鹦鹉会两国语言,售价二百元.还有一仅仅鹦鹉前则标道:此鹦鹉会四门语言.售价四百元.该买那仅仅呢?两仅仅都毛色鲜亮, ...

  4. javascript笔记整理(数组对象)

    1.属性 a.length--设置或返回数组元素的数目 var a=[1,2,3,45,5]; alert(a.length=6) 结果:6 alert(a[5]) 结果:undefined b.co ...

  5. 终于实现samba可写不可删除

    通过szxsztszk的提示 今天终于实现了linux可写不可删除的要求. 同时运用了POSIX ACL 我们公司的要求是这样的[color=Red](我只做出我公司要求的步骤,不同的要求,稍加改正即 ...

  6. 使用VS2012主题插件创建自己的主题

    上篇文章讲了如何更换VS2012的主题,具体内容请参考:Vistual Studio 2012更换皮肤.可是上面的步骤仅仅让我们可选择的主题是增多了,我们可不可以自己创建自己的主题呢? 答案是肯定的, ...

  7. SQL SERVER 2008- 字符串函数

    /* 1,ASCII返回字符表达式中最左侧字符的ASCII代码值 仅返回首字母的ASCII码值 parameter char或varchar returns integer */ SELECT ASC ...

  8. Qt的setMouseTracking使用

    bool mouseTracking 这个属性保存的是窗口部件跟踪鼠标是否生效. 如果鼠标跟踪失效(默认),当鼠标被移动的时候只有在至少一个鼠标按键被按下时,这个窗口部件才会接收鼠标移动事件. 如果鼠 ...

  9. 基于visual Studio2013解决面试题之0707最小元素

     题目

  10. 张佩的Dump服务

    [亦请参考: http://www.yiiyee.cn/Blog/dumpservice/ ] 张佩提供 有偿但 价格极低的Dump文件分析服务 ! . 如果你有一个Dump文件——不管是应用程序还是 ...