public BuildLibraryNotification(String libraryName) { InitializeComponent(); _libraryName = libraryName; LibraryNameLabel.Text = string.Format(Resources.BuildLibraryNotification_BuildLibraryNotification_Library__0__, _libraryName); var showParams = new FormAnimator.AnimationParams( FormAnimator.AnimationMethod.slide, FormAnimator.AnimationDirection.up, 0); var hideParams = new FormAnimator.AnimationParams( FormAnimator.AnimationMethod.blend, FormAnimator.AnimationDirection.up, 0); _animator = new FormAnimator(this, showParams, hideParams) { ShowParams = { Duration = ANIMATION_DURATION } }; // Not sure why this is necessary, but sometimes the form doesn't // appear without it. Opacity = 1; _displayTimer = new Timer(); _displayTimer.Tick += OnDisplayTimerEvent; _displayTimer.Interval = DISPLAY_DURATION; }
public BuildLibraryNotification(String libraryName) { InitializeComponent(); // WINDOWS 10 UPDATE HACK: Because Windows 10 update version 1803 causes unparented non-ShowInTaskbar windows to leak GDI and User handles ShowInTaskbar = Program.FunctionalTest; _libraryName = libraryName; LibraryNameLabel.Text = string.Format(Resources.BuildLibraryNotification_BuildLibraryNotification_Library__0__, _libraryName); var showParams = new FormAnimator.AnimationParams( FormAnimator.AnimationMethod.slide, FormAnimator.AnimationDirection.up, 0); var hideParams = new FormAnimator.AnimationParams( FormAnimator.AnimationMethod.blend, FormAnimator.AnimationDirection.up, 0); _animator = new FormAnimator(this, showParams, hideParams) { ShowParams = { Duration = ANIMATION_DURATION } }; // Not sure why this is necessary, but sometimes the form doesn't // appear without it. Opacity = 1; _thread = BackgroundEventThreads.CreateThreadForAction(Notify); _thread.Name = @"BuildLibraryNotification"; _thread.IsBackground = true; _windowCreatedEvent = new ManualResetEvent(false); HandleCreated += Notification_HandleCreated; _displayTimer = new Timer(); _displayTimer.Tick += OnDisplayTimerEvent; _displayTimer.Interval = DISPLAY_DURATION; }