上一页 1 ··· 6 7 8 9 10 11 12 下一页
摘要: 连接数据库操作: string s = "Data Source=服务器名称;Initial Catalog=数据库名称;Integrated Security=True"; //连接数据库所需要的字符串 SqlConnection con = new SqlConnection(); c... 阅读全文
posted @ 2015-08-27 00:10 best.lei 阅读(178) 评论(0) 推荐(0) 编辑
摘要: treeView1.SelectedNode = treeView1.Nodes[0]; //选中当前treeview控件的根节点为当前节点添加子节点: TreeNode tmp; tmp = new TreeNode("需要添加的内容"); treeView1.Se... 阅读全文
posted @ 2015-08-26 23:58 best.lei 阅读(290) 评论(0) 推荐(0) 编辑
摘要: string pathname = dt.ToString().Replace(":", ""); string str = richTextBoxResult.Text; str = str.Replace("\n", "\r\n"); //关键 File.AppendAllText(@"D... 阅读全文
posted @ 2015-08-26 23:50 best.lei 阅读(959) 评论(0) 推荐(0) 编辑
摘要: private static void InitRichTextBoxContextMenu(RichTextBox textBox) { //创建剪切子菜单 var cutMenuItem = new System.Windows.Forms.MenuItem("剪切"); cutMenuItem 阅读全文
posted @ 2015-08-26 23:48 best.lei 阅读(1941) 评论(0) 推荐(0) 编辑
摘要: FileStream fs = new FileStream(@"D:\text.txt", FileMode.Append); StreamWriter sw = new StreamWriter(fs, Encoding.Default); sw.Write(strAnalasy)... 阅读全文
posted @ 2015-08-26 23:44 best.lei 阅读(6140) 评论(0) 推荐(0) 编辑
摘要: 备份数据库: string connectionString = "server=服务器名称;database=数据库名;uid=登入名;pwd=登入密码"; //登入名和密码在SQL Server中查找 private void btnBackDataBase_Click(... 阅读全文
posted @ 2015-08-26 06:39 best.lei 阅读(2918) 评论(0) 推荐(0) 编辑
摘要: 首先后台进程创建一个PendingIntent对象,其中PendingIntent中包含一个真正的Intent,创建完成后将此PendingIntent对象交给桌面控件所在的进程,当用户点击桌面控件或者其他情况时,触发Intent,从而可实现启动一个Activity、发送一个Broadcast、... 阅读全文
posted @ 2015-08-25 04:37 best.lei 阅读(244) 评论(0) 推荐(0) 编辑
摘要: AppWidgetProviderInfo对象: 为App Widget提供元数据(描述数据的数据,如XML、关系型数据的表结构),包括布 局,更新频率等数据。这个对象被定义在XML文件当中; AppWidgetProvider: 定义了App Widget的基本生命周... 阅读全文
posted @ 2015-08-20 21:35 best.lei 阅读(151) 评论(0) 推荐(0) 编辑
摘要: 首先MainActivity继承自ExpandableListActivity,其中的声明如下: setContentView(R.layout.expandmain); //定义一个:List,该List对象为一级条目提供数据 List> parents = new Arra... 阅读全文
posted @ 2015-08-13 22:31 best.lei 阅读(317) 评论(0) 推荐(0) 编辑
摘要: DatePickerDialog选择日期,调用showDialog(int id)方法,会执行onCreateDialog方法: @Override protected Dialog onCreateDialog(int id) { switch(id){ c... 阅读全文
posted @ 2015-08-12 21:15 best.lei 阅读(211) 评论(0) 推荐(0) 编辑
上一页 1 ··· 6 7 8 9 10 11 12 下一页