摘要:
要实现类似于谷歌地图拖拽功能,可以用s:Scroller标签来实现,代码如下:mxml:1 2 3 4 5 其中的component:Diagram为自己定义的组件,只需替换成你要放置的东西就OK.皮肤文件 -->1.ScrollerSkin.mxml: 1 2 3 4 5 11 12 13 14 46 47 48 49 View Code 2.VScrollerSkin.mxml: ... 阅读全文
posted @ 2013-08-08 12:57
Thyiad
阅读(427)
评论(0)
推荐(0)
摘要:
Flex中,进度条的皮肤,以及使用Timer让它自动增加~mxml中: 1 18 19 as中:(注意:没有贴上整个的,只是取了其中相关的) 1 private var requestDataTimer:Timer = new Timer(50); 2 3 public function complete():void 4 { 5 //register event. 6 requestDataTimer.addEventListener(TimerEvent.TIMER, progressOnRequestDataTimer); 7 } 8 9 private fu... 阅读全文
posted @ 2013-08-08 11:24
Thyiad
阅读(486)
评论(0)
推荐(0)
摘要:
STAThread:singlethreadedapartment 直译过来是:单线程单元套间MTAThread:multiple threaded apartment 直译过来是:多线程单元套间差别其实就是这个:其他线程对STA中的COM对象的访问需要列集(marshal),通过列集,自动实现了多线程访问下的同步。所有线程对MTA中的COM对象的访问不需要列集,直接访问,需要COM组件自身实现多线程下的同步。COM对象和客户端的组件模型设定, 决定最终的组件模型时怎样, 以下这篇文章挺详细:http://www.cnblogs.com/ioexception/p/dotnet_STAThre 阅读全文
posted @ 2013-08-08 10:45
Thyiad
阅读(934)
评论(0)
推荐(0)
摘要:
需要用到MemoryFailPoint:using(MemoryFailPoint mfp=new MemoryFailPoint(1500)){ //Do using many memory account}catch(InsufficientMemoryException e){ throw e ;} 阅读全文
posted @ 2013-08-08 10:02
Thyiad
阅读(226)
评论(0)
推荐(0)
摘要:
//获取程序的基目录。System.AppDomain.CurrentDomain.BaseDirectory//获取模块的完整路径。System.Diagnostics.Process.GetCurrentProcess().MainModule.FileName//获取和设置当前目录(该进程从中启动的目录)的完全限定目录。System.Environment.CurrentDirectory//获取应用程序的当前工作目录。System.IO.Directory.GetCurrentDirectory()//获取和设置包括该应用程序的目录的名称。System.AppDomain.Curren 阅读全文
posted @ 2013-08-08 10:00
Thyiad
阅读(198)
评论(0)
推荐(0)
摘要:
.netFramework4.0中对读取64位注册表做了支持,只需要一个RegistryView:RegistryKey localMachine = RegistryKey.OpenBaseKey(RegistryHive.LocalMachine, RegistryView.Registry64); 阅读全文
posted @ 2013-08-08 09:56
Thyiad
阅读(193)
评论(0)
推荐(0)
摘要:
RT,不赘述,代码以下: 1 const int WM_SYSCOMMAND = 0x112; 2 const int SC_CLOSE = 0xF060; 3 const int SC_MINIMIZE = 0xF020; 4 const int SC_MAXIMIZE = 0xF030; 5 protected override void WndProc(ref Message m) 6 { 7 if (m.Msg == WM_SYSCOMMAND) 8 { 9 if (m.WParam.ToInt32() == SC_MINIMIZE) 10 ... 阅读全文
posted @ 2013-08-08 09:27
Thyiad
阅读(259)
评论(0)
推荐(0)
摘要:
之前在做一个任务时, 需要比较字符串的相似度, 最终整理了一个出来, 以下: 1 /* 2 * Copyright (c) 2013 Thyiad 3 * Author: Thyiad 4 * Create date: 2013/08/08 5 */ 6 7 using System; 8 9 namespace Thyiad.Utility 10 { 11 /// 12 /// Operates about string. 13 /// 14 public static class StringUtil 15 { 16... 阅读全文
posted @ 2013-08-08 09:15
Thyiad
阅读(283)
评论(0)
推荐(0)

浙公网安备 33010602011771号