Skip to content

Commit

Permalink
fix DataGrid glitter
Browse files Browse the repository at this point in the history
  • Loading branch information
Elem8100 committed Oct 17, 2023
1 parent bacd13e commit b73c77a
Show file tree
Hide file tree
Showing 22 changed files with 181 additions and 17 deletions.
13 changes: 12 additions & 1 deletion MapleNecrocer/AvatarForm.cs
Expand Up @@ -35,6 +35,16 @@ public AvatarForm()
Instance = this;
}

protected override CreateParams CreateParams
{
get
{
CreateParams cp = base.CreateParams;
cp.ExStyle |= 0x02000000;
return cp;
}
}

public static bool ChangeExpressionListBox;
public static AvatarForm Instance;
public static AvatarFormDraw AvatarFormDraw;
Expand Down Expand Up @@ -223,7 +233,6 @@ private void AvatarForm_Load(object sender, EventArgs e)
if (e.Item == null) return;
Wz_Node Node = Wz.GetNodeByID(e.Item.FileName, WzType.Character);
MainForm.Instance.QuickView(Node);
MainForm.Instance.ToolTipView.Owner=this;
}
Expand Down Expand Up @@ -322,6 +331,8 @@ private void AvatarForm_Load(object sender, EventArgs e)
};

Inventory.SetToolTipEvent(WzType.Character,this);

AddEqps("00002000");
AddInventory();
ResetDyeGrid();
Expand Down
9 changes: 9 additions & 0 deletions MapleNecrocer/CashForm.cs
Expand Up @@ -24,6 +24,15 @@ public CashForm()
DataGridViewEx CashListGrid;
bool HasLoaded1;

protected override CreateParams CreateParams
{
get
{
CreateParams cp = base.CreateParams;
cp.ExStyle |= 0x02000000;
return cp;
}
}
private void CashForm_Shown(object sender, EventArgs e)
{
this.FormClosing += (s, e1) =>
Expand Down
10 changes: 10 additions & 0 deletions MapleNecrocer/ChairForm.cs
Expand Up @@ -20,6 +20,16 @@ private void ChairForm_Load(object sender, EventArgs e)

}

protected override CreateParams CreateParams
{
get
{
CreateParams cp = base.CreateParams;
cp.ExStyle |= 0x02000000;
return cp;
}
}

void CellClick(BaseDataGridView DataGrid, DataGridViewCellEventArgs e)
{
if (Morph.IsUse)
Expand Down
9 changes: 9 additions & 0 deletions MapleNecrocer/ConsumeForm.cs
Expand Up @@ -27,6 +27,15 @@ public ConsumeForm()
DataGridViewEx ConsumeListGrid;
DataGridViewEx ConsumeEffectListGrid;
bool HasLoaded1, HasLoaded2;
protected override CreateParams CreateParams
{
get
{
CreateParams cp = base.CreateParams;
cp.ExStyle |= 0x02000000;
return cp;
}
}
private void ConsumeForm_Shown(object sender, EventArgs e)
{
this.FormClosing += (s, e1) =>
Expand Down
6 changes: 4 additions & 2 deletions MapleNecrocer/DataGridViewEx.cs
Expand Up @@ -153,6 +153,7 @@ public void SetToolTipEvent(WzType WzType, Form Form)
string ID = this.Rows[e.RowIndex].Cells[0].Value.ToString();
Wz_Node Node = Wz.GetNodeByID(ID, WzType);
MainForm.Instance.QuickView(Node);
MainForm.Instance.ToolTipView.Owner = Form;
};

this.CellMouseLeave += (s, e) =>
Expand All @@ -161,13 +162,14 @@ public void SetToolTipEvent(WzType WzType, Form Form)
{
this.Rows[e.RowIndex].DefaultCellStyle.BackColor = Color.White;
}
};

