原文:与众不同 windows phone (4) - Launcher(启动器)

[索引页]
[源码下载]

与众不同 windows phone (4) - Launcher(启动器)

作者:webabcd

介绍
与众不同 windows phone 7.5 (sdk 7.1) 之启动器

  • ConnectionSettingsTask - 导航到指定的系统设置页
  • PhoneCallTask - 呼出电话
  • SmsComposeTask - 发短信
  • EmailComposeTask - 发电子邮件
  • WebBrowserTask - 打开浏览器
  • SearchTask - 打开搜索页
  • ShareLinkTask - 分享链接到指定的社交网络
  • ShareStatusTask - 分享状态到指定的社交网络
  • MarketplaceHubTask - 打开商店 Hub
  • MarketplaceSearchTask - 在商店搜索
  • MarketplaceDetailTask - 打开商店某 App 的详细页
  • MarketplaceReviewTask - 评价当前应用程序
  • BingMapsTask - Bing 地图
  • BingMapsDirectionsTask - Bing 地图行车路线
  • MediaPlayerLauncher - 打开媒体播放器

示例
1、ConnectionSettingsTask 的 Demo
ConnectionSettingsTask.xaml.cs

/*
* ConnectionSettingsTask - 导航到指定设置页
* ConnectionSettingsType - 设置页的类别
* ConnectionSettingsType.WiFi - WiFi 设置
* ConnectionSettingsType.Bluetooth - 蓝牙设置
* ConnectionSettingsType.Cellular - 手机网络设置
* ConnectionSettingsType.AirplaneMode - 飞行模式设置
* Show() - 导航到指定设置页
*/ using System;
using System.Collections.Generic;
using System.Linq;
using System.Net;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Documents;
using System.Windows.Input;
using System.Windows.Media;
using System.Windows.Media.Animation;
using System.Windows.Shapes;
using Microsoft.Phone.Controls; using Microsoft.Phone.Tasks; namespace Demo.Launchers
{
public partial class ConnectionSettingsTaskDemo : PhoneApplicationPage
{
public ConnectionSettingsTaskDemo()
{
InitializeComponent();
} private void btnWiFi_Click(object sender, RoutedEventArgs e)
{
ConnectionSettingsTask connectionSettingsTask = new ConnectionSettingsTask();
connectionSettingsTask.ConnectionSettingsType = ConnectionSettingsType.WiFi;
connectionSettingsTask.Show();
} private void btnBluetooth_Click(object sender, RoutedEventArgs e)
{
ConnectionSettingsTask connectionSettingsTask = new ConnectionSettingsTask();
connectionSettingsTask.ConnectionSettingsType = ConnectionSettingsType.Bluetooth;
connectionSettingsTask.Show();
} private void btnCellular_Click(object sender, RoutedEventArgs e)
{
ConnectionSettingsTask connectionSettingsTask = new ConnectionSettingsTask();
connectionSettingsTask.ConnectionSettingsType = ConnectionSettingsType.Cellular;
connectionSettingsTask.Show();
} private void btnAirplaneMode_Click(object sender, RoutedEventArgs e)
{
ConnectionSettingsTask connectionSettingsTask = new ConnectionSettingsTask();
connectionSettingsTask.ConnectionSettingsType = ConnectionSettingsType.AirplaneMode;
connectionSettingsTask.Show();
}
}
}

2、PhoneCallTask 的 Demo
PhoneCallTask.xaml.cs

/*
* PhoneCallTask - 拨打电话
* PhoneNumber - 需要拨打的电话号码
* DisplayName - 程序拨叫过程中显示的名称
* Show() - 按指定的设置拨打电话
*/ using System;
using System.Collections.Generic;
using System.Linq;
using System.Net;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Documents;
using System.Windows.Input;
using System.Windows.Media;
using System.Windows.Media.Animation;
using System.Windows.Shapes;
using Microsoft.Phone.Controls; using Microsoft.Phone.Tasks; namespace Demo.Launchers
{
public partial class PhoneCallTaskDemo : PhoneApplicationPage
{
public PhoneCallTaskDemo()
{
InitializeComponent();
} private void btnDemo_Click(object sender, RoutedEventArgs e)
{
PhoneCallTask phoneCallTask = new PhoneCallTask(); phoneCallTask.PhoneNumber = "";
phoneCallTask.DisplayName = "DisplayName"; phoneCallTask.Show();
}
}
}

