Home > Class & module > 3.Collection > AppService

AppService

 

This class provides general application service.

 


o Summary

 Module

 Description

 Sub Clipboard_Copy (Source_String As String)

 Copy 'Source_String' to clipboard

 Sub DoEvents ()

 Process Windows Events

 Sub InstantMsg (MessageText As String)

 Show Visual Gene Developer's instant message window

 Property OptProcessStopped () As Boolean

 Check whether a user stop gene analysis or optimization process

 * It is read-only property

 Property Workspace_Value() As String

 Get or Set string value of Workspace

 

 


o Example 1

Conduct silent removal of unwanted seqeucne (GGGCGGC) and then export to clipboard

Function Main()

   SourceSeq=AppService.Workspace_Value

   SourceSeq=GeneService.Parse_DNASeq(SourceSeq) 

   ModifiedSeq=SourceSeq

   ReturnValue=GeneService.Silent_Removal_All(ModifiedSeq,"GGGCGGC")

 

   Call AppService.Clipboard_Copy("ModifiedSeq=" + ModifiedSeq)

   Main=ReturnValue

End Function

 

o Example 2

Generate 1000 random DNA sequences.

Function Main()

     SeqCount=1000: MinLength=20: MaxLength=20

     t=""

     For q=1 to SeqCount

          t= t + GeneService.Generate_RandomSeq(int(rnd(1)*MaxLength+MinLength)*3) + chr(13)+chr(10)

          Call AppService.InstantMsg("Generating " + CStr(q) + "th gene")

          Call AppService.DoEvents

     Next

     Call AppService.Clipboard_Copy(t)

     Main="Now paste it"

End Function