Ò׽ؽØͼÈí¼þ¡¢µ¥Îļþ¡¢Ãâ°²×°¡¢´¿ÂÌÉ«¡¢½ö160KB

VB ±í´ïʽÔÚ.net WF 4.0ÖеÄÓ÷¨

ÔÚ×îеÄWindows Workflow Fonudation(WF4, ÏÂÎÄÖн«¼ò³ÆWF4)ÖУ¬WFÖÐÒýÈëÁËVB expression£¬Óû§¿ÉÒÔͨ¹ývb±í´ïʽΪ±äÁ¿¸³Öµ¡£ÓÐÐËȤµÄÅóÓÑ¿ÉÒÔ°²×°VS 2010£¬È»ºóʹÓÃÒ»ÏÂÕâ¸ö¹¦ÄÜ¡£¹ØÓÚÕâ¸ö¹¦ÄܵIJο¼£¬Çë¿´£ºhttp://msdn.microsoft.com/en-us/library/ee342461.aspx   ʲô£¿ ²»ÖªµÀɶÊÇWF£¬Å¶£¬ÐÒ¿÷ÄãÓöµ½ÎÒ£¬ÈÃÎÒÀ´¸æËßÄã¡£ÓÐÁ½¸ö½â¾ö°ì·¨£º1. Ö±½Ó²»Òª¿´ÕâƪÎÄÕÂÁË¡£2. »ØÈ¥¿´4¸öСʱWFµÄÎÄÕ£¬ÏÈÈë¸öÃÅ¡£
¿´Íê±¾ÎÄ£¬½«¸øÄãÒ»¸ö½â¾ö·½°¸£¬¾ÍÊÇÓû§¿ÉÒÔͨ¹ý×Ô¼ºÐ´µÄexpressionµÃµ½ÏëÒªµÄ½á¹û¡£Õâ¸öexpressionÊÇÏà¶Ô¸´Ôӵġ£ÄǾÍÊÇ¿ÉÒÔÊÇÈÎÒâµÄvb±í´ïʽ¡£Çë×¢Ò⣬ÊDZí´ïʽ£¬ÏëÓÃʲôwhileд´ó¶Î´úÂëµÄÇëÈÆ·¡£
·Ï»°²»Ëµ£¬ÏÈ˵˵ÎÒµÄ˼·£¬¾ÍÊǵ±ÎÒ·¢ÏÖÕâ¸öWF4µÄ·½·¨ºó£¬ÓÐÁËÒ»¸öÏë·¨£¬¾ÍÊÇÄܲ»ÄÜ°ÑÕâ¸öexpressionÓõ½ÎÒÃǵÄÆÕͨ¹¤³ÌÖÐÈ¥¡£¿ÉÒÔʵÏÖÓû§Í¨¹ýexpression¶ÔÊä³ö½á¹ûµÄ¿ØÖÆ¡£ÕâÑù¶ÔÓÚÓû§Óи´ÔÓÐèÇóºÍÐèÒª¸´ÔÓ±¨±íµÄÏîÄ¿ÓкܴóµÄ°ïÖú¡£ÓеãÀàËÆExcelÖеÄexpression¡£µ«WF4ÖеÄexpressionÓ¦¸Ã¸ü¼ÓÇ¿´óÒ»µã¡£Ö§³ÖÀàºÍÀàµÄÊôÐÔ¡£
ÏÂÃæ¿´´úÂ룺
1.  Ð½¨Ò»¸öFakeCodeActivity À࣬¼Ì³Ð×ÔCodeActivity¡£ÓÃÕâ¸öÀàÀ´´¦Àí´«ÈëµÄexpression¡£
class FakeCodeActivity<T> : CodeActivity
{
// Define an activity input argument of type string
    public InArgument<T> Expression { get; set; }
    public T Value {get; private set;}
    // If your activity returns a value, derive from CodeActivity<TResult>
    // and return the value from the Execute method.
    protected override void Execute(CodeActivityContext context)
    {
        // Obtain the runtime value of the Text input argument
        Value = (T)context.GetValue(
this.Expression);
}
}
2. дÁËÒ»¸ö¾²Ì¬º¯ÊýÀ´ÊµÏÖ¹¦ÄÜ¡£
// Evaluate<Class1, int>("x.A + x.B", "x", x);
public static T Evaluate<S, T>(string expression, string varName, S obj)
{
string assemblyname = typeof(S).Assembly.GetName().Name;
string ns = typeof(S).Namespace;
VisualBasicSettings vbSettings = new Vis


Ïà¹ØÎĵµ£º

ÓÃvbʵÏÖ¼ÆËã»ú¹¦ÄÜ


±¨¸æÊé
Ãû³Æ
ʵÑé10-1 ʵÏÖ¼ÆËãÆ÷µÄ¹¦ÄÜ
ÐÕÃû
 
Ö¸µ¼½Ìʦ
 
ѧºÅ
 
ÈÕÆÚ
 
ÈÎÎñÇåµ¥
ÔÚ±¾Á·Ï°ÖУ¬Ä㽫ʹ»æÖƵļÆËãÆ÷Íê³É¼òµ¥µÄËÄÔòÔËËã¡£
1)        Æô¶¯Visual Studio 2005¡£
2)        н¨Ò»¸öVB WindowsÓ ......