3、SmsComposeTask 的 Demo
SmsComposeTask.xaml.cs

/*
* SmsComposeTask - 发送短信
* To - 收件人
* Body - 短信内容
* Show() - 按指定的设置发送短信
*/ using System;
using System.Collections.Generic;
using System.Linq;
using System.Net;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Documents;
using System.Windows.Input;
using System.Windows.Media;
using System.Windows.Media.Animation;
using System.Windows.Shapes;
using Microsoft.Phone.Controls; using Microsoft.Phone.Tasks; namespace Demo.Launchers
{
public partial class SmsComposeTaskDemo : PhoneApplicationPage
{
public SmsComposeTaskDemo()
{
InitializeComponent();
} private void btnDemo_Click(object sender, RoutedEventArgs e)
{
SmsComposeTask smsComposeTask = new SmsComposeTask(); smsComposeTask.To = "";
smsComposeTask.Body = "短信内容"; smsComposeTask.Show();
}
}
}

4、EmailComposeTask 的 Demo
EmailComposeTask.xaml.cs

/*
* EmailComposeTask - 发送电子邮件
* Subject - 邮件主题
* Body - 邮件正文
* To - 收件人地址
* CC - 抄送地址
* Bcc - 密件抄送地址
* CodePage - 用于显示邮件内容的字符集(默认为 utf-8)
* Show() - 按指定的设置发送电子邮件
*/ using System;
using System.Collections.Generic;
using System.Linq;
using System.Net;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Documents;
using System.Windows.Input;
using System.Windows.Media;
using System.Windows.Media.Animation;
using System.Windows.Shapes;
using Microsoft.Phone.Controls; using Microsoft.Phone.Tasks; namespace Demo.Launchers
{
public partial class EmailComposeTaskDemo : PhoneApplicationPage
{
public EmailComposeTaskDemo()
{
InitializeComponent();
} private void btnDemo_Click(object sender, RoutedEventArgs e)
{
EmailComposeTask emailComposeTask = new EmailComposeTask(); emailComposeTask.Subject = "邮件主题";
emailComposeTask.Body = "邮件正文";
emailComposeTask.To = "to@mail.com";
emailComposeTask.Cc = "cc@mail.com";
emailComposeTask.Bcc = "bcc@mail.com";
// emailComposeTask.CodePage // 默认为 utf-8 emailComposeTask.Show();
}
}
}

5、WebBrowserTask 的 Demo
WebBrowserTask.xaml.cs

/*
* WebBrowserTask - 通过浏览器打开指定网页
* Uri - 需要打开的页面的 Uri
* Show() - 打开指定网页
*/ using System;
using System.Collections.Generic;
using System.Linq;
using System.Net;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Documents;
using System.Windows.Input;
using System.Windows.Media;
using System.Windows.Media.Animation;
using System.Windows.Shapes;
using Microsoft.Phone.Controls; using Microsoft.Phone.Tasks; namespace Demo.Launchers
{
public partial class WebBrowserTaskDemo : PhoneApplicationPage
{
public WebBrowserTaskDemo()
{
InitializeComponent();
} private void btnDemo_Click(object sender, RoutedEventArgs e)
{
WebBrowserTask webBrowserTask = new WebBrowserTask(); webBrowserTask.Uri = new Uri("http://webabcd.cnblogs.com/", UriKind.Absolute); webBrowserTask.Show();
}
}
}

6、SearchTask 的 Demo
SearchTask.xaml.cs

/*
* SearchTask - 搜索
* SearchQuery - 需要搜索的关键字
* Show() - 在 Web 上搜索指定的内容
*/ using System;
using System.Collections.Generic;
using System.Linq;
using System.Net;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Documents;
using System.Windows.Input;
using System.Windows.Media;
using System.Windows.Media.Animation;
using System.Windows.Shapes;
using Microsoft.Phone.Controls; using Microsoft.Phone.Tasks; namespace Demo.Launchers
{
public partial class SearchTaskDemo : PhoneApplicationPage
{
public SearchTaskDemo()
{
InitializeComponent();
} private void btnDemo_Click(object sender, RoutedEventArgs e)
{
SearchTask searchTask = new SearchTask(); searchTask.SearchQuery = "webabcd"; searchTask.Show();
}
}
}

