1 安装Adobe AIR 运行时,和java的JVM类似。
Adobe AIR 运行时允许在桌面运行AIR应用程序,脱离游览器的束缚。
下载安装文件http://labs.adobe.com/downloads/air.html
在下载页面有样例程序(Sample Applications)http://labs.adobe.com/technologies/air/samples/
2 安装开发环境
当然我们选择开发效率最高的Flex Builder,此外还有命令行编译的一套工具。
http://labs.adobe.com/technologies/flex/flexbuilder3/下载文件需要在Adobe注册用户。
3 Adobe AIR简介
Adobe® AIR™ 是一个跨平台的运行时,可以使用现有的Web开发技能(Flash, Flex, HTML, JavaScript, Ajax)创建桌面富因特网应用程序。
AIR程序运行基于Adobe AIR Runtime,所以开发的程序在不同的操作系统表现是相同的,就像Java一样。
AIR 允许你使用最熟悉的开发环境,选取你最擅长的工具进行开发。比如
* Flash / Flex / ActionScript
* HTML / JavaScript / CSS / Ajax
所以AIR应用程序可以
* 基于Flash或者Flex,即应用程序的容器是Flash或Flex(swf)
* 基于包含HTML或PDF的Flash或Flex,即应用程序的容器是Flash/Fl ......
过去在对DataGrid设置行背景色时,感觉还是挺方便的,只要重写DataGrid的,如下
private var _rowColorFunction:Function;
public function set rowColorFunction(f:Function):void
{
this._rowColorFunction = f;
}
public function get rowColorFunction():Function
{
return this._rowColorFunction;
}
override protected function drawRowBackground(s:Sprite, rowIndex:int, y:Number, height:Number, color:uint, dataIndex:int):void
{
if (this.rowColorFunction != null) {
if (dataIndex < this.dataProvider.length) {
var item:Object = this.dataProvider.getItemAt(dataIndex);
color = this.rowColorFunction.call(this, item, color);
}
}
super.drawRowBackground(s, rowIndex, y, height, color, dataIndex);
}
如果你还是不是很明白可以参考我以前的博客http://blog.csdn.net/terryzero/archive/2009/ ......
已知有一个XML文件(bookstore.xml)如下:
<?xml version="1.0" encoding="gb2312"?>
<bookstore>
<book genre="fantasy" ISBN="2-3631-4">
<title>Oberon's Legacy</title>
<author>Corets, Eva</author>
<price>5.95</price>
</book>
</bookstore>
1、往<bookstore>节点中插入一个<book>节点:
XmlDocument xmlDoc=new XmlDocument();
xmlDoc.Load("bookstore.xml");
XmlNode root=xmlDoc.SelectSingleNode("bookstore");//查找<bookstore>
XmlElement xe1=xmlDoc.CreateElement("book");//创建一个<book>节点
xe1.SetAttribute("genre","李赞红");//设置该节点genre属性
xe1.SetAttribute("ISBN","2-3631-4");//设置该节点ISBN属性
XmlElement xesub1=xmlDoc.CreateElement("title");
xesub1.InnerText="CS从入门到精通";//设置文本节点
xe1.AppendChild(xesub1);//添加到<book>节点中
XmlElement xesub2=xmlDoc.CreateEleme ......
已知有一个XML文件(bookstore.xml)如下:
<?xml version="1.0" encoding="gb2312"?>
<bookstore>
<book genre="fantasy" ISBN="2-3631-4">
<title>Oberon's Legacy</title>
<author>Corets, Eva</author>
<price>5.95</price>
</book>
</bookstore>
1、往<bookstore>节点中插入一个<book>节点:
XmlDocument xmlDoc=new XmlDocument();
xmlDoc.Load("bookstore.xml");
XmlNode root=xmlDoc.SelectSingleNode("bookstore");//查找<bookstore>
XmlElement xe1=xmlDoc.CreateElement("book");//创建一个<book>节点
xe1.SetAttribute("genre","李赞红");//设置该节点genre属性
xe1.SetAttribute("ISBN","2-3631-4");//设置该节点ISBN属性
XmlElement xesub1=xmlDoc.CreateElement("title");
xesub1.InnerText="CS从入门到精通";//设置文本节点
xe1.AppendChild(xesub1);//添加到<book>节点中
XmlElement xesub2=xmlDoc.CreateEleme ......
1.books.html
<!--
To change this template, choose Tools | Templates
and open the template in the editor.
-->
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<title></title>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<script>
var xmlHttpReq = false;
function createXMLHttpRequest(){
try{
//Firefox,Opera8.0+,Safari
&n ......
用的是一种很笨的方法,但可以帮助初学者了解访问XML节点的过程。
已知有一个XML文件(bookstore.xml)如下:
Xml代码
<?xml version="1.0" encoding="gb2312"?>
<bookstore>
<book genre="fantasy" ISBN="2-3631-4">
<title>Oberon's Legacy</title>
<author>Corets, Eva</author>
<price>5.95</price>
</book>
</bookstore>
<?xml version="1.0" encoding="gb2312"?>
<bookstore>
<book genre="fantasy" ISBN="2-3631-4">
<title>Oberon's Legacy</title>
<author>Corets, Eva</author>
<price>5.95</price>
</book>
</bookstore>
1、往<bookstore>节点中插入一个<book>节点:
C#代码
XmlDocument xmlDoc=new XmlDocument(); & ......
用的是一种很笨的方法,但可以帮助初学者了解访问XML节点的过程。
已知有一个XML文件(bookstore.xml)如下:
Xml代码
<?xml version="1.0" encoding="gb2312"?>
<bookstore>
<book genre="fantasy" ISBN="2-3631-4">
<title>Oberon's Legacy</title>
<author>Corets, Eva</author>
<price>5.95</price>
</book>
</bookstore>
<?xml version="1.0" encoding="gb2312"?>
<bookstore>
<book genre="fantasy" ISBN="2-3631-4">
<title>Oberon's Legacy</title>
<author>Corets, Eva</author>
<price>5.95</price>
</book>
</bookstore>
1、往<bookstore>节点中插入一个<book>节点:
C#代码
XmlDocument xmlDoc=new XmlDocument(); & ......
TC2.01下载解压后有3个目录,分别为disk1,disk2,disk3,安装时需要把3个目录的内容都放到1个目录中,我是放在F:\TurboC目录下.
安装步骤:
1.运行F:\TurboC中的INSTALL.EXE文件
2.输入源驱动器,在Enter the SOURCE drive to use后面输入F
3.输入源路径,在Enter the SOURCE Path下面输入TurboC
4.选择安装方式为Install Turbo C on a Hard Drive
5.更改安装目录为D:\TC
6.选择Start Installation,会提示安装成功
目录配置(Options->Directories):
Include directories:头文件目录
Library directories:库目录
Output directory:输出目录
Turbo C directory:主目录 ......