摘要:
treeView1.SelectedNode = treeView1.Nodes[0]; //选中当前treeview控件的根节点为当前节点添加子节点: TreeNode tmp; tmp = new TreeNode("需要添加的内容"); treeView1.Se... 阅读全文
摘要:
string pathname = dt.ToString().Replace(":", ""); string str = richTextBoxResult.Text; str = str.Replace("\n", "\r\n"); //关键 File.AppendAllText(@"D... 阅读全文
摘要:
private static void InitRichTextBoxContextMenu(RichTextBox textBox) { //创建剪切子菜单 var cutMenuItem = new System.Windows.Forms.MenuItem("剪切"); cutMenuItem 阅读全文
摘要:
FileStream fs = new FileStream(@"D:\text.txt", FileMode.Append); StreamWriter sw = new StreamWriter(fs, Encoding.Default); sw.Write(strAnalasy)... 阅读全文
摘要:
备份数据库: string connectionString = "server=服务器名称;database=数据库名;uid=登入名;pwd=登入密码"; //登入名和密码在SQL Server中查找 private void btnBackDataBase_Click(... 阅读全文