7、ShareLinkTask 的 Demo
ShareLinkTask.xaml.cs

/*
* ShareLinkTask - 分享链接
* Title - 需要分享的链接的标题
* LinkUri - 需要分享的链接的地址
* Message - 需要分享的链接的相关详细信息
* Show() - 启动一个对话框,以允许用户在其所选择的网络上分享链接
*/ using System;
using System.Collections.Generic;
using System.Linq;
using System.Net;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Documents;
using System.Windows.Input;
using System.Windows.Media;
using System.Windows.Media.Animation;
using System.Windows.Shapes;
using Microsoft.Phone.Controls; using Microsoft.Phone.Tasks; namespace Demo.Launchers
{
public partial class ShareLinkTaskDemo : PhoneApplicationPage
{
public ShareLinkTaskDemo()
{
InitializeComponent();
} private void btnDemo_Click(object sender, RoutedEventArgs e)
{
ShareLinkTask shareLinkTask = new ShareLinkTask(); shareLinkTask.Title = "webabcd 博客";
shareLinkTask.LinkUri = new Uri("http://webabcd.cnblogs.com/", UriKind.Absolute);
shareLinkTask.Message = "这里有很多 windows phone 的文章"; shareLinkTask.Show();
}
}
}

8、ShareStatusTask 的 Demo
ShareStatusTask.xaml.cs

/*
* ShareStatusTask - 分享状态
* Status - 状态信息
* Show() - 启动一个对话框,以允许用户在其所选择的网络上分享状态
*/ using System;
using System.Collections.Generic;
using System.Linq;
using System.Net;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Documents;
using System.Windows.Input;
using System.Windows.Media;
using System.Windows.Media.Animation;
using System.Windows.Shapes;
using Microsoft.Phone.Controls; using Microsoft.Phone.Tasks; namespace Demo.Launchers
{
public partial class ShareStatusTaskDemo : PhoneApplicationPage
{
public ShareStatusTaskDemo()
{
InitializeComponent();
} private void btnDemo_Click(object sender, RoutedEventArgs e)
{
ShareStatusTask shareStatusTask = new ShareStatusTask(); shareStatusTask.Status = "我开始做 wp7 的开发了"; shareStatusTask.Show();
}
}
}

9、MarketplaceHubTask 的 Demo
MarketplaceHubTask.xaml.cs

/*
* MarketplaceHubTask - 打开市场 hub
* ContentType - 指定需要打开的市场的内容类型
* MarketplaceContentType.Applications - 应用程序
* MarketplaceContentType.Music - 音乐
* Show() - 打开市场 hub
*/ using System;
using System.Collections.Generic;
using System.Linq;
using System.Net;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Documents;
using System.Windows.Input;
using System.Windows.Media;
using System.Windows.Media.Animation;
using System.Windows.Shapes;
using Microsoft.Phone.Controls; using Microsoft.Phone.Tasks; namespace Demo.Launchers
{
public partial class MarketplaceHubTaskDemo : PhoneApplicationPage
{
public MarketplaceHubTaskDemo()
{
InitializeComponent();
} private void btnDemo_Click(object sender, RoutedEventArgs e)
{
MarketplaceHubTask marketplaceHubTask = new MarketplaceHubTask(); marketplaceHubTask.ContentType = MarketplaceContentType.Applications; marketplaceHubTask.Show();
}
}
}

10、MarketplaceSearchTask 的 Demo
MarketplaceSearchTask.xaml.cs

