public TweetScreenshotManager(FormBrowser browser) { this.browser = browser; this.screenshot = new FormNotificationScreenshotable(Callback, browser, NotificationFlags.DisableScripts | NotificationFlags.DisableContextMenu | NotificationFlags.TopMost | NotificationFlags.ManualDisplay) { CanMoveWindow = () => false }; this.timeout = WindowsUtils.CreateSingleTickTimer(10000); this.timeout.Tick += (sender, args) => screenshot.Reset(); }
public void Trigger(string html, int width, int height) { if (screenshot != null) { return; } screenshot = new FormNotificationScreenshotable(Callback, owner) { CanMoveWindow = () => false }; screenshot.LoadNotificationForScreenshot(new TweetNotification(string.Empty, html, 0, string.Empty, string.Empty), width, height); screenshot.Show(); timeout.Start(); }
private void disposer_Tick(object sender, EventArgs e) { disposer.Stop(); screenshot.Dispose(); screenshot = null; }