public void UpdateIndicator(string content, int timeoutInMs, Color bgColour, Color fgColour, Color bdColour, Font font, IndicatorDisplayPosition position, int indOpacity) { pos = position; var op = indOpacity / 100d; lastOpacity = op; SetOpacity(op); contentLabel.Text = content; Font = font; opacity_timer_value = 2.0; if (timeoutInMs < 0) { windowCloseTimer.Enabled = false; fadeTimer.Enabled = false; } else { windowCloseTimer.Stop(); windowCloseTimer.Interval = timeoutInMs; windowCloseTimer.Start(); fadeTimer.Stop(); fadeTimer.Start(); } BackColor = bgColour; ForeColor = fgColour; BorderColour = bdColour; Invalidate(); UpdatePosition(); }
public void UpdateIndicator(string content, int timeoutInMs, Color bgColour, Color fgColour, Color bdColour, int bdSize, Font font, IndicatorDisplayPosition position, int indOpacity, bool alwaysShow) { pos = position; var op = indOpacity / 100d; lastOpacity = op; SetOpacity(op); contentLabel.Text = content; Font = font; opacity_timer_value = 2.0; if (timeoutInMs < 0 || alwaysShow) { windowCloseTimer.Enabled = false; fadeTimer.Enabled = false; } else { windowCloseTimer.Stop(); windowCloseTimer.Interval = timeoutInMs; windowCloseTimer.Start(); fadeTimer.Stop(); fadeTimer.Interval = (int)Math.Floor((decimal)(timeoutInMs / 20)); fadeTimer.Start(); } BackColor = bgColour; ForeColor = fgColour; BorderColour = bdColour; BorderSize = bdSize; Show(); Invalidate(); UpdatePosition(); }
public IndicatorOverlay(string content, int timeoutInMs, IndicatorDisplayPosition position) { pos = position; if (IsDisposed) { return; } InitializeComponent(); if (IsDisposed) { return; } contentLabel.Text = content; originalSize = Size; if (timeoutInMs < 1) { windowCloseTimer.Enabled = false; fadeTimer.Enabled = false; } else { windowCloseTimer.Interval = timeoutInMs; fadeTimer.Interval = (int)Math.Floor((decimal)(timeoutInMs / 20)); } ClickThroughWindow(); }
public IndicatorOverlay(string content, int timeoutInMs, Color bgColour, Color fgColour, Color bdColour, Font font, IndicatorDisplayPosition position, int indOpacity) { pos = position; InitializeComponent(); contentLabel.Text = content; Font = font; Application.DoEvents(); originalSize = Size; var op = indOpacity / 100d; lastOpacity = op; SetOpacity(op); if (timeoutInMs < 0) { windowCloseTimer.Enabled = false; fadeTimer.Enabled = false; } else { windowCloseTimer.Interval = timeoutInMs; fadeTimer.Interval = (int)Math.Floor((decimal)(timeoutInMs / 20)); } BackColor = bgColour; ForeColor = fgColour; BorderColour = bdColour; ClickThroughWindow(op); }
public void UpdateIndicator(string content, IndicatorDisplayPosition position) { pos = position; Opacity = 1; contentLabel.Text = content; opacity_timer_value = 2.0; windowCloseTimer.Stop(); windowCloseTimer.Start(); fadeTimer.Stop(); fadeTimer.Start(); UpdatePosition(); }
public IndicatorOverlay(string content, int timeoutInMs, IndicatorDisplayPosition position) { pos = position; InitializeComponent(); contentLabel.Text = content; if (timeoutInMs < 0) { windowCloseTimer.Enabled = false; fadeTimer.Enabled = false; } else { windowCloseTimer.Interval = timeoutInMs; fadeTimer.Interval = (int)Math.Floor((decimal)(timeoutInMs / 20)); } }
public IndicatorOverlay(string content, int timeoutInMs, Color bgColour, Color fgColour, Color bdColour, Font font, IndicatorDisplayPosition position) { pos = position; InitializeComponent(); contentLabel.Text = content; Font = font; if (timeoutInMs < 0) { windowCloseTimer.Enabled = false; fadeTimer.Enabled = false; } else { windowCloseTimer.Interval = timeoutInMs; fadeTimer.Interval = (int)Math.Floor((decimal)(timeoutInMs / 20)); } BackColor = bgColour; ForeColor = fgColour; BorderColour = bdColour; }
public void UpdateIndicator(string content, int timeoutInMs, IndicatorDisplayPosition position) { pos = position; Opacity = 1; contentLabel.Text = content; opacity_timer_value = 2.0; if (timeoutInMs < 0) { windowCloseTimer.Enabled = false; fadeTimer.Enabled = false; } else { windowCloseTimer.Stop(); windowCloseTimer.Interval = timeoutInMs; windowCloseTimer.Start(); fadeTimer.Stop(); fadeTimer.Start(); } UpdatePosition(); }
public IndicatorOverlay(string content, int timeoutInMs, Color bgColour, Color fgColour, Color bdColour, int bdSize, Font font, IndicatorDisplayPosition position, int indOpacity, bool alwaysShow) { var ret = 0; pos = position; InitializeComponent(); contentLabel.Text = content; Font = font; originalSize = Size; var op = indOpacity / 100d; lastOpacity = op; ret |= SetOpacity(op); if (timeoutInMs < 0 || alwaysShow) { windowCloseTimer.Enabled = false; fadeTimer.Enabled = false; } else { windowCloseTimer.Interval = timeoutInMs; fadeTimer.Interval = (int)Math.Floor((decimal)(timeoutInMs / 20)); } BackColor = bgColour; ForeColor = fgColour; BorderColour = bdColour; BorderSize = bdSize; ret |= ClickThroughWindow(op); if (ret != -1) { Show(); } }