/*
* MarketplaceSearchTask - 在市场中搜做
* ContentType - 需要搜索的内容类型
* MarketplaceContentType.Applications - 应用程序
* MarketplaceContentType.Music - 音乐
* SearchTerms - 搜索用的关键字
* Show() - 在市场中按指定条件进行搜索
*/ using System;
using System.Collections.Generic;
using System.Linq;
using System.Net;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Documents;
using System.Windows.Input;
using System.Windows.Media;
using System.Windows.Media.Animation;
using System.Windows.Shapes;
using Microsoft.Phone.Controls; using Microsoft.Phone.Tasks; namespace Demo.Launchers
{
public partial class MarketplaceSearchTaskDemo : PhoneApplicationPage
{
public MarketplaceSearchTaskDemo()
{
InitializeComponent();
} private void btnDemo_Click(object sender, RoutedEventArgs e)
{
MarketplaceSearchTask marketplaceSearchTask = new MarketplaceSearchTask(); marketplaceSearchTask.ContentType = MarketplaceContentType.Applications;
marketplaceSearchTask.SearchTerms = "webabcd"; marketplaceSearchTask.Show();
}
}
}

11、MarketplaceDetailTask 的 Demo
MarketplaceDetailTask.xaml.cs

/*
* MarketplaceDetailTask - 指定程序的详细信息
* ContentType - 只能是 MarketplaceContentType.Applications
* ContentIdentifier - 指定 app 的 id
* Show() - 在市场中,显示指定应用程序的详细信息
*/ using System;
using System.Collections.Generic;
using System.Linq;
using System.Net;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Documents;
using System.Windows.Input;
using System.Windows.Media;
using System.Windows.Media.Animation;
using System.Windows.Shapes;
using Microsoft.Phone.Controls; using Microsoft.Phone.Tasks; namespace Demo.Launchers
{
public partial class MarketplaceDetailTaskDemo : PhoneApplicationPage
{
public MarketplaceDetailTaskDemo()
{
InitializeComponent();
} private void btnDemo_Click(object sender, RoutedEventArgs e)
{
MarketplaceDetailTask marketplaceDetailTask = new MarketplaceDetailTask(); marketplaceDetailTask.ContentIdentifier = "2aa7921f-a823-4beb-ad67-02b5d4e8a9a3";
marketplaceDetailTask.ContentType = MarketplaceContentType.Applications; marketplaceDetailTask.Show();
}
}
}

12、MarketplaceReviewTask 的 Demo
MarketplaceReviewTask.xaml.cs

/*
* MarketplaceReviewTask - 评价当前应用程序
* Show() - 显示当前应用程序的评价页面
*/ using System;
using System.Collections.Generic;
using System.Linq;
using System.Net;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Documents;
using System.Windows.Input;
using System.Windows.Media;
using System.Windows.Media.Animation;
using System.Windows.Shapes;
using Microsoft.Phone.Controls; using Microsoft.Phone.Tasks; namespace Demo.Launchers
{
public partial class MarketplaceReviewTaskDemo : PhoneApplicationPage
{
public MarketplaceReviewTaskDemo()
{
InitializeComponent();
} private void btnDemo_Click(object sender, RoutedEventArgs e)
{
MarketplaceReviewTask marketplaceReviewTask = new MarketplaceReviewTask(); marketplaceReviewTask.Show();
}
}
}

13、BingMapsTask 的 Demo
BingMapsTask.xaml.cs

/*
* BingMapsTask - Bing 地图
* SearchTerm - 需要在地图中搜索的内容
* Center - 地图中心点的坐标
* ZoomLevel - 地图的放大级别
* Show() - 按指定要求打开 Bing 地图
*/ using System;
using System.Collections.Generic;
using System.Linq;
using System.Net;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Documents;
using System.Windows.Input;
using System.Windows.Media;
using System.Windows.Media.Animation;
using System.Windows.Shapes;
using Microsoft.Phone.Controls; using Microsoft.Phone.Tasks;
using System.Device.Location; namespace Demo.Launchers
{
public partial class BingMapsTaskDemo : PhoneApplicationPage
{
public BingMapsTaskDemo()
{
InitializeComponent();
} private void btnDemo_Click(object sender, RoutedEventArgs e)
{
BingMapsTask bingMapsTask = new BingMapsTask(); // bingMapsTask.Center = new GeoCoordinate(39.9, 116.3);
// bingMapsTask.ZoomLevel = 6; bingMapsTask.SearchTerm = "天安门"; bingMapsTask.Show();
}
}
}

14、BingMapsDirectionsTask 的 Demo
BingMapsDirectionsTask.xaml.cs

