大雀软件园

首页 软件下载 安卓市场 苹果市场 电脑游戏 安卓游戏 文章资讯 驱动下载
技术开发 网页设计 图形图象 数据库 网络媒体 网络安全 站长CLUB 操作系统 媒体动画 安卓相关
当前位置: 首页 -> 技术开发 -> NET专区 -> 用vb.net开发api viewer(2)

用vb.net开发api viewer(2)

时间: 2021-07-31 作者:daque

viewer.vb结余代码private sub lstitem_selectedindexchanged(byval sender as system.object, byval e as system.eventargs) handles lstitem.selectedindexchangedif lstitem.items.count > 0 thenselect case cmboption.textcase api.cmb_typesif not lstitem.selecteditem is nothing thenif optcsharp.checked thentxtoutput.text = replace(api.types.getdatacsharp(lstitem.selecteditem()), api.apiscope, iif(optpublic.checked, api.apipubliccsharp, api.apiprivatecsharp))elsetxtoutput.text = replace(api.types.getdata(lstitem.selecteditem()), api.apiscope, iif(optpublic.checked, api.apipublic, api.apiprivate))end ifend ifcase api.cmb_constantsif not lstitem.selecteditem is nothing thenif optcsharp.checked thentxtoutput.text = replace(api.constants.getdatacsharp(lstitem.selecteditem()), api.apiscope, iif(optpublic.checked, api.apipubliccsharp, api.apiprivatecsharp))elsetxtoutput.text = replace(api.constants.getdata(lstitem.selecteditem()), api.apiscope, iif(optpublic.checked, api.apipublic, api.apiprivate))end ifend ifcase api.cmb_declaresif not lstitem.selecteditem is nothing thenif optcsharp.checked thentxtoutput.text = replace(api.declares.getdatacsharp(lstitem.selecteditem()), api.apiscope, iif(optpublic.checked, api.apipubliccsharp, api.apiprivatecsharp))elsetxtoutput.text = replace(api.declares.getdata(lstitem.selecteditem()), api.apiscope, iif(optpublic.checked, api.apipublic, api.apiprivate))end ifend ifcase elseend selectend ifend subprivate sub lstitem_click(byval sender as object, byval e as system.eventargs) handles lstitem.clickif lstitem.items.count > 0 thenselect case cmboption.textcase api.cmb_typesif not lstitem.selecteditem is nothing thenif optcsharp.checked thentxtoutput.text = replace(api.types.getdatacsharp(lstitem.selecteditem()), api.apiscope, iif(optpublic.checked, api.apipubliccsharp, api.apiprivatecsharp))elsetxtoutput.text = replace(api.types.getdata(lstitem.selecteditem()), api.apiscope, iif(optpublic.checked, api.apipublic, api.apiprivate))end ifend ifcase api.cmb_constantsif not lstitem.selecteditem is nothing thenif optcsharp.checked thentxtoutput.text = replace(api.constants.getdatacsharp(lstitem.selecteditem()), api.apiscope, iif(optpublic.checked, api.apipubliccsharp, api.apiprivatecsharp))elsetxtoutput.text = replace(api.constants.getdata(lstitem.selecteditem()), api.apiscope, iif(optpublic.checked, api.apipublic, api.apiprivate))end ifend ifcase api.cmb_declaresif not lstitem.selecteditem is nothing thenif optcsharp.checked thentxtoutput.text = replace(api.declares.getdatacsharp(lstitem.selecteditem()), api.apiscope, iif(optpublic.checked, api.apipubliccsharp, api.apiprivatecsharp))elsetxtoutput.text = replace(api.declares.getdata(lstitem.selecteditem()), api.apiscope, iif(optpublic.checked, api.apipublic, api.apiprivate))end ifend ifcase elseend selectend ifend subprivate sub cmboption_selectedindexchanged(byval sender as system.object, byval e as system.eventargs) handles cmboption.selectedindexchangeddim t as threading.threaddim bstart as boolean = falsetxtoutput.text = ""select case cmboption.textcase api.cmb_constantsif not api.constants is nothing thent = new threading.thread(addressof api.fillconstants)bstart = trueend ifcase api.cmb_declaresif not api.declares is nothing thent = new threading.thread(addressof api.filldeclares)bstart = trueend ifcase api.cmb_typesif not api.types is nothing thent = new threading.thread(addressof api.filltypes)bstart = trueend ifcase elseend selectif bstart then t.start()end subprivate sub txtsearch_textchanged(byval sender as system.object, byval e as system.eventargs) handles txtsearch.textchangedif lstitem.items.count > 0 thenlstitem.selectedindex = lstitem.findstring(txtsearch.text)end ifend subprivate sub btadd_click(byval sender as system.object, byval e as system.eventargs) handles btadd.clickif txtadd.find(txtoutput.text) > 0 thenmsgbox("data already present!", msgboxstyle.information, "add information")returnend iftxtadd.text += txtoutput.text & vbcrlf & vbcrlfend subprivate sub btclear_click(byval sender as system.object, byval e as system.eventargs) handles btclear.clicktxtadd.text = ""end subprivate sub btcopy_click(byval sender as system.object, byval e as system.eventargs) handles btcopy.clickclipboard.setdataobject(txtadd.text)end subprivate sub menuitem4_click(byval sender as system.object, byval e as system.eventargs) handles menuitem4.clickapplication.exit()end subprivate sub menuitem2_click(byval sender as system.object, byval e as system.eventargs) handles menuitem2.clickopenfiledialog1.checkfileexists = trueopenfiledialog1.checkpathexists = trueopenfiledialog1.filter = "txt files (*.txt)|*.txt|all files (*.*)|*.*"openfiledialog1.filterindex = 2if openfiledialog1.showdialog() = dialogresult.ok thendim m as api.parseapi = new api.parseapi(openfiledialog1.filename)dim i as integerdim threadconst, threaddeclare, threadtype as threading.threadapi.types = new api.ctypes()api.constants = new api.cconst()api.declares = new api.cdeclare()threadconst = new threading.thread(addressof m.getconstinfo)threadconst.start()threaddeclare = new threading.thread(addressof m.getdeclareinfo)threaddeclare.start()threadtype = new threading.thread(addressof m.gettypeinfo)threadtype.start()dim c as controlfor each c in me.controlsif not typeof c is menu thenif c.name <> "label5" thenc.enabled = trueend ifend ifnexttrythreadconst.join()threaddeclare.join()threadtype.join()catch eerror as exceptiondebug.write(eerror.stacktrace())end tryend ifend subprivate sub optprivate_checkedchanged(byval sender as system.object, byval e as system.eventargs) handles optprivate.checkedchangedif txtoutput.text <> "" thentxtoutput.text = txtoutput.text.tostring.replace(iif(optcsharp.checked, api.apipubliccsharp, api.apipublic), iif(optcsharp.checked, api.apiprivatecsharp, api.apiprivate))txtoutput.text = txtoutput.text.tostring.replace(iif(optcsharp.checked, api.apipublic, api.apipubliccsharp), iif(optcsharp.checked, api.apiprivatecsharp, api.apiprivate))end ifend subprivate sub optprivate_click(byval sender as object, byval e as system.eventargs) handles optprivate.clickif txtoutput.text <> "" thentxtoutput.text = txtoutput.text.tostring.replace(iif(optcsharp.checked, api.apipubliccsharp, api.apipublic), iif(optcsharp.checked, api.apiprivatecsharp, api.apiprivate))txtoutput.text = txtoutput.text.tostring.replace(iif(optcsharp.checked, api.apipublic, api.apipubliccsharp), iif(optcsharp.checked, api.apiprivatecsharp, api.apiprivate))end ifend subprivate sub optpublic_checkedchanged(byval sender as system.object, byval e as system.eventargs) handles optpublic.checkedchangedif txtoutput.text <> "" thentxtoutput.text = txtoutput.text.tostring.replace(iif(optcsharp.checked, api.apiprivatecsharp, api.apiprivate), iif(optcsharp.checked, api.apipubliccsharp, api.apipublic))txtoutput.text = txtoutput.text.tostring.replace(iif(optcsharp.checked, api.apiprivate, api.apiprivatecsharp), iif(optcsharp.checked, api.apipubliccsharp, api.apipublic))end ifend subprivate sub optpublic_click(byval sender as object, byval e as system.eventargs) handles optpublic.clickif txtoutput.text <> "" thentxtoutput.text = txtoutput.text.tostring.replace(iif(optcsharp.checked, api.apiprivatecsharp, api.apiprivate), iif(optcsharp.checked, api.apipubliccsharp, api.apipublic))txtoutput.text = txtoutput.text.tostring.replace(iif(optcsharp.checked, api.apiprivate, api.apiprivatecsharp), iif(optcsharp.checked, api.apipubliccsharp, api.apipublic))end ifend subprivate sub frmviewer_load(byval sender as system.object, byval e as system.eventargs) handles mybase.loaddim c as controlfor each c in me.controlsif not typeof c is menu thenc.enabled = falseend ifnextend subprivate sub optcsharp_checkedchanged(byval sender as system.object, byval e as system.eventargs) handles optcsharp.checkedchangedif lstitem.items.count > 0 thenselect case cmboption.textcase api.cmb_typesif not lstitem.selecteditem is nothing thentxtoutput.text = replace(api.types.getdatacsharp(lstitem.selecteditem()), api.apiscope, iif(optpublic.checked, api.apipubliccsharp, api.apiprivatecsharp))end ifcase api.cmb_constantsif not lstitem.selecteditem is nothing thentxtoutput.text = replace(api.constants.getdatacsharp(lstitem.selecteditem()), api.apiscope, iif(optpublic.checked, api.apipubliccsharp, api.apiprivatecsharp))end ifcase api.cmb_declaresif not lstitem.selecteditem is nothing thentxtoutput.text = replace(api.declares.getdatacsharp(lstitem.selecteditem()), api.apiscope, iif(optpublic.checked, api.apipubliccsharp, api.apiprivatecsharp))end ifcase elseend selectend ifend subprivate sub optvb_checkedchanged(byval sender as system.object, byval e as system.eventargs) handles optvb.checkedchangedif lstitem.items.count > 0 thenselect case cmboption.textcase api.cmb_typesif not lstitem.selecteditem is nothing thentxtoutput.text = replace(api.types.getdata(lstitem.selecteditem()), api.apiscope, iif(optpublic.checked, api.apipublic, api.apiprivate))end ifcase api.cmb_constantsif not lstitem.selecteditem is nothing thentxtoutput.text = replace(api.constants.getdata(lstitem.selecteditem()), api.apiscope, iif(optpublic.checked, api.apipublic, api.apiprivate))end ifcase api.cmb_declaresif not lstitem.selecteditem is nothing thentxtoutput.text = replace(api.declares.getdata(lstitem.selecteditem()), api.apiscope, iif(optpublic.checked, api.apipublic, api.apiprivate))end ifcase elseend selectend ifend subprivate sub menuitem6_click(byval sender as system.object, byval e as system.eventargs) handles menuitem6.clickmsgbox("chenyangasp事例文献")end subend class

热门阅览

最新排行

Copyright © 2019-2021 大雀软件园(www.daque.cn) All Rights Reserved.