问题描述
现在急需呢,网上找不到合适的,如果有高手,就请回答吧,小女子在此谢过!或者你们上传一个浏览器给我参考参考,菜单栏的功能代码也正苦苦寻找着:比如新建,打开,另存为,查看文件源代码等功能。要用webbrowser和tabcontrol实现的。有代码或者程序发我邮箱:382709743@163.com谢谢
解决方案
本帖最后由 ttt382709743 于 2011-05-02 23:12:15 编辑
解决方案二:
打开就没什么可说的了,就是弹出一个新的窗体让你输入URI后webBrowser1.Navigate(this.textBox1.Text);另存为:usingSystem.Net;usingSystem.IO;privatestringGetResponse(stringurl){url.Trim();HttpWebRequestreq=(HttpWebRequest)WebRequest.Create(url);req.AllowAutoRedirect=true;req.MaximumAutomaticRedirections=3;//text/xml;charset=uft-8req.UserAgent="Mozilla/4.0(compatible;MSIE6.0;WindowsNT5.2;.NETCLR1.1.4322)";req.Referer=req.RequestUri.ToString();req.KeepAlive=true;//req.Method="Get";req.Timeout=-1;HttpWebResponsewebresponse=null;try{webresponse=(HttpWebResponse)req.GetResponse();if(webresponse!=null){StreamReaderreader=newStreamReader(webresponse.GetResponseStream(),System.Text.Encoding.GetEncoding("gb2312"));returnreader.ReadToEnd();}}catch(System.Net.WebExceptionex){returnnull;}if(webresponse!=null){return"";}return"";}privatevoidbutton1_Click(objectsender,EventArgse){strings=GetResponse("http://xxxx.xx");MessageBox.Show(s);}
解决方案三:
顶楼上。。
解决方案四:
引用1楼xiongxyt2的回复:
新建有个NewWindo,用OnNewWindow方法触发打开就没什么可说的了,就是弹出一个新的窗体让你输入URI后webBrowser1.Navigate(this.textBox1.Text);另存为:C#codeusingSystem.Net;usingSystem.IO;privatestringGetResponse(str……
有用
解决方案五:
接分下载要分却没分真可悲
解决方案六:
老子是来灌水拿分的!
解决方案七:
抖一抖把分带走
解决方案八:
每天回帖即可获得10分可用分
解决方案九:
跟贴,顶上去
解决方案十:
我有的,发你邮箱
解决方案十一:
跟贴,顶上去
解决方案十二:
38returnCCU_ERR_MPI_MODE_NOT_SUPPORT381g_ucLedStatusBak[ucLedNum]=LED_ON382g_ucLedStatusBak[ucLedNum]383g_stLedBlink[ucLedNum]384if((ucLedNum>=LED_NUM)||(ucLedMode>=LED_MODE_END)){return11;}/*若此时LED灯工作状态为测试模式,不响应后续的任何对LED灯的操作*/if((LED_MODE_TEST==284.ucLedMode)&&(LED_MODE_AUTO==ucLedMode)){383=LED_ON381;}/*单次控制on时,闪灯控制停止*/384.ucEnable=CCU_FALSE;384.ucLedMode=ucLedMode;/*若此时LED灯工作在正常模式,需要记录LED灯的状态*/if(LED_MODE_AUTO==384.ucLedMode){383=LED_ON384.ucLedStatus=LED_ON;}returnADP_Led(ucLedNum,LED_ON,0,0);39同38/*..*/if(..){..=LED_OFF;381;}/*..*/同38;同38;/*..*/if(..){..=LED_OFF;..=LED_OFF;}returnADP_Led(ucLedNum,LED_OFF,0,0);40g_ucLedStatusBak[ucLedNum]=LED_BLINK401同38/*..*/if(..){401;381;}/*闪灯控制使能*/..=CCU_TRUE;..=ucLedMode;/*..*/if(..){401;..=LED_BLINK;}returnADP_Led(ucLedNum,LED_BLINK,wBlinkOnTime,wBlinkPeriod);41g_stLedBlink[i]411UINT8i=0;staticUINT16uwTestCounter[LED_NUM]={0};for(i=0;i<LED_NUM;i++){411.wCnt=0;}for(;;){/*处理各个LED的闪灯*/for(i=0;i<LED_NUM;i++){/*若LED灯工作模式为正常模式*/if(LED_MODE_AUTO==411.ucLedMode){if(CCU_FALSE==411.ucEnable){continue;}if((411.wPeriod<=411.wOntime)||(0==411.wPeriod)||(0==411.wOntime)){continue;}if(411.wCnt>=411.wPeriod){ADP_Led(i,LED_ON,0,0);411.wCnt=0;}if(411.wCnt==411.wOntime){ADP_Led(i,LED_OFF,0,0);}411.wCnt++;}/*若LED灯工作模式为测试状态或其他状态,30S后自动恢复为正常状态*/else{/*测试模式定时器*/uwTestCounter[i]++;if(uwTestCounter[i]==(g_aulResumeTimer[i]*10)){411.ucLedStatus=g_ucLedStatusBak[i];411.ucLedMode=LED_MODE_AUTO;uwTestCounter[i]=0;/*恢复LED灯测试前的状态*/if(LED_OFF==411.ucLedStatus){ADP_Led(i,LED_OFF,0,0);}elseif(LED_ON==411.ucLedStatus){ADP_Led(i,LED_ON,0,0);}else{411.ucEnable=CCU_TRUE;}}}}/*延时100ms*/ADA_Sleep(100);}
解决方案十三:
42DBG_DRVADP(LP_WARN421INTi=0;INT32iRet=CCU_ERR;pthread_thLedThread=CCU_NULL_LONG;for(i=0;i<LED_NUM;i++){411.wOntime=0;411.wPeriod=0;411.ucEnable=CCU_FALSE;411.ucLedMode=LED_MODE_AUTO;411.ucLedStatus=LED_CTRL_TYPE_END;}for(i=0;i<LED_NUM;i++){g_aulResumeTimer[i]=30;}/*创建软件定时器线程*/iRet=(INT32)ADA_CreatThread((FUNC_ENTRY)LedBlinkThread,CCU_NULL_PTR,CCU_NORMAL_STACK_SIZE,&hLedThread);if(CCU_OK!=iRet){421,"createthreadLedBlinkThreadfail");}221;43CCU_Snprintf(acTmpStr,sizeof(acTmpStr)431CCU_System(acTmpStr)432close(iADHandle)433UINT8i=0;UINT16wDevNum=0;INTiErrNo=0;INTiADHandle=0;CHARacTmpStr[CCU_FILE_PATH_LEN]={''};constCHAR*acDevADC="spear-adc";/*创建ADC的节点文件*/if(CCU_OK!=GetDeviceNum((UINT8*)acDevADC,(UINT8)CCU_StrLen(acDevADC),&wDevNum)){421,"GetDeviceNumspear-adcfail");}else{for(i=0;i<CCU_AD_CHN_NUM;i++){CCU_MemSet(acTmpStr,'',CCU_FILE_PATH_LEN);431,"/dev/adc%d",i);/*如果节点已创建,不再创建*/if(CCU_OK!=CCU_Access(acTmpStr,F_OK)){431,"mknod/dev/adc%dc%d%d",i,wDevNum,i);432;}}}/*配置8个AD通道*/iADHandle=open(g_acDevFile[0],O_RDONLY);if(iADHandle<0){50,"Errorinopeningdevice%s",g_acDevFile[0]);221;}/*这个只需配置一次*/iErrNo=ioctl(iADHandle,ADCIOC_CONFIG,&stAdcCfg);if(iErrNo<0){50,"IOCTLforADCIOC_CONFIGreturnerror%derrno%d",iErrNo,errno);//perror("DevicecannotbeconfiguredusingADCIOC_CONFIG");433;221;}433;221;44INTiFdMem=0;iFdMem=open("/dev/mem",O_RDWR|O_SYNC);if(iFdMem<0){50,"open/dev/memforcpldmapfail");221;}/*创建CPLDmmap*/g_pucCpldMemBase=(UINT8*)mmap(0,CCU_CPLD_OFFSET_MAX,PROT_READ|PROT_WRITE,MAP_SHARED,iFdMem,CCU_CPLD_BASE_ADDR);/*创建不成功返回地址为全F*/if(MAP_FAILED==g_pucCpldMemBase){g_pucCpldMemBase=CCU_NULL_PTR;50,"mmapcpldtomemfail");close(iFdMem);221;}close(iFdMem);221;
解决方案十四:
45UINT8i=0;UINT16wDevNum=0;CHARacTmpStr[CCU_FILE_PATH_LEN]={''};constCHAR*acDevDS1820="ds1820";/*创建DS18b20节点*/if(CCU_OK!=GetDeviceNum((UINT8*)acDevDS1820,(UINT8)CCU_StrLen(acDevDS1820),&wDevNum)){421,"GetDeviceNumds1820fail");}else{for(i=0;i<CCU_DS1820_CHN_NUM;i++){CCU_MemSet(acTmpStr,'',CCU_FILE_PATH_LEN);431,"/dev/ds1820-%d",i);/*如果节点已创建,不再创建*/if(CCU_OK!=CCU_Access(acTmpStr,F_OK)){431,"mknod/dev/ds1820-%dc%d%d",i,wDevNum,i);432;}}}221;46UINT16wDevNum=0;CHARacTmpStr[CCU_FILE_PATH_LEN]={''};constCHAR*acJtag_ctl="jtag_ctl";/*创建DS18b20节点*/if(CCU_OK!=GetDeviceNum((UINT8*)acJtag_ctl,(UINT8)CCU_StrLen(acJtag_ctl),&wDevNum)){421,"GetDeviceNumJtag_ctlfail");}else{CCU_MemSet(acTmpStr,'',CCU_FILE_PATH_LEN);431,"/dev/jtag_ctl");/*如果节点已创建,不再创建*/if(CCU_OK!=CCU_Access(acTmpStr,F_OK)){431,"mknod/dev/jtag_ctlc%d0",wDevNum);432;}}221;47同46;同46;constCHAR*ac88e6060="88e6060";/*同46*/if(同46((UINT8*)ac88e6060,(UINT8)CCU_StrLen(ac88e6060),..)){421,"GetDeviceNum88e6060fail");}else{同46;431,"/dev/88e6060");/*同46*/if(同46){431,"mknod/dev/88e6060c%d0",wDevNum);432;}}221;48UINT8i=0;key_tkey=0;for(i=0;i<DRIVER_SEM_NUM;i++){key=(key_t)(SEM_IPC_START_POS_DRIVER+i);if(CCU_OK!=ADA_CreatMutexSem(key,(INT32*)&g_lDriverSemId[i])){421,"creatchan%dsemfail",i);221;}DBG_DRVADP(LP_INFO,"createdriversem%xsuccess",key);}221;49/*初始化驱动适配模块*/CHECK_FUNC_RTN_VALUE(CCU_OK,Init_DriverSem(),CCU_ERR);InitCrc16Table();InitCrc32Table();/*初始化AD驱动适配各驱动模块初始化失败继续执行不考虑返回值*/(VOID)Init_ADCDriver();(VOID)Init_Led();/*初始化DS1820驱动适配*/(VOID)Init_DS1820();/*初始化DS1820驱动适配*/(VOID)Init_JTAG_Ctl();(VOID)Init_88e6060();/*初始化cpldmmap*/(VOID)Init_CPLDMemMap();221;
解决方案十五:
学习吧!
解决方案:
顶一顶,每天得十分
解决方案:
标记,学习
解决方案:
该回复于2011-10-21 09:01:10被版主删除
解决方案:
该回复于2011-11-14 16:59:58被版主删除
解决方案:
该回复于2011-11-15 09:36:53被版主删除
解决方案:
该回复于2011-11-15 10:01:01被版主删除
解决方案:
下载要积分很烦
解决方案:
这些回答我很无语!
解决方案:
唉咱还没到那个层次呢
解决方案:
该回复于2012-02-15 16:49:17被版主删除
解决方案:
该回复于2012-03-20 21:30:09被版主删除