/*
* BingMapsDirectionsTask - Bing 地图行车路线
* Start - 行车路线的开始位置(LabeledMapLocation 类型)
* End - 行车路线的结束位置(LabeledMapLocation 类型)
* Show() - 打开 Bing 地图,并显示指定开始位置和结束位置的行车路线
*
* LabeledMapLocation - 关联了标签的地理坐标
* Label - 位置的文本标签
* Location - 位置的地理坐标
*/ using System;
using System.Collections.Generic;
using System.Linq;
using System.Net;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Documents;
using System.Windows.Input;
using System.Windows.Media;
using System.Windows.Media.Animation;
using System.Windows.Shapes;
using Microsoft.Phone.Controls; using Microsoft.Phone.Tasks;
using System.Device.Location; namespace Demo.Launchers
{
public partial class BingMapsDirectionsTaskDemo : PhoneApplicationPage
{
public BingMapsDirectionsTaskDemo()
{
InitializeComponent();
} private void btnDemo_Click(object sender, RoutedEventArgs e)
{
BingMapsDirectionsTask bingMapsDirectionsTask = new BingMapsDirectionsTask(); // 如果不指定地理坐标,则会针对位置标签进行搜索
LabeledMapLocation lml = new LabeledMapLocation("天安门", null);
bingMapsDirectionsTask.End = lml; // Start 和 End 必须至少指定其中之一,当只指定一个时,另一个则使用本地位置
bingMapsDirectionsTask.Show();
}
}
}

15、MediaPlayerLauncher 的 Demo
MediaPlayerLauncher.xaml.cs

/*
* MediaPlayerLauncher - 媒体播放器
* Location - 需要播放的媒体的所在位置
* MediaLocationType.Install - 媒体在程序包中
* MediaLocationType.Data - 媒体在独立存储中
* Media - 需要播放的媒体的地址(视频或音频均可,系统会自动使用对应的播放器呈现 Media)
* Controls - 播放器需要显示的控件
* MediaPlaybackControls.None - 无控件
* MediaPlaybackControls.Pause - 暂停控件
* MediaPlaybackControls.Stop - 停止控件
* MediaPlaybackControls.FastForward - 快进控件
* MediaPlaybackControls.Rewind - 快退控件
* MediaPlaybackControls.Skip - 跳过控件
* MediaPlaybackControls.All - 全部控件
* Orientation - 播放器启动时的显示方向,MediaPlayerOrientation.Landscape 或 MediaPlayerOrientation.Portrait
* Show() - 打开媒体播放器,播放指定的媒体
*/ using System;
using System.Collections.Generic;
using System.Linq;
using System.Net;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Documents;
using System.Windows.Input;
using System.Windows.Media;
using System.Windows.Media.Animation;
using System.Windows.Shapes;
using Microsoft.Phone.Controls; using Microsoft.Phone.Tasks; namespace Demo.Launchers
{
public partial class MediaPlayerLauncherDemo : PhoneApplicationPage
{
public MediaPlayerLauncherDemo()
{
InitializeComponent();
} private void btnDemo_Click(object sender, RoutedEventArgs e)
{
MediaPlayerLauncher mediaPlayerLauncher = new MediaPlayerLauncher(); mediaPlayerLauncher.Media = new Uri("Assets/Demo.mp4", UriKind.Relative); // 播放视频则打开视频播放器
// mediaPlayerLauncher.Media = new Uri("Assets/SuperMario.mp3", UriKind.Relative); // 播放音频则打开音频播放器
// mediaPlayerLauncher.Location = MediaLocationType.Data;
mediaPlayerLauncher.Location = MediaLocationType.Install;
mediaPlayerLauncher.Controls = MediaPlaybackControls.Pause | MediaPlaybackControls.Stop;
mediaPlayerLauncher.Orientation = MediaPlayerOrientation.Landscape; mediaPlayerLauncher.Show();
}
}
}

OK
[源码下载]

