2011年12月4日

WPF摘抄

摘要: 简单的布局有CanvasStartPoint和EndPoint表示渐变线的起点和终点,控件的左上角点的坐标为(0,0)右下角点的坐标为(1,1)。前面的数字表示水平。使用GradientStop的Offset,可以定义多个渐变点(Offset的值在0和1之间),-----------------------------------------------4.0 Framework 引用 2.0 的Sqlite,需要在根目录新建app.config文件,里面CODE如下:<?xml version="1.0"?><configuration><s 阅读全文

posted @ 2011-12-04 22:23 breakpoint 阅读(294) 评论(0) 推荐(0)

2011年11月19日

在.NET C#中使用sqlite

摘要: 1。从www.sqlite.org下载SQLite 3.3.4的版本 为了方便,我把它解压了,就一个SQLite3.exe,放入Windows目录下。 Cmd 进入命令行 1) 创建数据库文件: >SQLite3 d:\test.db 回车 就生成了一个test.db在d盘。 这样同时也SQLite3挂上了这个test.db 2) 用.help可以看看有什么命令 >.help 回车即可 3)可以在这里直接输入SQL语句创建表格 用;结束,然后回车就可以看到了 4)看看有创建了多少表 >.tables 5)看表结构 >.schema 表名 6)看看目前挂的数据库 > 阅读全文

posted @ 2011-11-19 22:08 breakpoint 阅读(473) 评论(0) 推荐(0)

2011年11月17日

Blend学习网站

摘要: http://www.silverlightchina.net/html/download/WPFResource/http://www.silverlightchina.net/html/study/WPF/http://www.silverlightchina.net/html/zhuantixilie/getstart/2011/0306/5860.htmlhttp://www.cnblogs.com/kaodigua/category/283287.html 阅读全文

posted @ 2011-11-17 22:44 breakpoint 阅读(126) 评论(0) 推荐(0)

2011年11月15日

EventEmail

摘要: using System;using System.Collections.Generic;using System.Text;using System.Windows.Forms;namespace EventEmail{ public class MailData { public readonly string from, to, subject, body; public MailData(string from, string to, string subject, string body) { this.from = from; this.to = to; this.subject 阅读全文

posted @ 2011-11-15 22:43 breakpoint 阅读(164) 评论(0) 推荐(0)

EventExample1

摘要: using System;namespace EventExample1{ public delegate void ChangedEventHandler(object sender, EventArgs e); public class MyText { public event ChangedEventHandler Changed; protected virtual void OnChanged() { if (Changed != null) { Changed(this, null); } } private string _text = string.Empty; public 阅读全文

posted @ 2011-11-15 22:43 breakpoint 阅读(117) 评论(0) 推荐(0)

OperationDelegate

摘要: using System;namespace DelegateSample1{ //define delegate public delegate int OperationDelegate(int x, int y); class Operator { private int _x, _y; static void Main(string[] args) { OperationDelegate del = null; del += new OperationDelegate(Plus); del += new OperationDelegate(Subtract); Operator op 阅读全文

posted @ 2011-11-15 22:40 breakpoint 阅读(123) 评论(0) 推荐(0)

WinLogs

摘要: using System.Diagnostics;using System;namespace ConsoleApplication1{ class WinLogs { private static void Main44() { EventLog log = new EventLog("MyEvent"); //System 默认是Application // 首先应判断日志来源是否存在,一个日志来源只能同时与一个事件绑定 if (!EventLog.SourceExists("MyApplicationCCC")) //向非Application事件 阅读全文

posted @ 2011-11-15 22:38 breakpoint 阅读(149) 评论(0) 推荐(0)

Yield

摘要: //Copyright (C) Microsoft Corporation. All rights reserved.using System;using System.Collections.Generic;using System.Text;namespace Yield{ class Yield { public static class NumberList { // Create an array of integers. public static int[] ints = { 1, 2, 3, 5, 8, 13, 21, 34, 55, 89, 144, 233, 377 }; 阅读全文

posted @ 2011-11-15 22:36 breakpoint 阅读(199) 评论(0) 推荐(0)

ThreadingTester

摘要: using System;using System.Threading;namespace ThreadingTester{ class ThreadingTester { public static void trmain() { for (int x = 0; x < 100; x++) { Thread.Sleep(1000); Console.WriteLine(x); } } static void Main(string[] args) { Thread thrd1 = new Thread(new ThreadStart(trmain)); thrd1.Start(); f 阅读全文

posted @ 2011-11-15 22:35 breakpoint 阅读(89) 评论(0) 推荐(0)

ThreadClass

摘要: using System;using System.Threading;using System.Linq;using System.Collections.Generic;namespace ThreadingTester{ /*“Lambda 表达式”是一个匿名函数,它可以包含表达式和语句,并且可用于创建委托或表达式目录树类型。 所有 Lambda 表达式都使用 Lambda 运算符 =>,该运算符读为“goes to”。该 Lambda 运算符的左边是输入参数(如果有),右边包含表达式或语句块。 => 标记称作 lambda 运算符。该标记在 lambda 表达式中用来将左侧 阅读全文

posted @ 2011-11-15 22:35 breakpoint 阅读(242) 评论(0) 推荐(0)

导航