摘要:找了半天找到的解决办法,看介绍说是javascript的闭包问题,导致得不能直接读取外部的那个函数,不然就所有传递的参数都变为最后一个了。 var newopen = function(id,level) { return function() { opentree(id,level);//该函数为外部定义的一个执行函数; } } x.attachEvent("onclick...
阅读全文
文章分类 - Win Form
摘要:公司的帮助文档要从繁体转简体,有1000多个程序,要一个一个的手工转,岂不是要累死人,只好写一个批次处理的程序: 本来打算用string str = File.ReadAllText(this.txtTag.Text + @"\\" + _finfo.Name, Encoding.Default);,再用方法Microsoft.VisualBasic.Strings.StrCon...
阅读全文
摘要:利用数据集作为数据源,在winform中导出Excel。 1、首先要确保使用的机器安装Office工具。 然后在工程中添加如下引用。 using System; using System.Collections.Generic; using System.ComponentModel; using System.Data; using System.Data....
阅读全文
摘要:读: //打开某文件(假设web.config在根目录中) string filename=Server.MapPath("/") + @"WebApplication1\web.config"; XmlDocument xmldoc= new XmlDocument(); xmldoc.Load(filename); //得到顶层节点列表 XmlNodeL...
阅读全文
摘要:这是我附的源代码,实现的备份和恢复很简单,大家可以自己在补充....(有BUG的话,欢迎指教) 这是WEB后台程序 using System;using System.Data;using System.Configuration;using System.Web;using System.Web.Security;using System.Web.UI;using System.Web.UI.W...
阅读全文
摘要:C#中直接调用VB.NET的函数,兼论半角与全角、简繁体中文互相转化 在C#项目中添加引用Microsoft.VisualBasic.dll, 可以在C#程序中直接使用VB.NET中丰富的函数 程序输出: // 命令行编译 : csc /r:Microsoft.VisualBasic.dll Test.cs // 如果是用 Visual Studio .NET IDE, 请按以下方法...
阅读全文
摘要:winform的treeview控件点击鼠标右键是不能引起SelectNode属性跟着改变的,这回引起右键菜单不正确,解决办法是在treeView控件的mousedown事件中加入如下代码 private void treeViewConditon_MouseDown(object sender, System.Windows.Forms.MouseEventArgs e) ...
阅读全文
摘要:这篇文章来自是Mukund Pujari的《Some Cool Tips for .NET》,本人给大家翻译总结一下,我英语水平也就那么回事,不合适的地方还是请大家提出来。 1. 如何创建一个可改变大小没有标题栏的窗体?(How to create a form with resizing borders and no title bar?) form1.Text = string. Empt...
阅读全文
摘要:using System.Collections; ArrayList list = new ArrayList();list.Add (new DictionaryEntry ("1","投诉"));list.Add (new DictionaryEntry ("2","举报"));list.Add (new DictionaryEntry ("3","建议"));list.Add (new...
阅读全文

浙公网安备 33010602011771号