/// <summary> /// The domain unload event. /// </summary> /// <param name="sender"> /// The sender. /// </param> /// <param name="eventArgs"> /// The event args. /// </param> private static void OnDomainUnload(object sender, EventArgs eventArgs) { if (Font != null) { Font.OnLostDevice(); Font.Dispose(); Font = null; } if (FontBold != null) { FontBold.OnLostDevice(); FontBold.Dispose(); FontBold = null; } if (FontBoldItalic != null) { FontBoldItalic.OnLostDevice(); FontBoldItalic.Dispose(); FontBoldItalic = null; } if (FontItalic != null) { FontItalic.OnLostDevice(); FontItalic.Dispose(); FontItalic = null; } }
/// <summary> /// Fired when the AppDomain is unloaded. /// </summary> /// <param name="sender">The sender.</param> /// <param name="eventArgs">The <see cref="EventArgs"/> instance containing the event data.</param> private static void CurrentDomainOnDomainUnload(object sender, EventArgs eventArgs) { BoxLine.OnLostDevice(); Text.OnLostDevice(); sprite.OnLostDevice(); sprite.Dispose(); Text.Dispose(); BoxLine.Dispose(); }
private void Drawing_OnPreReset(EventArgs args) { if (Font == null || Font.IsDisposed) { return; } Dispose(); Font?.OnLostDevice(); }
/// <summary> /// The domain unload event. /// </summary> /// <param name="sender"> /// The sender. /// </param> /// <param name="eventArgs"> /// The event args. /// </param> private static void OnDomainUnload(object sender, EventArgs eventArgs) { if (Line != null) { Line.OnLostDevice(); Line.Dispose(); Line = null; } if (Font != null) { Font.OnLostDevice(); Font.Dispose(); Font = null; } /* * if (FontBold != null) * { * FontBold.OnLostDevice(); * FontBold.Dispose(); * FontBold = null; * } * * if (FontBoldItalic != null) * { * FontBoldItalic.OnLostDevice(); * FontBoldItalic.Dispose(); * FontBoldItalic = null; * } * * if (FontItalic != null) * { * FontItalic.OnLostDevice(); * FontItalic.Dispose(); * FontItalic = null; * } */ }
/// <summary> /// Loads this instance. /// </summary> public void Load() { Font = new Font( Drawing.Direct3DDevice, new FontDescription { FaceName = "Tahoma", Height = this.Menu.Item("FontSize").GetValue <Slider>().Value, OutputPrecision = FontPrecision.Default, Quality = FontQuality.Antialiased }); Drawing.OnEndScene += this.Drawing_OnEndScene; Drawing.OnPreReset += args => { Font.OnLostDevice(); }; Drawing.OnPostReset += args => { Font.OnResetDevice(); }; }
/// <summary> /// Loads this instance. /// </summary> public void Load() { Font = new Font( Drawing.Direct3DDevice, new FontDescription { FaceName = "Tahoma", Height = 30, OutputPrecision = FontPrecision.Default, Quality = FontQuality.Default }); GameObject.OnCreate += this.OnGameObjectCreate; GameObject.OnDelete += this.OnGameObjectDelete; Drawing.OnEndScene += this.OnDrawingEndScene; Drawing.OnPreReset += args => { Font.OnLostDevice(); }; Drawing.OnPostReset += args => { Font.OnResetDevice(); }; }
static void Drawing_OnPreReset(EventArgs args) { S.OnLostDevice(); RecF.OnLostDevice(); }
void Drawing_OnPreReset(EventArgs args) { Text.OnLostDevice(); }
/// <summary> /// Loads this instance. /// </summary> public void Load() { Font = new Font( Drawing.Direct3DDevice, new FontDescription { FaceName = "Tahoma", Height = getSliderItem("FontSize"), OutputPrecision = FontPrecision.Default, Quality = FontQuality.Default }); Drawing.OnEndScene += this.Drawing_OnEndScene; Drawing.OnPreReset += args => { Font.OnLostDevice(); }; Drawing.OnPostReset += args => { Font.OnResetDevice(); }; }
private static void DrawingOnOnPreReset(EventArgs args) { Text.OnLostDevice(); TextLittle.OnLostDevice(); }
private void Drawing_OnPreReset(EventArgs args) { Dispose(); Font?.OnLostDevice(); }
/// <summary> /// Fired before the DirectX device has been reset. /// </summary> /// <param name="args">The <see cref="EventArgs"/> instance containing the event data.</param> private static void DrawingOnPreReset(EventArgs args) { Text.OnLostDevice(); BoxLine.OnLostDevice(); }
private static void Drawing_OnPreReset(EventArgs args) { text.OnLostDevice(); }
private static void DrawingOnOnPreReset(EventArgs args) { TextStatus.OnLostDevice(); }
private static void DrawingOnPreReset(EventArgs args) { //Game.PrintChat("DrawingOnPreReset"); Text.OnLostDevice(); Sprite.OnLostDevice(); }