与众不同 windows phone (4) - Launcher(启动器)的更多相关文章

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

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

  2. 与众不同 windows phone 8.0 & 8.1 系列文章索引

    [源码下载] [与众不同 windows phone 7.5 (sdk 7.1) 系列文章索引] 与众不同 windows phone 8.0 & 8.1 系列文章索引 作者:webabcd ...

  3. 与众不同 windows phone (38) - 8.0 关联启动: 使用外部程序打开一个文件或URI, 关联指定的文件类型或协议

    [源码下载] 与众不同 windows phone (38) - 8.0 关联启动: 使用外部程序打开一个文件或URI, 关联指定的文件类型或协议 作者:webabcd 介绍与众不同 windows ...

  4. 与众不同 windows phone (44) - 8.0 位置和地图

    [源码下载] 与众不同 windows phone (44) - 8.0 位置和地图 作者:webabcd 介绍与众不同 windows phone 8.0 之 位置和地图 位置(GPS) - Loc ...

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

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

  6. 与众不同 windows phone (14) - Media(媒体)之音频播放器, 视频播放器, 与 Windows Phone 的音乐和视频中心集成

    原文:与众不同 windows phone (14) - Media(媒体)之音频播放器, 视频播放器, 与 Windows Phone 的音乐和视频中心集成 [索引页][源码下载] 与众不同 win ...

  7. 与众不同 windows phone (34) - 8.0 新的控件: LongListSelector

    [源码下载] 与众不同 windows phone (34) - 8.0 新的控件: LongListSelector 作者:webabcd 介绍与众不同 windows phone 8.0 之 新的 ...

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

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

  9. 与众不同 windows phone (37) - 8.0 文件系统: StorageFolder, StorageFile, 通过 Uri 引用文件, 获取 SD 卡中的文件

    [源码下载] 与众不同 windows phone (37) - 8.0 文件系统: StorageFolder, StorageFile, 通过 Uri 引用文件, 获取 SD 卡中的文件 作者:w ...

随机推荐

  1. Debian 7 下载

                                                                    Debian 7 DOWNLOAD http://cdimage.deb ...

  2. QTP的基本功能介绍

    • QTP的基本功能介绍 HP QuickTest Professional 支持功能測试和回归測试自己主动化,用于每一个主要软件应用程序和环境.此解决方式使用keyword驱动的測试概念,简化了測试 ...

  3. QTP实践总结

    QTP实践总结 查询数据库修改freq 1.Testcasetable创建查询select * from testcasetable order by fseq desc 2.设计表-选项-修改自动递 ...

  4. BZOJ 3367: [Usaco2004 Feb]The Big Game 球赛( dp )

    dp(i)表示前i个人最少坐多少辆车, dp(i) = min(dp(j) + 1, dp(i)) (0 <= j < i 且 (i, j]的人能坐在一辆车上) 时间复杂度O(n²) -- ...

  5. C语言数据结构-创建链表的四种方法

    结点类型: typedef int datatype; typedef struct NODE{ datatype data; struct NODE *next; }Node,*LinkList; ...

  6. cocos2d-x游戏开发系列教程-坦克大战游戏之敌方坦克AI的编写

    在上篇我们完成了子弹和地图碰撞的检测,在这篇我们将完成敌方坦克AI的编写. 具体思路是屏幕中保持有四个敌方坦克,然后坦克随机方向运动,并且子弹消失后1秒发射一次 1.我们新建一个敌方坦克的AI类来控制 ...

  7. Swift - 给图片添加滤镜效果(棕褐色老照片滤镜,黑白滤镜)

    Core Image是一个强大的滤镜处理框架.它除了可以直接给图片添加各种内置滤镜,还能精确地修改鲜艳程度, 色泽, 曝光等,下面通过两个样例演示如何给UIImage添加滤镜. 1,棕褐色滤镜  -  ...

  8. 当装了两个tomcat后,如何修改tomcat端口

    链接地址:http://blog.csdn.net/alongwilliam/article/details/8199974 以前只知道当tomcat端口号冲突了如何修改tomcat默认的8080端口 ...

  9. [VBS]_[活动分组程序]

    场景: 1.每次搞活动都需要分组,比如20个人分3个组,如何才能更公平的分组,想到的只能是随机分组程序. 2.时间关系并没有实现男女平衡的分组,有时间的哥们可以自己实现. 文件1:分组程序.vbs,记 ...

  10. SqlServer数据库存储过程的使用

    搞开发这么久了,说实话很少用到存储过程,大部分代码都在业务层给处理了. 今天在做APP接口的时候,表里面没有数据,需要模拟一些数据,于是就想到存储过程,来一起用下吧. SqlServer中创建存储过程 ...