当前位置:首页 » 软件开发
开发技术指南» 文章正文
    引言: // 南京千里独行 2005-3-17
 

 

 ·简单的datagrid多表头制作方法    »显示摘要«
    摘要: 1.简单的datagrid多表头制做!!! 可在html中的datagrid的最后绑定列中写 headertext=”ok</td></tr><td>dd</td></tr>” 看加的页眉总头的多少而写td的多少!然后在代码中写: private void dgrbasic_itemdatabound......
 ·c#实现window管道技术    »显示摘要«
    摘要: 之前发了一篇使用window api来实现管道技术的文章,后来改用c#来实现相同的效果,发现c#本身方便的进程线程机制使工作变得简单至极,随手记录一下。 首先,我们可以通过设置process类,获取输出接口,代码如下: process proc = new process(); proc .startinfo.filename = strscript; proc .s......


C#代码
// 南京千里独行 2005-3-17

/// <summary> 【程序编程相关:NeoSwiff的图像按钮

【推荐阅读:Thinking:元数据?Obsolet

/// </summary> 【扩展信息:用以在记录文件中写入自定义的调试信息(主

/// 进度信息处理委托

/// <param name="completedstep" type="int">已经完成的步骤数</param>

/// <param name="totalstep" type="int">总的步骤数</param>

public delegate void progresshandler( int completedstep , int totalstep );

/// <summary>

/// 通用函数集合

/// </summary>

public class yyfcommon

{

/// <summary>

/// 向指定url使用post方法发送数据的例程,本函数不进行错误处理

/// </summary>

/// <param name="strurl">url字符串</param>

/// <param name="bytsend">要发送的二进制数据</param>

/// <param name="sendprogress">发送数据时的进度处理</param>

/// <param name="acceptprogress">接受数据时的进度处理</param>

/// <returns>接受到的二进制数据</returns>

public static byte[] httppostdata(

string strurl ,

byte[] bytsend ,

progresshandler sendprogress ,

progresshandler acceptprogress )

{

// 发送数据

system.net.httpwebrequest myreq =(system.net.httpwebrequest) system.net.webrequest.create( strurl );

myreq.method = "post" ;

system.io.stream mystream = myreq.getrequeststream();

int icount = 0 ;

if( sendprogress != null)

sendprogress( 0 , bytsend.length );

while( icount < bytsend.length )

{

if( icount + 1024 > bytsend.length)

{

mystream.write(bytsend, icount , bytsend.length - icount );

icount = bytsend.length ;

}

else

{

mystream.write(bytsend , icount , 1024);

icount += 1024;

}

if( sendprogress != null)

sendprogress( icount , bytsend.length );

}//while


...   下一页
 ·writingtexttoafile(visualbasic)    »显示摘要«
    摘要: this example writes a string to a text file using the writeline method of the streamwriter class. example dim file as new system.io.streamwriter("c:\test.txt") file.writeline(&quo......
» 本期热门文章:

©2000-2007 All Rights Reserved. 最佳浏览:1024X768 MSIE