You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

46 lines
1.1 KiB
C#

9 months ago
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Drawing;
using System.Data;
using System.Linq;
using System.Text;
using System.Windows.Forms;
namespace POSV
{
public partial class AbstractTemplate : UserControl
{
private NLog.Logger logger = null;
public AbstractTemplate()
{
InitializeComponent();
SetStyles();
logger = NLog.LogManager.GetLogger(GetType().FullName);
}
#region 减少闪烁
private void SetStyles()
{
SetStyle(
ControlStyles.UserPaint |
ControlStyles.AllPaintingInWmPaint |
ControlStyles.OptimizedDoubleBuffer |
ControlStyles.ResizeRedraw |
ControlStyles.DoubleBuffer , true);
//强制分配样式重新应用到控件上
UpdateStyles();
base.AutoScaleMode = AutoScaleMode.None;
}
#endregion
protected NLog.Logger LOGGER
{
get { return logger; }
}
}
}