private void SpotifySeekerOverlaySetOpacity(double opacity) { if (this.InvokeRequired) { SetOpacityCallback d = new SetOpacityCallback(SpotifySeekerOverlaySetOpacity); this.Invoke(d, new object[] { opacity }); } else { this.Opacity = opacity; } }
public void SetOpacity(double opacity) { // InvokeRequired required compares the thread ID of the // calling thread to the thread ID of the creating thread. // If these threads are different, it returns true. if (this.textBox.InvokeRequired) { SetOpacityCallback d = new SetOpacityCallback(SetOpacity); this.Invoke(d, new object[] { opacity }); } else { this.Opacity = opacity; } }
public void SetOpacity(double value) { try { if (InvokeRequired) { SetOpacityCallback callback = new SetOpacityCallback(SetOpacity); this.Invoke(callback, new object[] { value }); } else { Opacity = value; } } catch (Exception ex) { Program.Log(LogType.Error, ex.ToString()); } }
private void SetOpacity(double opacity) { if (this.InvokeRequired) { SetOpacityCallback d = new SetOpacityCallback (SetOpacity); this.Invoke (d, new object [] { opacity }); } else { this.Opacity = opacity; } }