随笔分类 - WinForm
摘要:1. winform发布设置,注意:这里的地址http://192.168.199.128:8088,他会自己去找你创建的 /var/www/default这里的default文件目录,所以只需要写IP+端口就可以 2. Linux服务器安装Jexus,官网Jexus Web Server 官网下载
阅读全文
摘要:1 using System; 2 using System.Collections.Generic; 3 using System.Diagnostics; 4 using System.Linq; 5 using System.Runtime.InteropServices; 6 using S
阅读全文
摘要:解决安装到C盘后提示没有权限解决方案: 1. VS中右键项目=》属性=》安全性,勾选【启用ClickOne安全设置】 2. 找到app.manifest,将 <requestedExecutionLevel level="asInvoker" uiAccess="false" /> 修改为 <req
阅读全文
摘要:/// <summary> /// 提供正态分布的数据和图片 /// </summary> public class StandardDistribution { /// <summary> /// 样本数据 /// </summary> public List<double> Xs { get;
阅读全文
摘要:private PlotModel _plotModel; public PlotModel plotModel { get { return _plotModel; } set { _plotModel = value; Rai...
阅读全文
摘要://检测端口是否使用 public static bool VerifyListenerPort(int port) { bool inUse = false; System.Net.NetworkInformation.IPGlobalProperties ipProperties = System.Net.NetworkInformation.IPGlobalProperties.Get...
阅读全文
摘要://Server: TProtocolFactory ProtocolFactory = new TBinaryProtocol.Factory(true, true); TTransportFactory TransportFactory = new TFramedTransport.Factory(); ser...
阅读全文
摘要:#region 用于在PictureBox控件中显示选择的图片 /// <summary> /// 用于在PictureBox控件中显示选择的图片 /// </summary> /// <param name="openF">图像名</param> /// <param name="MyImage"
阅读全文
摘要:1、调用非托管的dll[csharp]view plaincopyusingSystem.Runtime.InteropServices;//DllImport命名空间的引用classtest//提示音{[DllImport("winmm.dll")]publicstaticexternboolPl...
阅读全文
摘要:第一种方法: DataTable dt = new DataTable(); dt.Columns.Add( "name" ); dt.Columns.Add( "value" ); DataRow dr = dt.NewRow(); dr[0] = "活动" ; dr[1] = "1" ; dt.
阅读全文
摘要:Winform下的语言国际化,几行代码轻松实现 最近做了一些关于winform的项目,需要用到winform的语言国际化,在初使化的时候用起来非常方便。可以参考一下: 核心逻辑: 预览效果演示: OK,以下是核心代码和操作流程 一,添加LanguageHelper类 1 2 3 4 5 6 7 8
阅读全文
摘要:using System; using System.Collections.Generic; using System.ComponentModel; using System.Data; using System.Drawing; using System.Text; using System.
阅读全文
摘要:很多人都苦恼于如何在子窗体中操作主窗体上的控件,或者在主窗体中操作子窗体上的控件。相比较而言,后面稍微简单一些,只要在主窗体中创建子窗体的时候,保留所创建子窗体对象即可。 下面重点介绍前一种,目前常见的有两种方法,基本上大同小异: 第一种,在主窗体类中定义一个静态成员,来保存当前主窗体对象,例如:
阅读全文
摘要:最近研究微信公众平台,搭建了一个微信聊天机器人,调用小黄鸡的公众接口,实现在线和小黄鸡聊天的功能。 接口调用不是很麻烦,不过是php版本,所以研究了一下C#的功能模块, Winfrom版 using System; using System.Collections.Generic; using Sy
阅读全文