Loading

09 2020 档案

摘要:场景 在Winform中一般弹出对话框使用的是MessageBox,而在 DevExpress中使用的是XtraMessageBox实现对话框。 效果 实现 首先新建确认按钮的调用方法: public DialogResult Confirm(string strString) { return D 阅读全文
posted @ 2020-09-30 12:48 云辰 阅读(1121) 评论(0) 推荐(0) 编辑
摘要:dev的XtraMessageBox控件使用起来很美观,但默认显示确定的是英文,如下图: 通过下面代码可使“OK”显示为中文:首先创建一个继承自Localizer的类: using DevExpress.XtraEditors.Controls; public class MessboxClass 阅读全文
posted @ 2020-09-30 11:46 云辰 阅读(218) 评论(0) 推荐(0) 编辑
摘要://方法1SaveFileDialog fileDialog = new SaveFileDialog(); fileDialog.Title = "导出Excel"; fileDialog.Filter = "Excel文件(*.xls)|*.xls"; DialogResult dialogRe 阅读全文
posted @ 2020-09-30 11:43 云辰 阅读(268) 评论(0) 推荐(0) 编辑
摘要:1 //显示行号 2 private void gridView1_CustomDrawRowIndicator(object sender, DevExpress.XtraGrid.Views.Grid.RowIndicatorCustomDrawEventArgs e) 3 { 4 e.Appe 阅读全文
posted @ 2020-09-30 11:39 云辰 阅读(295) 评论(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) 编辑
摘要:1.提前使用NuGet程序包导入Log4Net.dll 2.在AssemblyInfo.vb文件中,写入如下配置(注意如果是放到文件夹内,需要加入文件路径地址)。 如果无法打印信息,看log4net.config文件是否在Debug文件夹内 <Assembly: log4net.Config.Xml 阅读全文
posted @ 2020-09-30 10:29 云辰 阅读(1259) 评论(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) 编辑
摘要:首先要添加自定义的Enum 1 Enum WeekDays 2 3 周日 = 1 4 5 周一 = 2 6 7 周二 = 3 8 9 周三 = 4 10 11 周四 = 5 12 13 周五 = 6 14 15 周六 = 7 16 17 End Enum 调用: Dim weekStr As Str 阅读全文
posted @ 2020-09-29 14:44 云辰 阅读(1523) 评论(0) 推荐(1) 编辑
摘要:首先要添加 .IsBodyHtml = True 1 ''' <summary> 2 ''' SFC系统发送邮件 3 ''' </summary> 4 ''' <param name="MailTitle">邮件标题</param> 5 ''' <param name="MailContent">邮 阅读全文
posted @ 2020-09-29 14:42 云辰 阅读(487) 评论(0) 推荐(0) 编辑
摘要:记得提前先使用NeGet程序包提前导出NPOI相关dll引用 DataGridView导出Excel 1 ''' <summary> 2 ''' 获取EXCEL表格真正的值 3 ''' </summary> 4 ''' <param name="cell"></param> 5 ''' <retur 阅读全文
posted @ 2020-09-28 09:43 云辰 阅读(1855) 评论(0) 推荐(0) 编辑
摘要:原先自带是英文样式: 更改之后的样式: 一.先新增MyGridLocalizer.vb类 1 Imports DevExpress.XtraGrid.Localization 2 3 Public Class MyGridLocalizer 4 Inherits GridLocalizer 5 6 阅读全文
posted @ 2020-09-28 09:25 云辰 阅读(321) 评论(0) 推荐(0) 编辑
摘要:GridView整行一条或者多行复制到剪贴板 private void menu_CopyInfo_Click(object sender, EventArgs e) { int[] selectedRow = this.gridView1.GetSelectedRows(); if (select 阅读全文
posted @ 2020-09-27 09:34 云辰 阅读(1980) 评论(0) 推荐(0) 编辑
摘要:1 public Form1() 2 { 3 InitializeComponent(); 4 gridControl1.DataSource = CreatDataTable(); 5 gridView1.OptionsBehavior.Editable = false; 6 //gridView 阅读全文
posted @ 2020-09-22 21:05 云辰 阅读(1248) 评论(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) 编辑
摘要:using System; using System.Collections.Generic; using System.Diagnostics; using System.IO; using System.Text; using GH.Commons.Log; namespace OracleIm 阅读全文
posted @ 2020-09-09 13:54 云辰 阅读(259) 评论(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) 编辑

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