Esempio n. 1
0
        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();
        }
Esempio n. 2
0
        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();
        }
Esempio n. 3
0
 private void disposer_Tick(object sender, EventArgs e)
 {
     disposer.Stop();
     screenshot.Dispose();
     screenshot = null;
 }