AIR 用系统默认应用打开文件 Open with default App
2011-03-24 09:14
441 查看
<?xml version="1.0" encoding="utf-8"?> <s:WindowedApplication xmlns:fx="http://ns.adobe.com/mxml/2009" xmlns:s="library://ns.adobe.com/flex/spark" xmlns:mx="library://ns.adobe.com/flex/mx" styleName="plain" width="100%" height="100%"> <fx:Script> <![CDATA[ import flash.events.MouseEvent; import mx.controls.FileSystemDataGrid; protected function datagridHandler(event:MouseEvent):void { var fsg:FileSystemDataGrid = event.currentTarget as FileSystemDataGrid; if (fsg.selectedItem != null) (fsg.selectedItem as File).openWithDefaultApplication(); } ]]> </fx:Script> <s:Panel width="100%" height="100%" title="Open With Default Application Sample" skinClass="skins.TDFPanelSkin"> <s:VGroup top="10" left="10"> <s:Label width="660" verticalAlign="justify" color="#323232" text="The Open With Default Application support allows you to open any file with it's associated default application. Locate a file item in the file system grid and double-click it to see it in action:"/> <mx:Button icon="@Embed(source='up.png')" click="fileGrid.navigateUp();" enabled="{fileGrid.canNavigateUp}"/> <mx:FileSystemDataGrid id="fileGrid" directory="{File.desktopDirectory}" width="660" height="150" doubleClickEnabled="true" doubleClick="datagridHandler(event)"> </mx:FileSystemDataGrid> </s:VGroup> </s:Panel> </s:WindowedApplication>
相关文章推荐
- iOS App让自己的应用在其他应用中打开列表中显示、iOS把自己的应用添加到”活动“、将PDF文件Open In MyApp
- iOS App让自己的应用在其他应用中打开列表中显示、iOS把自己的应用添加到”活动“、将PDF文件Open In MyApp
- 在系统里设置文件默认打开APP
- 从open系统调用的源码看文件的打开过程
- 解决Window系统默认打开文件操作的错误绑定的问题
- 文件系统中打开某指定类型文件时,关联并用自己的APP打开
- 修改mac系统下某种文件类型的默认打开方式
- air之openWithDefaultApplication错误
- 移动app ,启用第三方应用下载打开文件预览
- linux gvfs GNOME Virtual Filesystem Layer Myeclipse_ open in explorer 使用系统默认的文件浏览器打找指定文件,指定目录
- 修改mac系统下某种文件类型的默认打开方式
- 【Android】打开第三方App以及系统应用服务
- Qt 打开文件的默认路径 QFileDialog::getOpenFileName()
- 文件打开时open系统调用
- 修改系统最大文件打开数——Too many open files(elasticsearch相关)
- Win10 怎么给php文件设置默认打开应用
- C# 系统应用之ListView控件 (三).添加ContextMenuStrip右键菜单打开删除文件
- Qt 打开文件的默认路径 QFileDialog::getOpenFileName()
- 服务器异常java.io.IOException: Too many open files(系统最大文件打开数限制)
- WIN32,,打开文件没有默认程序,调用系统的默认程序选择窗口