摘要: 1Q:使用Flex Bulider3建立一下新的.mxml的页面时默认的背景是蓝色的,请问用什么办法能修改掉此背景颜色,以至于下次创建时背景不是为默认的蓝色的呢?请写出你认为正确的方法. A:这个问题之前还真没想过,查看了下。我直接是从4开始用的。3没怎么用过。 3的答案是:修改sdk\frameworks\projects\framework\default.css里Application的backgroundColor: #0000FF; 4的是根据Adobe Flash Builder 4 Plug-in\sdks\4.1.0\frameworks\themes\Spark中的... 阅读全文
posted @ 2012-11-19 11:23 刀锋浪 阅读(448) 评论(0) 推荐(0) 编辑
摘要: 下面有四种方法,估计好用的应该是第三种吧。1.用JAVA自带的函数 public static boolean isNumeric(String str){ for (int i = str.length();--i>=0;){ if (!Character.isDigit(str.charAt(i))){return false; } }return true; } 2.正则表达式 public static boolean isNumeric(String str){ Pattern pattern = Pattern.compile("[0-9]*"); ret 阅读全文
posted @ 2012-11-16 10:17 刀锋浪 阅读(746) 评论(0) 推荐(0) 编辑
摘要: TextInput有个属性叫restrict,设置该属性即可。例如:只允许输入数字和负号:<s:TextInput id="textinput_LOGOLeftW" restrict="0-9\-\+" />只允许输入数字和点号:<mx:TextInput id="txt" restrict="0-9\." />只允许输入数字、英文、汉字:<mx:TextInput restrict="0-9\a-z\^{'[\u4e00-\u9fa5]'}"/&g 阅读全文
posted @ 2012-11-16 10:16 刀锋浪 阅读(282) 评论(0) 推荐(0) 编辑
摘要: <?xml version="1.0" encoding="utf-8"?><s:Group xmlns:fx="http://ns.adobe.com/mxml/2009" xmlns:s="library://ns.adobe.com/flex/spark" xmlns:mx="library://ns.adobe.com/flex/mx" width="118" height="24" creationComplete=" 阅读全文
posted @ 2012-11-15 11:03 刀锋浪 阅读(412) 评论(0) 推荐(0) 编辑
摘要: 在网上找的,进行优化完善...myChooseTimepackage com.gps.view.component.nmsDateFiled{ import flash.events.Event; import mx.containers.HBox; import mx.containers.Panel; import mx.controls.ComboBox; import mx.controls.Label; import mx.formatters.DateFormatter; public class myChooseTime extends Panel { public var... 阅读全文
posted @ 2012-11-15 10:59 刀锋浪 阅读(575) 评论(0) 推荐(0) 编辑
摘要: C#绘图双缓冲C#双缓冲解释:简单说就是当我们在进行画图操作时,系统并不是直接把内容呈现到屏幕上,而是先在内存中保存,然后一次性把结果输出来,如果没用双缓冲的话,你会发现在画图过程中屏幕会闪的很厉害,因为后台一直在刷新,而如果等用户画完之后再输出就不会出现这种情况,具体的做法,其实也就是先创建一个位图对象,然后把内容保存在里面,最后把图呈现出来。GDI+的双缓冲问题 一直以来的误区:.net1.1 和 .net 2.0 在处理控件双缓冲上是有区别的。.net 1.1 中,使用:this.SetStyle(ControlStyles.DoubleBuffer, true);.net 2.0中,使 阅读全文
posted @ 2012-10-26 17:01 刀锋浪 阅读(512) 评论(0) 推荐(0) 编辑
摘要: 阅读全文
posted @ 2012-08-03 18:08 刀锋浪 阅读(532) 评论(0) 推荐(0) 编辑
摘要: using System;using System.Collections.Generic;using System.ComponentModel;using System.Data;using System.Drawing;using System.Linq;using System.Text;using System.Windows.Forms;using System.Data.SqlClient;namespace WindowsFormsApplication1{ public partial class Form2 : Form { int pageSiz... 阅读全文
posted @ 2012-08-03 18:04 刀锋浪 阅读(181) 评论(0) 推荐(0) 编辑
摘要: using System;using System.Collections.Generic;using System.ComponentModel;using System.Data;using System.Drawing;using System.Linq;using System.Text;using System.Windows.Forms;using System.Threading;namespace backGroundWorker{ public partial class Form1 : Form { public Form1() { ... 阅读全文
posted @ 2012-08-03 17:56 刀锋浪 阅读(310) 评论(0) 推荐(0) 编辑