VB ϵͳÈȼüʵÏÖ£¨Ä£¿é£©

µ÷Ó÷½·¨ºÜ¼òµ¥£¬ÔÚFormÖÐÈçÏÂÊéд´úÂ룺
Private Sub Form_Load()
SetHotkey 1, "Ctrl,112", "Add" '°´ Ctrl+F1 ¼¤»îÖ¸¶¨³ÌÐò£¬F1µÄAsciiÂëΪ112
SetHotkey 2, 113, "Add" '°´ F2 ¼¤»îÖ¸¶¨³ÌÐò£¬F2µÄAsciiÂëΪ113
SetHotkey 3, "Ctrl+Alt,113", "Add" '°´ Ctrl+Alt+F2 ¼¤»îÖ¸¶¨³ÌÐò£¬F2µÄAsciiÂëΪ113
End Sub
Priva ......

¡¾VB½çÃæ¡¿×ÓÀ໯ÖØ»æ·ÂQQ2009½¥±ä°´Å¥(Ä£¿é)

'*************************************************************************
''----------------------------------------------------------------------
'**ϵͳÃû³Æ£º×ÓÀ໯ÖØ»æ·ÂQQ2009½¥±ä°´Å¥
'**Ä£¿éÃèÊö£º
'**Ä£ ¿é Ãû£ºForm1
'**´´ ½¨ ÈË£ºgvu
'**×÷ÕßÍøÕ¾£ºhttp://hi.baidu.com/googlevipuser
'**E-Mai ......

VB°æ Ö²Îï´óÕ½½©Ê¬ÐÞ¸ÄÆ÷

Ö²Îï´óÕ½½©Ê¬Õâ¸öСÓÎÏ·×öµÄ»¹Õæ²»´í£¬ÎÒ¿´µ½Á˼¸¸ö°æ±¾µÄÖ²Îï´óÕ½½©Ê¬ÐÞ¸ÄÆ÷£¬ÈçC++°æ£¬C#°æ£¬ËùÒԾ͸ÄдÁËÒ»¸öVB°æ±¾µÄ£¬ÒÔÏÂÊÇÔ´Âë
'½çÃæÖÐÓÐÁ½¸ö°´Å¥£¬·Ö±ðÊÇcmdSunUnlimited£¨captionΪÆôÓÃÑô¹âÎÞÏÞ£©£¬cmdMoneyUnlimited£¨captionΪÆôÓýðÇ®ÎÞÏÞ£©£¬²¢ÇÒÐèÒª·ÅÁ½¸öTimer¿Ø¼þ£¬Ãû³ÆΪĬÈÏÖµtimer1ºÍtimer2
'»ùµØÖ·Ö± ......

vb¹ÜµÀÔËÓÃʵÀý

 Õª×ÔVB°É¸ßÊÖ¾¨ÎÞµÐÐÖµÄÒ»¶Î¹ÜÊ×ʾÀý´úÂ룺
'******* ¶ÁÈ¡DOS³ÌÐòipconfig.exeµÄ·µ»Ø½á¹û£º ********
'×÷Õߣº ¾¨Î޵Р2006-10-19 21:57
'**************************************************
'´°Ìå´úÂ룺Form1
'**************************************************
Option Explicit
Private Const NOR ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØͼ | ¸ÓICP±¸09004571ºÅ