Fix more references to images to prevent a crash

This commit is contained in:
Tara 2022-12-15 09:50:06 -07:00
parent 71cf04e433
commit 391fe9e106

View file

@ -206,9 +206,9 @@ protected override bool ProcessMnemonic(char charCode)
Point p = this.PointToClient(Control.MousePosition); Point p = this.PointToClient(Control.MousePosition);
Rectangle closeImage = new Rectangle(recBounds.Right - 15 - 5, 5, 15, 15); Rectangle closeImage = new Rectangle(recBounds.Right - 15 - 5, 5, 15, 15);
if (closeImage.Contains(p)) if (closeImage.Contains(p))
bitmap = new Bitmap(Type.GetType("LSLEditor.LSLEditorForm"), "Images.Close-Active.gif"); bitmap = LSLEditor.Images.Images.CloseActive;
else else
bitmap = new Bitmap(Type.GetType("LSLEditor.LSLEditorForm"), "Images.Close-Inactive.gif"); bitmap = LSLEditor.Images.Images.CloseInactive;
recBounds.X -= borderSize.Width; recBounds.X -= borderSize.Width;
recBounds.Y -= borderSize.Height; recBounds.Y -= borderSize.Height;
recBounds.Width += borderSize.Width << 1; recBounds.Width += borderSize.Width << 1;
@ -223,12 +223,12 @@ protected override bool ProcessMnemonic(char charCode)
if (this.HoverIndex == intIndex) if (this.HoverIndex == intIndex)
{ {
render = new VisualStyleRenderer(VisualStyleElement.Tab.TopTabItem.Hot); render = new VisualStyleRenderer(VisualStyleElement.Tab.TopTabItem.Hot);
bitmap = new Bitmap(Type.GetType("LSLEditor.LSLEditorForm"), "Images.Close-Active.gif"); bitmap = LSLEditor.Images.Images.CloseActive;
} }
else else
{ {
render = new VisualStyleRenderer(VisualStyleElement.Tab.TabItem.Normal); render = new VisualStyleRenderer(VisualStyleElement.Tab.TabItem.Normal);
bitmap = new Bitmap(Type.GetType("LSLEditor.LSLEditorForm"), "Images.Close-Disabled.gif"); bitmap = LSLEditor.Images.Images.CloseDisabled;
} }
recBounds.Height -= borderSize.Height; recBounds.Height -= borderSize.Height;
render.DrawBackground(g, recBounds); render.DrawBackground(g, recBounds);