public static RegisterTibiaVisibilityChanged ( System control, EventHandler |
||
control | System | |
method | EventHandler |
|
return | void |
public CurveBar() { MemoryReader.RegisterHealthChanged(this, (o, e) => UpdateHealth(e)); MemoryReader.RegisterManaChanged(this, (o, e) => UpdateMana(e)); ProcessManager.RegisterTibiaVisibilityChanged(this, (o, e) => UpdateHudVisibility(e)); this.DoubleBuffered = true; alwaysShow = SettingsManager.getSettingBool("AlwaysShowHUD"); }
public AutoHotkeySuspendedMode(bool alwaysShow) { this.InitializeComponent(); this.ShowInTaskbar = false; this.alwaysShow = alwaysShow; this.InitializeSimpleNotification(false, false); ProcessManager.RegisterTibiaVisibilityChanged(this, (o, e) => UpdateHudVisibility(e)); }
public Portrait() { InitializeComponent(); lifePercentage = 1; manaPercentage = 1; level = 1; BackColor = StyleManager.BlendTransparencyKey; TransparencyKey = StyleManager.BlendTransparencyKey; MemoryReader.RegisterHealthChanged(this, (o, e) => RefreshHealth(e)); MemoryReader.RegisterManaChanged(this, (o, e) => RefreshMana(e)); MemoryReader.RegisterExperienceChanged(this, (o, e) => RefreshExp(e)); ProcessManager.RegisterTibiaVisibilityChanged(this, (o, e) => UpdateVisibility(e)); }
public HealthBar() { InitializeComponent(); BackColor = StyleManager.BlendTransparencyKey; TransparencyKey = StyleManager.BlendTransparencyKey; displayText = SettingsManager.getSettingBool(GetHUD() + "DisplayText"); centerText = SettingsManager.getSettingBool(GetHUD() + "CenterText"); reverseBar = SettingsManager.getSettingBool(GetHUD() + "ReverseProgressBar"); double opacity = SettingsManager.getSettingDouble(GetHUD() + "Opacity"); opacity = Math.Min(1, Math.Max(0, opacity)); this.Opacity = opacity; MemoryReader.RegisterHealthChanged(this, (o, e) => RefreshHUD(e)); ProcessManager.RegisterTibiaVisibilityChanged(this, (o, e) => UpdateVisibility(e)); }
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; }
protected void NotificationInitialize() { this.BackgroundImage = background_image; this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.None; if (notificationDuration != Constants.MaximumNotificationDuration) { closeTimer = new System.Timers.Timer(1000 * notificationDuration); closeTimer.Elapsed += new System.Timers.ElapsedEventHandler(CloseNotification); closeTimer.Enabled = true; } foreach (Control c in this.Controls) { if (c is TextBox || c is CheckBox || c is TransparentChart || c is PrettyButton) { continue; } if (requireDoubleClick) { c.DoubleClick += c_Click; } else { c.Click += c_Click; } } if (MinWidth() != MaxWidth()) { increaseWidthButton = new Label(); increaseWidthButton.BackColor = System.Drawing.Color.Transparent; increaseWidthButton.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle; increaseWidthButton.Font = new System.Drawing.Font("Microsoft Sans Serif", 9.75F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0))); increaseWidthButton.ForeColor = StyleManager.NotificationTextColor; increaseWidthButton.Padding = new System.Windows.Forms.Padding(2); increaseWidthButton.Size = new System.Drawing.Size(40, 21); increaseWidthButton.Text = "+"; increaseWidthButton.TextAlign = System.Drawing.ContentAlignment.MiddleCenter; increaseWidthButton.Click += new System.EventHandler(IncreaseWidth_Click); decreaseWidthButton = new Label(); decreaseWidthButton.BackColor = System.Drawing.Color.Transparent; decreaseWidthButton.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle; decreaseWidthButton.Font = new System.Drawing.Font("Microsoft Sans Serif", 9.75F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0))); decreaseWidthButton.ForeColor = StyleManager.NotificationTextColor; decreaseWidthButton.Padding = new System.Windows.Forms.Padding(2); decreaseWidthButton.Size = new System.Drawing.Size(40, 21); decreaseWidthButton.Text = "-"; decreaseWidthButton.TextAlign = System.Drawing.ContentAlignment.MiddleCenter; decreaseWidthButton.Click += new System.EventHandler(DecreaseWidth_Click); this.Controls.Add(increaseWidthButton); this.Controls.Add(decreaseWidthButton); increaseWidthButton.BringToFront(); decreaseWidthButton.BringToFront(); NotificationForm_SizeChanged(null, null); this.SizeChanged += NotificationForm_SizeChanged; } if (hideWhenTibiaInactive) { ProcessManager.RegisterTibiaVisibilityChanged(this, (o, e) => UpdateHudVisibility(e)); } }