清理无用代码
This commit is contained in:
@@ -1,10 +1,6 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Drawing;
|
||||
using System.Linq;
|
||||
using System.Reflection;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
using System.Windows.Forms;
|
||||
|
||||
namespace JinYuan.Helper
|
||||
@@ -41,7 +37,7 @@ namespace JinYuan.Helper
|
||||
/// </summary>
|
||||
/// <param name="dgv"></param>
|
||||
/// <param name="e"></param>
|
||||
public static void DgvRowPrePaint(DataGridView dgv,string Column, object sender, DataGridViewRowPrePaintEventArgs e)
|
||||
public static void DgvRowPrePaint(DataGridView dgv, string Column, object sender, DataGridViewRowPrePaintEventArgs e)
|
||||
{
|
||||
|
||||
if (e.RowIndex >= dgv.Rows.Count - 1)
|
||||
@@ -50,7 +46,7 @@ namespace JinYuan.Helper
|
||||
|
||||
try
|
||||
{
|
||||
if(dr.Cells[Column].Value != null)
|
||||
if (dr.Cells[Column].Value != null)
|
||||
{
|
||||
if (dr.Cells[Column].Value.Equals("OK"))
|
||||
{
|
||||
@@ -66,7 +62,7 @@ namespace JinYuan.Helper
|
||||
dr.Cells[Column].Style.ForeColor = Color.Red;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
@@ -117,7 +113,7 @@ namespace JinYuan.Helper
|
||||
public static void DoubleBufferedDataGirdView(this DataGridView dgv, bool flag)
|
||||
{
|
||||
Type dgvType = dgv.GetType();
|
||||
PropertyInfo pi = dgvType.GetProperty("DoubleBuffered", BindingFlags.Instance | BindingFlags.NonPublic);
|
||||
PropertyInfo pi = dgvType.GetProperty("DoubleBuffered", BindingFlags.Instance | BindingFlags.NonPublic);
|
||||
pi.SetValue(dgv, flag, null);
|
||||
}
|
||||
|
||||
@@ -130,7 +126,7 @@ namespace JinYuan.Helper
|
||||
public static void DoubleBufferedListView(this ListView lv, bool flag)
|
||||
{
|
||||
Type lvType = lv.GetType();
|
||||
PropertyInfo pi = lvType.GetProperty("DoubleBuffered", BindingFlags.Instance | BindingFlags.NonPublic);
|
||||
PropertyInfo pi = lvType.GetProperty("DoubleBuffered", BindingFlags.Instance | BindingFlags.NonPublic);
|
||||
pi.SetValue(lv, flag, null);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user