摘要: public static string GetIP() { using (var webClient = new WebClient()) { try { ... 阅读全文
posted @ 2014-12-08 10:44 山村果园 阅读(1314) 评论(0) 推荐(0) 编辑
摘要: C#.Net版本自动更新程序及3种策略实现C/S程序是基于客户端和服务器的,在客户机编译新版本后将文件发布在更新服务器上,然后建立一个XML文件,该文件列举最新程序文件的版本号及最后修改日期。如程序文件较多的话可以通过工具自动生成XML文件。当某客户机运行程序后会自动下载这个XML文件,通过与本地机器上的版本号匹配,如本机上的版本号比服务器上的要旧,通知客户机运行更新程序。如用户更新了版本,将最新版本号写入配置文件,这样方便下一次匹配。通过可行性分析可以使用下面3种方案下载1. 局域网共享文件夹下载2. Tcp/ip远程下载3. 通过Web方式下载1.局域网共享文件夹下载方式1适合局域网络,功 阅读全文
posted @ 2014-04-10 11:16 山村果园 阅读(4375) 评论(0) 推荐(0) 编辑
摘要: --收缩日志USE DBNAME;GO-- Truncate the log by changing the database recovery model to SIMPLE.ALTER DATABASE DBNAMESET RECOVERY SIMPLE;GO-- Shrink the truncated log file to 1 MB.DBCC SHRINKFILE (DBNAME_Log, 1);GO-- Reset the database recovery model.ALTER DATABASE DBNAMESET RECOVERY FULL;GO 阅读全文
posted @ 2014-04-09 13:38 山村果园 阅读(113) 评论(0) 推荐(0) 编辑
摘要: using System;using System.Collections.Generic;using System.Linq;using System.Web;using System.Threading;using iTextSharp.text;using System.IO;using System.Windows.Forms;using iTextSharp.text.pdf;namespace Bmw.Web.BLL{ public class OutPDF { private static System.Drawing.Bitmap bitmap; ... 阅读全文
posted @ 2014-03-14 13:53 山村果园 阅读(525) 评论(0) 推荐(0) 编辑
摘要: using System;using System.Runtime.InteropServices;public struct RASCONN{ public int dwSize; public IntPtr hrasconn; [MarshalAs(UnmanagedType.ByValTStr, SizeConst = 257)] public string szEntryName; [MarshalAs(UnmanagedType.ByValTStr, SizeConst = 17)] public string szDeviceType; [MarshalAs(UnmanagedTy 阅读全文
posted @ 2014-01-04 17:34 山村果园 阅读(505) 评论(0) 推荐(0) 编辑
摘要: 1、下载两个软件:msysgit,TortoiseGit2、先安装msysgit,再安装TortoiseGit,安装过程保持默认即可。3、为了安全,我们需要使ssh key。开始菜单--TortoiseGit-- Puttygen,点击Generate,在进度条下面随意移动鼠标,产生后如下图:(不会排版,貌似有点大)选择Save private key,保存为一个私钥,例如my.ppk。将框体中的key复制。进入github.com主页,点击右上角Account Settings,然后在左边一列找到SSH Keys,选择Add SSH key,title根据自己的需要填写,将前边的key复制进 阅读全文
posted @ 2013-12-14 00:16 山村果园 阅读(432) 评论(0) 推荐(0) 编辑
摘要: Creating a Custom Page Layout in SharePoint 2013In my last article, I documented how to create a Master Page in SharePoint 2013. Master Pages define the global chrome elements of your web site. This article explains how to create custom page layouts in SharePoint 2013. For more information on the Sh 阅读全文
posted @ 2013-09-04 13:12 山村果园 阅读(397) 评论(0) 推荐(0) 编辑
摘要: Creating a New Master Page in SharePoint 2013This article explains how to create a Master Page in SharePoint 2013 from an existing HTML page with associated graphics, scripts, CSS files, etc. This article is targeted primarily at designers who want to start customizing their SharePoint 2013 site wit 阅读全文
posted @ 2013-09-04 13:09 山村果园 阅读(491) 评论(0) 推荐(0) 编辑
摘要: 在page layout 中通过_spBodyOnLoadFunctionNames.push("js 方法名")的方式实现。但切记,代码要放到PlaceHolderMain 内部执行。在page layoutPlaceHolderMain区域内直接写,或者在该区域引入js文件皆可。。。e.g. _spBodyOnLoadFunctionNames.push("GenerateRightNavList"); function GenerateRightNavList() { var currurl = location.href; // pages u. 阅读全文
posted @ 2013-09-04 12:39 山村果园 阅读(357) 评论(0) 推荐(0) 编辑
摘要: If you are working on custom SharePoint 2013 master pages, designs and/or CSS, these little CSS classes and style statements may give you some grief, or save your tooshie… This list will continue to be updated as I come across more!Here is a quick table of contents for easier browsing:Style statemen 阅读全文
posted @ 2013-09-04 11:42 山村果园 阅读(737) 评论(0) 推荐(0) 编辑