閺€鎯版 (0) +1 鐠э拷 (0) +1 闊拷 (0) +1
閺€鎯版閹存劕濮�閺屻儳婀呴弨鎯版>>

正在阅读:用C#去除代码的SourceSafe管理用C#去除代码的SourceSafe管理

2004-06-16 10:10 出处:CSDN 作者:zhzuo 责任编辑:linjixiong


                         sr.Close();

                            start = content.IndexOf(strStart);

                       }

                       if(start!=-1)//文件需要去除标签

                       {

                            using(FileStream fs = new FileStream(file,FileMode.Truncate,FileAccess.Write,FileShare.Read))

                            {

                                 end = start+content.Substring(start).IndexOf(strEnd)+offSet;

                                 content = content.Substring(0,start)+content.Substring(end);

                                 StreamWriter sw = new StreamWriter(fs);

                                 sw.Write(content);

                                 sw.Close();

                            }

                            OnOperateNotify(this,new VssEventArgs(file+"去除标签完成"));

                       }

                   }

                   catch(Exception ex)

                   {

                       OnOperateNotify(this,new VssEventArgs(file+"操作错误:"+ex.ToString()));

                   }

              }            

     }

   

当此为止,上面的程序实现了主要的功能,不过上面定义的事件,下面就是关于事件的函数,


         /// <summary>

         /// 操作信息事件通知

 


察看评论详细内容 我要发表评论
作者笔名 简短内容 发表时间
:

键盘也能翻页,试试“← →”键

关注我们

最新资讯离线随时看 聊天吐槽赢奖品
閹靛婧€鐠佸潡妫�閸ョ偛鍩屾い鍫曞劥