this.SearchGrid.CellMouseEnter += (s, e) =>
{
if (e.RowIndex >= 0 && e.ColumnIndex >= 0)
{
this.Rows[e.RowIndex].DefaultCellStyle.BackColor = Color.LightCyan;
this.SearchGrid.Rows[e.RowIndex].DefaultCellStyle.BackColor = Color.LightCyan;
}
this.Refresh();
string ID = this.SearchGrid.Rows[e.RowIndex].Cells[0].Value.ToString();
Expand All @@ -180,7 +182,7 @@ public void SetToolTipEvent(WzType WzType, Form Form)
{
if (e.RowIndex >= 0 && e.ColumnIndex >= 0)
{
this.Rows[e.RowIndex].DefaultCellStyle.BackColor = Color.White;
this.SearchGrid.Rows[e.RowIndex].DefaultCellStyle.BackColor = Color.White;
}
};
}
Expand Down
10 changes: 9 additions & 1 deletion MapleNecrocer/EtcForm.cs
Expand Up @@ -23,7 +23,15 @@ public EtcForm()
ImageListView ImageGrid;
DataGridViewEx EtcListGrid;
bool HasLoaded1;

protected override CreateParams CreateParams
{
get
{
CreateParams cp = base.CreateParams;
cp.ExStyle |= 0x02000000;
return cp;
}
}
private void EtcForm_Shown(object sender, EventArgs e)
{
this.FormClosing += (s, e1) =>
Expand Down
9 changes: 9 additions & 0 deletions MapleNecrocer/MedalForm.cs
Expand Up @@ -22,6 +22,15 @@ public MedalForm()
public static MedalForm Instance;
public DataGridViewEx MedalListGrid;

protected override CreateParams CreateParams
{
get
{
CreateParams cp = base.CreateParams;
cp.ExStyle |= 0x02000000;
return cp;
}
}
void CellClick(BaseDataGridView DataGrid, DataGridViewCellEventArgs e)
{
MedalTag.Delete();
Expand Down
1 change: 1 addition & 0 deletions MapleNecrocer/MobForm.Designer.cs

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

17 changes: 13 additions & 4 deletions MapleNecrocer/MobForm.cs
Expand Up @@ -23,8 +23,17 @@ public MobForm()
public static MobForm Instance;
public DataGridViewEx MobListGrid;
string MobID;


/*
protected override CreateParams CreateParams
{
get
{
CreateParams cp = base.CreateParams;
cp.ExStyle |= 0x02000000;
return cp;
}
}
*/
private void MobForm_Load(object sender, EventArgs e)
{

Expand Down Expand Up @@ -74,7 +83,7 @@ private void MobForm_Shown(object sender, EventArgs e)
};

MobListGrid.SetToolTipEvent(WzType.Mob, this);

string ID = null;
string Name = null;
Win32.SendMessage(MobListGrid.Handle, false);
Expand Down Expand Up @@ -137,7 +146,7 @@ private void MobForm_KeyDown(object sender, KeyEventArgs e)
{
if (e.Alt)
e.Handled = true;
if (!textBox2.Focused)
if (!textBox2.Focused && !textBox1.Focused)
ActiveControl = null;

}
Expand Down
1 change: 1 addition & 0 deletions MapleNecrocer/MountForm.Designer.cs

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

13 changes: 11 additions & 2 deletions MapleNecrocer/MountForm.cs
Expand Up @@ -21,8 +21,17 @@ public MountForm()
}
public static MountForm Instance;
public DataGridViewEx MountListGrid;



protected override CreateParams CreateParams
{
get
{
CreateParams cp = base.CreateParams;
cp.ExStyle |= 0x02000000;
return cp;
}
}

void CellClick(BaseDataGridView DataGrid, DataGridViewCellEventArgs e)
{
//if (Morph.IsUse)
Expand Down
9 changes: 9 additions & 0 deletions MapleNecrocer/PetForm.cs
Expand Up @@ -21,6 +21,15 @@ public PetForm()
public static PetForm Instance;
public DataGridViewEx PetListGrid, PetEquipListGrid;
public static string PetID;
protected override CreateParams CreateParams
{
get
{
CreateParams cp = base.CreateParams;
cp.ExStyle |= 0x02000000;
return cp;
}
}

void CellClick(BaseDataGridView DataGrid, DataGridViewCellEventArgs e)
{
Expand Down
9 changes: 9 additions & 0 deletions MapleNecrocer/RingForm.cs
Expand Up @@ -9,6 +9,15 @@ public RingForm()
}
public static RingForm Instance;
public DataGridViewEx RingListGrid;
protected override CreateParams CreateParams
{
get
{
CreateParams cp = base.CreateParams;
cp.ExStyle |= 0x02000000;
return cp;
}
}

void CellClick(BaseDataGridView DataGrid, DataGridViewCellEventArgs e)
{
Expand Down
1 change: 1 addition & 0 deletions MapleNecrocer/SkillForm.Designer.cs

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

17 changes: 15 additions & 2 deletions MapleNecrocer/SkillForm.cs
Expand Up @@ -23,7 +23,15 @@ public SkillForm()
public static SkillForm Instance;
public DataGridViewEx SkillListGrid, UseListGrid;
int SelectRow;

protected override CreateParams CreateParams
{
get
{
CreateParams cp = base.CreateParams;
cp.ExStyle |= 0x02000000;
return cp;
}
}
void CellClick(BaseDataGridView DataGrid, DataGridViewCellEventArgs e)
{
var Rec = DataGrid.GetCellDisplayRectangle(1, e.RowIndex, true);
Expand Down Expand Up @@ -72,6 +80,8 @@ private void SkillForm_Shown(object sender, EventArgs e)
{
comboBox1.Visible = false;
};

SkillListGrid.SetToolTipEvent(WzType.Skill, this);
var Graphic = SkillListGrid.CreateGraphics();
var Font = new System.Drawing.Font(FontFamily.GenericSansSerif, 20, FontStyle.Bold);
Graphic.DrawString("Loading...", Font, Brushes.Black, 10, 50);
Expand Down Expand Up @@ -151,5 +161,8 @@ private void comboBox1_SelectedIndexChanged(object sender, EventArgs e)

}


private void SkillForm_FormClosing(object sender, FormClosingEventArgs e)
{
MainForm.Instance.ToolTipView.Visible = false;
}
}
1 change: 1 addition & 0 deletions MapleNecrocer/SoulEffectForm.Designer.cs

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

19 changes: 17 additions & 2 deletions MapleNecrocer/SoulEffectForm.cs
Expand Up @@ -19,6 +19,15 @@ public SoulEffectForm()
}
public static SoulEffectForm Instance;
public DataGridViewEx SoulEffectListGrid;
protected override CreateParams CreateParams
{
get
{
CreateParams cp = base.CreateParams;
cp.ExStyle |= 0x02000000;
return cp;
}
}

private void SoulEffectForm_Shown(object sender, EventArgs e)
{
Expand Down Expand Up @@ -55,6 +64,7 @@ void CellClick(BaseDataGridView DataGrid, DataGridViewCellEventArgs e)
{
CellClick(SoulEffectListGrid.SearchGrid, e);
};
SoulEffectListGrid.SetToolTipEvent(WzType.Item, this);

Bitmap Bmp = null;
string Name = "";
Expand Down Expand Up @@ -83,12 +93,17 @@ private void SoulEffectForm_KeyDown(object sender, KeyEventArgs e)
{
if (e.Alt)
e.Handled = true;
ActiveControl = null;

ActiveControl = null;
}

private void textBox1_TextChanged(object sender, EventArgs e)
{

}

private void SoulEffectForm_FormClosing(object sender, FormClosingEventArgs e)
{
MainForm.Instance.ToolTipView.Visible = false;
}
}
1 change: 1 addition & 0 deletions MapleNecrocer/TitleForm.Designer.cs

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

16 changes: 15 additions & 1 deletion MapleNecrocer/TitleForm.cs
Expand Up @@ -18,6 +18,15 @@ public TitleForm()
}
public static TitleForm Instance;
public DataGridViewEx TitleListGrid;
protected override CreateParams CreateParams
{
get
{
CreateParams cp = base.CreateParams;
cp.ExStyle |= 0x02000000;
return cp;
}
}

void CellClick(BaseDataGridView DataGrid, DataGridViewCellEventArgs e)
{
Expand Down Expand Up @@ -54,7 +63,7 @@ private void TitleForm_Shown(object sender, EventArgs e)
{
CellClick(TitleListGrid.SearchGrid, e);
};
TitleListGrid.SetToolTipEvent(WzType.Item,this);
TitleListGrid.SetToolTipEvent(WzType.Item, this);


string TitleName = null;
Expand Down Expand Up @@ -87,4 +96,9 @@ private void textBox1_TextChanged(object sender, EventArgs e)
{
TitleListGrid.Search(textBox1.Text);
}

private void TitleForm_FormClosing(object sender, FormClosingEventArgs e)
{
MainForm.Instance.ToolTipView.Visible = false;
}
}

0 comments on commit b73c77a

Please sign in to comment.