daixinet

  博客园  :: 首页  :: 新随笔  :: 联系 :: 订阅 订阅  :: 管理

08 2012 档案

摘要:WPF调用WinForm中的 OpenFileDialog 和 FolderBrowserDialog 来实现响应的功能 OpenFileDialog openFileDialog = new OpenFileDialog(); openFileDialog.Title = "选择文件"; openFileDialog.Filter = "zip文件|*.zip|rar文件|*.rar|所有文件|*.*"; openFileDialog.FileName = string.Empty; openFileDi... 阅读全文
posted @ 2012-08-29 15:57 daixinet.com 阅读(16224) 评论(0) 推荐(1)

摘要:效果图: 关键代码:类型判断 if (rIndex == 1) { cell.CellValue = new CellValue(item.ToString()); } else if (rIndex == 2) { cell.CellValue = new C... 阅读全文
posted @ 2012-08-29 10:54 daixinet.com 阅读(796) 评论(0) 推荐(0)

摘要:用foreach遍历二维数组 static void Main(string[] args) { object[,] dataArray = { { 1, 2, 3 }, { 4, 5, 6 }, { 7, 8, 9 } }; int count = 0; foreach (object item in dataArray) { Console.Write(item); Console.Write(" "... 阅读全文
posted @ 2012-08-28 15:34 daixinet.com 阅读(6175) 评论(0) 推荐(0)

摘要:创建Excel private static void CreateSpreadSheet() { string fileName = "E:\\01.xlsx"; string sheetName = "test"; using (SpreadsheetDocument spreadSheet = SpreadsheetDocument.Create(fileName, SpreadsheetDocumentType.Workbook)) { //... 阅读全文
posted @ 2012-08-28 13:53 daixinet.com 阅读(1704) 评论(0) 推荐(0)

摘要:0、更改模板效果:代码: ... 阅读全文
posted @ 2012-08-22 15:40 daixinet.com 阅读(30878) 评论(0) 推荐(3)

摘要:http://code.msdn.microsoft.com/windowsdesktop/Dynamic-Image-Button-in-WPF-caec28b7#content 阅读全文
posted @ 2012-08-21 14:39 daixinet.com 阅读(1253) 评论(0) 推荐(0)

摘要:在WPF中设计登录窗口关闭时打开主窗口,自动生成的App.xaml不能满足要求,1、把App.xaml的属性窗口中的生成操作设定为 无2、添加Program类 static class Program { /// /// The main entry point for the application. /// [STAThread] static void Main() { LoginWindow loginForm = new LoginWindow(); ... 阅读全文
posted @ 2012-08-16 14:26 daixinet.com 阅读(14445) 评论(7) 推荐(1)

摘要:(25[0-5]|2[0-4][0-9]|[0-1]{1}[0-9]{2}|[1-9]{1}[0-9]{1}|[1-9])\.(25[0-5]|2[0-4][0-9]|[0-1]{1}[0-9]{2}|[1-9]{1}[0-9]{1}|[1-9]|0)\.(25[0-5]|2[0-4][0-9]|[0-1]{1}[0-9]{2}|[1-9]{1}[0-9]{1}|[1-9]|0)\.(25[0-5]|2[0-4][0-9]|[0-1]{1}[0-9]{2}|[1-9]{1}[0-9]{1}|[0-9]) 阅读全文
posted @ 2012-08-16 10:56 daixinet.com 阅读(290) 评论(0) 推荐(0)

摘要:WPF和Silverlight环境下KeyDown和KeyUp的本身不同,其中KeyDown不响应一些功能键,而KeyUp响应。 阅读全文
posted @ 2012-08-16 10:45 daixinet.com 阅读(2185) 评论(0) 推荐(0)

摘要:今天做WPF项目,遇到添加引用后,在代码中找不到引用,原来项目的目标框架为.NET Framework 4 Client Profile,把框架改为.NET Framework 4,编译通过 阅读全文
posted @ 2012-08-15 11:17 daixinet.com 阅读(251) 评论(0) 推荐(0)