public TaskHUD() { this.TransparencyKey = StyleManager.TransparencyKey; ProcessManager.TibiaVisibilityChanged += (o, e) => UpdateVisibility(e); this.ShowInTaskbar = false; this.FormBorderStyle = FormBorderStyle.None; actualHUD = new ActualTaskHUD(this); actualHUD.ShowInTaskbar = false; actualHUD.FormBorderStyle = FormBorderStyle.None; actualHUD.Size = this.Size; actualHUD.StartPosition = FormStartPosition.Manual; actualHUD.Location = this.PointToScreen(new Point(0, 0)); double opacity = SettingsManager.getSettingDouble(GetHUD() + "Opacity"); opacity = Math.Min(1, Math.Max(0, opacity)); this.Opacity = opacity; this.FormClosed += CloseActualHUD; }
public TaskHUD() { this.TransparencyKey = StyleManager.TransparencyKey; ProcessManager.RegisterTibiaVisibilityChanged(this, (o, e) => UpdateVisibility(e)); this.ShowInTaskbar = false; this.FormBorderStyle = FormBorderStyle.None; actualHUD = new ActualTaskHUD(this); actualHUD.ShowInTaskbar = false; actualHUD.FormBorderStyle = FormBorderStyle.None; actualHUD.Size = this.Size; actualHUD.StartPosition = FormStartPosition.Manual; actualHUD.Location = this.PointToScreen(new Point(0, 0)); double opacity = SettingsManager.getSettingDouble(GetHUD() + "Opacity"); opacity = Math.Min(1, Math.Max(0, opacity)); this.Opacity = opacity; this.FormClosed += CloseActualHUD; }