- 浏览: 16428 次
- 性别:
- 来自: wuxi
最新评论
-
lijunjie2010:
能把源码上传上来吗?谢谢了,我做了,没有移动的效果。
flex 虚线 + 沿着虚线移动的箭头 完 -
bence:
问下,怎么在titleWindow中嵌入iframe
总结下最近在flex中嵌入html页面的问题
[align=left][/align]
3Q for hzg
<?xml version="1.0" encoding="utf-8"?> <mx:TitleWindow xmlns:mx="http://www.adobe.com/2006/mxml" xmlns:ns1="myCom.*" initialize="initTime()" creationComplete="init()" width="696" height="566"> <mx:Script> <![CDATA[ import mx.events.FlexEvent; import mx.formatters.DateFormatter; import mx.controls.Alert; import mx.collections.ArrayCollection; [Bindable] private var freqStateList:ArrayCollection = new ArrayCollection([ {label:"每天"}, {label:"每周"}, {label:"每月"} ]); [Bindable] private var weekIndexList:ArrayCollection = new ArrayCollection([ {label:"第一个"}, {label:"第二个"}, {label:"第三个"}, {label:"第四个"}, {label:"最后一个"} ]); [Bindable] private var weekList:ArrayCollection = new ArrayCollection([ {label:"星期日"}, {label:"星期一"}, {label:"星期二"}, {label:"星期三"}, {label:"星期四"}, {label:"星期五"}, {label:"星期六"} ]); [Bindable] private var intervalUnit:ArrayCollection = new ArrayCollection([ {label:"小时"}, {label:"分钟"} ]); private var second:String = "*"; private var minute:String = "*"; private var hour:String = "*"; private var day:String = "*"; private var month:String = "*"; private var week:String = "?"; private var year:String = "*"; private var edited:Boolean = false; public function set quartzCronExp(value:String):void { var arr:Array = value.split(" "); initComponent1(arr[3].toString(), arr[4].toString(), arr[5].toString(), arr[6].toString()); initComponent2(arr[0].toString(), arr[1].toString(), arr[2].toString()); edited = true; //displayIllustration(); } /** * 设置频率区域 * */ private function initComponent1(day:String, month:String, week:String, year:String):void { this.day = day; this.month = month; this.week = week; this.year = year; // 每天 if(day == "*"){ cmb.selectedIndex = 0; return; } // 每周 if(day == "?" && week.indexOf("#") == -1 && week.indexOf("L") == -1){ cmb.selectedIndex = 1; if(week == "*"){ return; } weekBox.addEventListener(FlexEvent.CREATION_COMPLETE, function():void { var arr:Array = week.split(","); var cbWeekList:ArrayCollection = new ArrayCollection([ cbWeek1, cbWeek2, cbWeek3, cbWeek4, cbWeek5, cbWeek6, cbWeek7 ]); for each(var str:String in arr){ (cbWeekList.getItemAt(Number(str) - 1) as CheckBox).selected = true; } }); return; } // 每月 - 第 if(day != "*" && day != "?"){ cmb.selectedIndex = 2; monthBox.addEventListener(FlexEvent.CREATION_COMPLETE, function():void { rb1.selected = true; rb2.selected = false; nsDay1.value = Number(day); }); return; } // 每月 - 在 cmb.selectedIndex = 2; monthBox.addEventListener(FlexEvent.CREATION_COMPLETE, function():void { rb1.selected = false; rb2.selected = true; if(week.indexOf("L") != -1){ cboWeekIndex.selectedIndex = 4; cboWeek.selectedIndex = Number(week.substring(0, week.length - 1)) - 1; }else{ cboWeekIndex.selectedIndex = Number(week.split("#")[1]) - 1; cboWeek.selectedIndex = Number(week.split("#")[0]) - 1; } }); } /** * 设置每天频率区域 * */ private function initComponent2(second:String, minute:String, hour:String):void { this.second = second; this.minute = minute; this.hour = hour; // 每天频率 - 间隔(时) if(hour.indexOf("/") != -1){ rb3.selected = false; rb4.selected = true; cbInterval.selectedIndex = 0; nbInterval.maximum = 24; nbInterval.value = Number(hour.split("/")[1]); return; } // 每天频率 - 间隔(分钟) if(minute.indexOf("/") != -1){ rb3.selected = false; rb4.selected = true; cbInterval.selectedIndex = 1; nbInterval.maximum = 60; nbInterval.value = Number(minute.split("/")[1]); return; } // 每天频率 - 一次 rb3.selected = true; rb4.selected = false; nsHour.value = Number(hour); nsMinute.value = Number(minute); nsSecond.value = Number(second); } public function set startDateAndTime(value:String):void { if(value && value.length>0) { var arr:Array = value.split(" "); startDate.text = arr[0].toString(); startTime.times = arr[1].toString(); //displayIllustration(); } } public function set endDateAndTime(value:String):void { if(value == null || value.length == 0){ rb6.selected = true; return; } var arr:Array = value.split(" "); endDate.text = arr[0].toString(); endTime.times = arr[1].toString(); //displayIllustration(); } public function get quartzCronExp():String{ return second + " " + minute + " " + hour + " " + day + " " + month + " " + week + " " + year; } public function get startDateAndTime():String { return startDate.text + " " + startTime.time; } public function get endDateAndTime():String { return rb5.selected ? endDate.text + " " + endTime.time : null; } private function initTime():void { var dateFormatter:DateFormatter = new DateFormatter(); dateFormatter.formatString = "HH:NN:SS"; startTime.times = dateFormatter.format(new Date()); endTime.times = dateFormatter.format(new Date()); } private function init():void { if(!edited){ setValue1(); setValue5(); } displayIllustration(); } /** * 显示说明信息 * */ private function displayIllustration():void { var arr:Array = quartzCronExp.split(" "); var str1:String = createStr1(arr[3].toString(), arr[4].toString(), arr[5].toString(), arr[6].toString()); var str2:String = createStr2(arr[0].toString(), arr[1].toString(), arr[2].toString()); var str3:String = createStr3(); illustration.text = str1 + " " + str2 + "\n" + str3; } /** * 创建频率区域的显示字符串 * */ private function createStr1(day:String, month:String, week:String, year:String):String { // 每天 if(day == "*"){ return "每天"; } // 每周 if(day == "?" && week.indexOf("#") == -1 && week.indexOf("L") == -1){ if(week == "*"){ return "每周"; } var cbWeekList:ArrayCollection = new ArrayCollection([ cbWeek1, cbWeek2, cbWeek3, cbWeek4, cbWeek5, cbWeek6, cbWeek7 ]); var s:String = "每周 "; for each(var cb:CheckBox in cbWeekList){ if(cb.selected){ s += cb.label + "," } } s = s.substring(0, s.length - 1); return s; } // 每月 - 第 if(day != "*" && day != "?"){ return "每月 " + "第 " + nsDay1.value + " 天"; } // 每月 - 在 return "在每月的 " + cboWeekIndex.text + " " + cboWeek.text; } /** * 创建每天频率区域的显示字符串 * */ private function createStr2(second:String, minute:String, hour:String):String { // 每天频率 - 间隔(时) if(hour.indexOf("/") != -1){ return "每 " + nbInterval.value + " 小时执行一次。" } // 每天频率 - 间隔(分钟) if(minute.indexOf("/") != -1){ return "每 " + nbInterval.value + " 分钟执行一次。" } // 每天频率 - 一次 return "的 " + ((nsHour.value.toString().length == 1) ? ("0" + nsHour.value) : nsHour.value) + ":" + ((nsMinute.value.toString().length == 1) ? ("0" + nsMinute.value) : nsMinute.value) + ":" + ((nsSecond.value.toString().length == 1) ? ("0" + nsSecond.value) : nsSecond.value) + " 执行。" } /** * 创建开始和结束日期的显示字符串 * */ private function createStr3():String { if(rb5.selected){ return "任务从 " + startDateAndTime + " 开始,到 " + endDateAndTime + " 结束。"; } return "任务从 " + startDateAndTime + " 开始。"; } /** * 设置每天 * */ private function setValue1():void { day = "*"; month = "*"; week = "?"; year = "*"; displayIllustration(); } /** * 设置每周 * */ private function setValue2():void { day = "?"; month = "*"; week = ""; var cbWeekList:ArrayCollection = new ArrayCollection([ cbWeek1, cbWeek2, cbWeek3, cbWeek4, cbWeek5, cbWeek6, cbWeek7 ]); for(var i:Number = 0; i < cbWeekList.length; i++) { if(CheckBox(cbWeekList.getItemAt(i)).selected){ week += (i + 1) + ","; } } if(week.charAt(week.length - 1) == ","){ week = week.substr(0, week.length - 1); } week = week == "" ? "*" : week; year = "*"; displayIllustration(); } /** * 设置每月 - 第 * */ private function setValue3():void { day = nsDay1.value.toString(); month = "*"; week = "?"; year = "*"; displayIllustration(); } /** * 设置每月 - 在 * */ private function setValue4():void { day = "?"; month = "*"; week = (cboWeek.selectedIndex + 1).toString(); if(cboWeekIndex.selectedIndex != 4){ week += "#" + (cboWeekIndex.selectedIndex + 1); }else{ week += "L"; } year = "*"; displayIllustration(); } /** * 设置每天频率 - 一次 * */ private function setValue5():void { second = nsSecond.value.toString(); minute = nsMinute.value.toString(); hour = nsHour.value.toString(); displayIllustration(); } /** * 设置每天频率 - 间隔(时) * */ private function setValue6():void { second = "0"; minute = "0"; hour = nbInterval.value > 24 ? "0/24" : "0/" + nbInterval.value.toString(); displayIllustration(); } /** * 设置每天频率 - 间隔(分) * */ private function setValue7():void { second = "0"; minute = "0/" + nbInterval.value.toString(); hour = "*"; displayIllustration(); } private function cbIntervalChangeHandler(event:Event):void { nbInterval.maximum = cbInterval.selectedIndex == 0 ? 24 : 60; if(cbInterval.selectedIndex == 0){ setValue6(); }else{ setValue7(); } } private function cmbChangeHandler(event:Event):void { switch (cmb.selectedIndex){ case 0: setValue1(); break; case 1: setValue2(); break; case 2: if(rb1.selected){ setValue3(); }else{ setValue4(); } break; default: break; } } private function close():void { PopUpManager.removePopUp(this); } private function ok():void { var closeevent:WindowCloseEvent = new WindowCloseEvent(WindowCloseEvent.WINDOW_CLOSE); closeevent.IsConfirm = true; closeevent.ReturnValue = {quartzCronExp:quartzCronExp, startDateAndTime:startDateAndTime, endDateAndTime:endDateAndTime}; dispatchEvent(closeevent); close(); } ]]> </mx:Script> <mx:VBox width="100%" height="100%"> <mx:Panel layout="vertical" title="频率" width="100%" verticalGap="0"> <mx:HBox width="100%" horizontalAlign="left" verticalAlign="middle" paddingBottom="2" paddingLeft="5" paddingRight="5" paddingTop="2"> <mx:Label text="执行:"/> <mx:Spacer width="100"/> <mx:ComboBox id="cmb" dataProvider="{freqStateList}" labelField="label" editable="false" width="150" change="cmbChangeHandler(event)"/> </mx:HBox> <mx:ViewStack id="viewstack1" width="100%" selectedIndex="{cmb.selectedIndex}" resizeToContent="true"> <mx:Canvas label="每天" width="100%" height="100%"> </mx:Canvas> <mx:Canvas id="weekBox" label="每周" width="100%" height="100%"> <mx:HBox width="100%" paddingBottom="5" paddingLeft="5" paddingRight="5" paddingTop="5"> <mx:VBox width="100%" verticalGap="0"> <mx:Grid width="100%" verticalGap="0"> <mx:GridRow width="100%" height="100%"> <mx:GridItem width="100%" height="100%"> <mx:HBox width="100%"> <mx:CheckBox id="cbWeek2" click="setValue2()" label="星期一"/> </mx:HBox> </mx:GridItem> <mx:GridItem width="100%" height="100%"> <mx:HBox width="100%"> <mx:CheckBox id="cbWeek4" click="setValue2()" label="星期三"/> </mx:HBox> </mx:GridItem> <mx:GridItem width="100%" height="100%"> <mx:HBox width="100%"> <mx:CheckBox id="cbWeek6" click="setValue2()" label="星期五"/> </mx:HBox> </mx:GridItem> <mx:GridItem width="100%" height="100%"> <mx:HBox width="100%"> <mx:CheckBox id="cbWeek7" click="setValue2()" label="星期六"/> </mx:HBox> </mx:GridItem> </mx:GridRow> <mx:GridRow width="100%" height="100%"> <mx:GridItem width="100%" height="100%"> <mx:HBox width="100%"> <mx:CheckBox id="cbWeek3" click="setValue2()" label="星期二"/> </mx:HBox> </mx:GridItem> <mx:GridItem width="100%" height="100%"> <mx:HBox width="100%"> <mx:CheckBox id="cbWeek5" click="setValue2()" label="星期四"/> </mx:HBox> </mx:GridItem> <mx:GridItem width="100%" height="100%"> </mx:GridItem> <mx:GridItem width="100%" height="100%"> <mx:HBox width="100%"> <mx:CheckBox id="cbWeek1" click="setValue2()" label="星期日"/> </mx:HBox> </mx:GridItem> </mx:GridRow> </mx:Grid> </mx:VBox> </mx:HBox> </mx:Canvas> <mx:Canvas id="monthBox" label="每月" width="100%" height="100%"> <mx:VBox width="100%" height="100%" verticalGap="0"> <mx:RadioButtonGroup id="radioButtonGroup1"/> <mx:HBox width="100%" verticalAlign="middle" paddingBottom="2" paddingLeft="5" paddingRight="5" paddingTop="2"> <mx:RadioButton id="rb1" label="第" groupName="radioButtonGroup1" selected="true" click="setValue3()"/> <mx:Spacer width="100" height="0"/> <mx:NumericStepper id="nsDay1" maximum="31" minimum="1" enabled="{rb1.selected}" change="setValue3()"/> <mx:Label text="天"/> </mx:HBox> <mx:HBox width="100%" paddingBottom="2" paddingLeft="5" paddingRight="5" paddingTop="2" verticalAlign="middle"> <mx:RadioButton id="rb2" label="在" groupName="radioButtonGroup1" click="setValue4()"/> <mx:Spacer width="100" height="0"/> <mx:ComboBox id="cboWeekIndex" width="100" dataProvider="{weekIndexList}" labelField="label" editable="false" enabled="{rb2.selected}" change="setValue4()"/> <mx:ComboBox id="cboWeek" width="100" dataProvider="{weekList}" labelField="label" editable="false" enabled="{rb2.selected}" change="setValue4()"/> </mx:HBox> </mx:VBox> </mx:Canvas> </mx:ViewStack> </mx:Panel> <mx:Panel width="100%" height="115" layout="vertical" title="每天频率" verticalAlign="middle" verticalGap="0"> <mx:RadioButtonGroup id="radioButtonGroup2"/> <mx:HBox width="100%" paddingBottom="2" paddingLeft="5" paddingRight="5" paddingTop="2" verticalAlign="middle" horizontalGap="0"> <mx:RadioButton id="rb3" groupName="radioButtonGroup2" label="执行一次,时间为:" selected="true" click="setValue5()"/> <mx:Spacer width="36"/> <mx:NumericStepper id="nsHour" minimum="0" maximum="23" width="50" enabled="{rb3.selected}" change="setValue5()"/> <mx:Label text="时"/> <mx:NumericStepper id="nsMinute" width="50" minimum="0" maximum="59" enabled="{rb3.selected}" change="setValue5()"/> <mx:Label text="分"/> <mx:NumericStepper id="nsSecond" width="50" minimum="0" maximum="59" enabled="{rb3.selected}" change="setValue5()"/> <mx:Label text="秒"/> </mx:HBox> <mx:HBox width="100%" paddingBottom="2" paddingLeft="5" paddingRight="5" paddingTop="2" verticalAlign="middle"> <mx:RadioButton id="rb4" groupName="radioButtonGroup2" label="执行间隔:" click="cbInterval.selectedIndex == 0 ? setValue6() : setValue7()"/> <mx:Spacer width="64"/> <mx:NumericStepper id="nbInterval" minimum="1" maximum="24" enabled="{rb4.selected}" change="cbInterval.selectedIndex == 0 ? setValue6() : setValue7()"/> <mx:ComboBox id="cbInterval" width="100" dataProvider="{intervalUnit}" labelField="label" enabled="{rb4.selected}" change="cbIntervalChangeHandler(event)"/> </mx:HBox> </mx:Panel> <mx:Panel width="100%" height="115" layout="vertical" title="持续时间" verticalAlign="middle" verticalGap="0"> <mx:RadioButtonGroup id="radioButtonGroup3"/> <mx:HBox width="100%" paddingBottom="2" paddingLeft="5" paddingRight="5" paddingTop="2" verticalAlign="middle"> <mx:Spacer width="12"/> <mx:Label text="开始时间:"/> <mx:Spacer width="10"/> <mx:DateField id="startDate" formatString="YYYY-MM-DD" selectedDate="{new Date()}" yearNavigationEnabled="true"/> <ns1:TimeInput id="startTime" width="220" change="displayIllustration()"/> </mx:HBox> <mx:HBox width="100%" verticalAlign="middle" paddingBottom="2" paddingLeft="5" paddingRight="5" paddingTop="2"> <mx:RadioButton id="rb5" label="结束日期:" groupName="radioButtonGroup3" selected="true" click="displayIllustration()"/> <mx:Spacer width="10"/> <mx:DateField id="endDate" enabled="{!rb6.selected}" formatString="YYYY-MM-DD" selectedDate="{new Date()}" yearNavigationEnabled="true"/> <ns1:TimeInput id="endTime" enabled="{!rb6.selected}" width="220" change="displayIllustration()"/> <mx:RadioButton id="rb6" label="无结束日期" groupName="radioButtonGroup3" click="displayIllustration()"/> </mx:HBox> </mx:Panel> <mx:Panel width="100%" height="100%" layout="absolute" title="摘要"> <mx:VBox width="100%" height="100%" verticalGap="0"> <mx:HBox width="100%" height="100%" paddingBottom="2" paddingLeft="5" paddingRight="5" paddingTop="2"> <mx:Label text="说明:"/> <mx:Spacer width="100"/> <mx:TextArea id="illustration" verticalScrollPolicy="on" horizontalScrollPolicy="off" width="100%" height="100%" editable="false"/> </mx:HBox> <mx:HBox width="100%" horizontalAlign="right" verticalAlign="middle" paddingBottom="2" paddingLeft="5" paddingRight="5" paddingTop="2"> <mx:Button label="确定" width="75" click="ok();"/> <mx:Button label="关闭" width="75" click="close();"/> </mx:HBox> </mx:VBox> </mx:Panel> </mx:VBox> </mx:TitleWindow>
3Q for hzg
发表评论
-
时间组件
2010-09-01 22:22 257<?xml version="1.0&qu ... -
flex 虚线 + 沿着虚线移动的箭头 完
2010-07-12 17:21 20091.虚线方向的箭头 package view.line ... -
gifplayer
2010-07-05 07:59 742gifplayer -
ActionScript 3.0 Cookbook.pdf
2010-07-01 22:52 819ActionScript 3.0 Cookbook.pdf -
总结下最近在flex中嵌入html页面的问题
2009-12-02 16:49 5208最近在一个项目中,要在一个flex 窗体titleWind ...
相关推荐
Quartz是一款开源的作业调度框架...通过这种方式,你可以利用Quartz的强大功能在SQL Server数据库的支持下实现复杂的时间调度逻辑。记住,配置和使用过程中要根据具体需求进行调整,并确保数据库连接的安全性和稳定性。
本主题将详细介绍如何为Oracle、MySQL、DB2和SQL Server等常见数据库创建Quartz所需的表结构。 一、Oracle数据库创建Quartz表 在Oracle环境下,你需要执行一系列的SQL语句来创建Quartz的表。这些表包括QRTZ_...
此脚本适用于SQL Server,包含了创建Quartz所需的所有表和索引,以确保Quartz在SQL Server环境下能够正确运行。 使用这些脚本时,开发者应根据自己的数据库类型选择相应的文件,然后在数据库管理工具中运行这些SQL...
1. 根据你使用的数据库系统(如MySQL、Oracle、SQL Server等),选择相应的SQL脚本。 2. 修改脚本中的表前缀(如默认的`QRTZ_`),以适应你的数据库命名规范。 3. 在数据库中运行脚本,创建表结构。 4. 配置Quartz的...
在***定时备份SQL Server的软件中,直接读取XML配置文件来执行批量作业任务,这样可以方便地在不修改代码的情况下调整任务的配置,如任务名称、任务触发时间等。XML配置文件因其可读性强、易于编辑而被广泛应用。 6...
通过这样的设计,项目可以同时连接和操作MySQL与SQLServer,提供了一种灵活且高效的多数据库支持方案,尤其适合需要跨数据库系统协同工作的复杂系统。在实际部署时,还需要考虑数据同步、事务一致性等问题,确保整个...
在Quartz 2.2.3版本中,提供的SQL脚本会根据不同的数据库类型(如MySQL、Oracle、SQL Server、PostgreSQL等)有所不同,因为不同的数据库有不同的SQL语法和数据类型。 例如,在MySQL中,Quartz的初始化SQL语句可能...
这个压缩包文件“quartz-2.3.0数据库表SQL.zip”包含了为这些数据库创建和配置Quartz所需的SQL脚本。 1. **Quartz 框架**: - Quartz 框架的核心概念包括Job(作业)、Trigger(触发器)、Calendar(日历)和...
在“quartz 调用两次任务”这个问题中,我们可能遇到了一个常见问题,即同一个 Quartz 任务被错误地触发执行了两次。 在 Quartz 中,任务(Job)是通过实现 `org.quartz.Job` 接口的类来创建的,而调度则是通过 `...
quartz的数据库sql。。。quartz的数据库sql。。。quartz的数据库sql。。。quartz的数据库sql。。。quartz的数据库sql。。。quartz的数据库sql。。。quartz的数据库sql。。。quartz的数据库sql。。。quartz的数据库...
**Spring Quartz时间调用框架详解** Spring Quartz是一个在Spring框架中集成的时间调度插件,它允许开发者方便地创建和管理定时任务。Quartz是Java领域的一款功能强大的作业调度库,而Spring通过其优秀的IoC...
spring boot quartz 定时任务, quartz资源包、含22个sql文件
在"Quartz_for_DB(MySQL、SQLServer).zip"这个压缩包中,包含的是Quartz与数据库集成的示例,特别支持MySQL和SQL Server两大常见的关系型数据库系统。 首先,我们来了解一下Quartz的核心概念: 1. **Job**:代表...
quartz内部表.sql。
在本实例中,我们关注的是如何利用这些框架与SQL Server数据库进行交互,特别是关于数据库备份(`.bak`文件)的部分。SQL Server是微软提供的一款关系型数据库管理系统,广泛应用于企业级数据存储和管理。 首先,让...
quartz-1.6.6_tables_mysql.sql,供quartz用户创建12个表用。可直接执行sql脚本。
在部署Quartz时,根据选用的数据库(如MySQL、Oracle、SQL Server等),需要将"quartz-数据库建表语句.zip"中的相应SQL脚本运行在数据库上,以创建这些必要的表。这一步是Quartz配置中的关键部分,确保Quartz能够...
类似的,你还会找到针对Oracle、SQL Server、PostgreSQL等其他数据库的创建脚本。 在Quartz中配置数据库持久化时,你需要在`quartz.properties`文件中指定数据库连接的相关信息,如JDBC驱动、URL、用户名和密码,...
标题中的“quartz数据库脚本”指的是Quartz为了适配多种数据库管理系统(DBMS)而提供的SQL脚本。这些脚本包含了创建和初始化Quartz所需表的命令,确保作业、触发器、作业细节等信息能够被正确存储和检索。 描述中...
<property name="quartz.dataSource.myDS.provider">SqlServer-20 <property name="quartz.dataSource.myDS.connectionString">your_connection_string_here ``` **集群支持** 集群是为了提高系统的可用性和可扩展...