Loading

随笔分类 -  winform

摘要:1 using System; 2 using System.Collections.Generic; 3 using System.ComponentModel; 4 using System.Data; 5 using System.Drawing; 6 using System.Linq; 7 阅读全文
posted @ 2021-07-21 10:09 云辰 阅读(89) 评论(0) 推荐(0) 编辑
摘要:1.打开项目属性,点击生成事件,选择编辑后期生成 2.点击宏命令 3.编辑宏命令 3.1.先创建固定文件夹的路径。MD【创建文件夹命令】, $(SolutionDir)【双击选择的宏则自动带出,表示解决方案的路径】,..【表示返回上一层文件夹命令】,Library【文件夹名】 MD $(Soluti 阅读全文
posted @ 2021-07-15 10:40 云辰 阅读(943) 评论(0) 推荐(0) 编辑
摘要:1.将dll添加到自定义分页上的选项卡上 2.拖入界面窗体 3.后台添加逻辑代码 using System; using System.Collections.Generic; using System.ComponentModel; using System.Data; using System. 阅读全文
posted @ 2021-07-05 16:41 云辰 阅读(445) 评论(0) 推荐(0) 编辑
摘要:1.注意:必须使用.net Core以上版本的winform才能使用,.Net4.X系列无法使用,建议使用.Net 5创建。 2. 添加ASP.NET Core、Serilog支持 2.1 Nuget 安装相关Nuget包 Microsoft.Extensions.Hosting要指定版本,不能高于 阅读全文
posted @ 2021-06-02 09:30 云辰 阅读(2361) 评论(0) 推荐(0) 编辑
摘要:1.在Program.cs文件类新增如下方法: 1 public static class Program 2 { 3 public static GlobalControl gc = new GlobalControl(); //存储全局变量类 4 5 /// <summary> 6 /// 应用 阅读全文
posted @ 2020-10-30 17:31 云辰 阅读(143) 评论(0) 推荐(0) 编辑
摘要:自定义设置属性窗口: public partial class UserControl1 : UserControl { public UserControl1() { InitializeComponent(); } public Image PicImage { get => pictureBo 阅读全文
posted @ 2020-10-30 17:13 云辰 阅读(211) 评论(0) 推荐(0) 编辑
摘要:#region [DateTimePicker控件加入ToolStripControl] /// <summary> /// 添加DateTimePicker方法 /// </summary> /// <param name="n">传入需要添加的位置参数</param> private void 阅读全文
posted @ 2020-10-14 14:34 云辰 阅读(140) 评论(0) 推荐(0) 编辑
摘要:#region [设定ComboBox数据源] private Dictionary<string, string> GetScoreStatus() { Dictionary<string, string> dic = new Dictionary<string, string> { {"2", 阅读全文
posted @ 2020-10-14 14:31 云辰 阅读(246) 评论(0) 推荐(0) 编辑
摘要:DialogResult result = MessageBox.Show($"当前失败数据共计{failCount}条,是否上传?", "提示", MessageBoxButtons.YesNo, MessageBoxIcon.Question); if (result == DialogResu 阅读全文
posted @ 2020-10-14 14:29 云辰 阅读(263) 评论(0) 推荐(0) 编辑
摘要:1.配置信息 [assembly: log4net.Config.XmlConfigurator(Watch = true)] 或者 [assembly: log4net.Config.XmlConfigurator(ConfigFile = @"log4net.config", Watch = t 阅读全文
posted @ 2020-09-30 10:33 云辰 阅读(327) 评论(0) 推荐(0) 编辑
摘要:log4net使用中loginfo.IsInfoEnabled、loginfo.IsErrorEnabled等一直为false时解决方法一、检查Log4net.config属性设置,Copy to output directory项必须设置为:copy if new 或copy always;二、将 阅读全文
posted @ 2020-09-30 10:22 云辰 阅读(583) 评论(0) 推荐(0) 编辑
摘要:一.在AssemblyInfo.cs文件添加以下内容 或者 [assembly: log4net.Config.XmlConfigurator(Watch = true)] [assembly: log4net.Config.XmlConfigurator(ConfigFile = "ConfigF 阅读全文
posted @ 2020-09-21 09:02 云辰 阅读(217) 评论(0) 推荐(0) 编辑
摘要:在Program.cs入口处添加方法: #region Mutex private static Mutex mutex = null; /// <summary> /// 重复启动检测 /// </summary> /// <remarks> /// tips:此逻辑不能放在Main方法中 /// 阅读全文
posted @ 2020-09-16 10:39 云辰 阅读(373) 评论(0) 推荐(0) 编辑
摘要:更新界面通用方法: #region 是否正在导出 /// <summary>正在工作 </summary> bool IsWorking { get { return isWorking; } set { ChangeControlEnabled(!value); isWorking = value 阅读全文
posted @ 2020-09-16 10:32 云辰 阅读(198) 评论(0) 推荐(0) 编辑
摘要:恢复内容开始 #region 移动窗口 [DllImport("user32.DLL", EntryPoint = "ReleaseCapture")] private extern static void ReleaseCapture(); [DllImport("user32.DLL", Ent 阅读全文
posted @ 2020-09-16 10:25 云辰 阅读(791) 评论(0) 推荐(0) 编辑
摘要:/// <summary> /// 检测CMD命令是否通过 /// </summary> /// <param name="command">CMD命令</param> /// <returns></returns> public static bool CmdError(string comman 阅读全文
posted @ 2020-09-08 09:19 云辰 阅读(864) 评论(0) 推荐(0) 编辑
摘要:#region 刷新ListBox界面信息 private void RefreshDistributedListbox(string msg, StateType type) { if (this.listBoxControl_Distributed.Items.Count > 0 && this 阅读全文
posted @ 2020-08-28 09:14 云辰 阅读(254) 评论(0) 推荐(0) 编辑
摘要:private void MovePanelSid(Control btn) { panelside.Top = btn.Top; panelside.Height = btn.Height; } private void button1_Click(object sender, EventArgs 阅读全文
posted @ 2020-03-23 16:04 云辰 阅读(767) 评论(0) 推荐(0) 编辑
摘要:在NuGet搜索Costura,引用此dll,打包成EXE文件的时候会合并到EXE,不会产生dll,比如数据库dll(OracleAccessDatabase.dll) 注意:由于可能会报如下错误~ Fody is only supported on MSBuild 16 and above. Cu 阅读全文
posted @ 2020-02-20 17:10 云辰 阅读(1870) 评论(0) 推荐(0) 编辑
摘要:从数据库把时间读出来,接着 你用个timer控件启用控件,设置1000毫秒timer时间里 用当前时间-你取出的时间 就可以了 DateTime furtime = Convert.ToDateTime("2012-08-08 00:00:00"); //将来的某一天,如果不是将来的某个时间,则需要 阅读全文
posted @ 2019-10-16 09:22 云辰 阅读(626) 评论(0) 推荐(0) 编辑

点击右上角即可分享
微信分享提示