コード例 #1
0
ファイル: MainForm.cs プロジェクト: davgit/Gmail-Notifier
        internal void RemoveThumbAndButtons()
        {
            TaskbarManager.Instance.TabbedThumbnail.RemoveThumbnailPreview(_thumb);

            _thumbForm.Close();
            _thumbForm = null;
        }
コード例 #2
0
ファイル: MainForm.cs プロジェクト: davgit/Gmail-Notifier
        internal void SetupThumbAndButtons()
        {
            _thumbForm = new ThumbForm(this);

            _thumb       = new TabbedThumbnail(this.Handle, _thumbForm);
            _thumb.Title = _gmailClient.Username;
            _thumb.SetWindowIcon((Icon)this.Icon.Clone());

            _thumb.TabbedThumbnailClosed += (sender, e) =>
            {
                //ideally what i would like to here is cancel the close event
                //unfortunately it appears there is a bug in the WindowsAPICodePack which is not receiving any attention from Microsoft
                //the next best alternative is just to close the entire application, otherwise it will crash next time we try to update the thumbnail preview
                Close();
            };

            _thumbForm.Show();
            _thumbForm.Render();

            _prevButton = new ThumbnailToolBarButton(Properties.Resources.Previous, "Previous")
            {
                Enabled = false
            };
            _openButton = new ThumbnailToolBarButton(Properties.Resources.Open, "Open")
            {
                Enabled = false
            };
            _nextButton = new ThumbnailToolBarButton(Properties.Resources.Next, "Next")
            {
                Enabled = false
            };

            _prevButton.Click += new EventHandler <ThumbnailButtonClickedEventArgs>(PrevButtonClicked);
            _openButton.Click += new EventHandler <ThumbnailButtonClickedEventArgs>(OpenButtonClicked);
            _nextButton.Click += new EventHandler <ThumbnailButtonClickedEventArgs>(NextButtonClicked);

            TaskbarManager.Instance.TabbedThumbnail.AddThumbnailPreview(_thumb);

            TaskbarManager.Instance.ThumbnailToolBars.AddButtons(_thumbForm.Handle, _prevButton, _openButton, _nextButton);
        }
コード例 #3
0
ファイル: MainForm.cs プロジェクト: Katorce/Gmail-Notifier
        internal void SetupThumbAndButtons()
        {
            _thumbForm = new ThumbForm(this);

            _thumb = new TabbedThumbnail(this.Handle, _thumbForm);
            _thumb.Title = _gmailClient.Username;
            _thumb.SetWindowIcon((Icon)this.Icon.Clone());

            _thumbForm.Show();
            _thumbForm.Render();

            _prevButton = new ThumbnailToolBarButton(Properties.Resources.Previous, "Previous") { Enabled = false };
            _openButton = new ThumbnailToolBarButton(Properties.Resources.Open, "Open") { Enabled = false };
            _nextButton = new ThumbnailToolBarButton(Properties.Resources.Next, "Next") { Enabled = false };

            _prevButton.Click += new EventHandler<ThumbnailButtonClickedEventArgs>(PrevButtonClicked);
            _openButton.Click += new EventHandler<ThumbnailButtonClickedEventArgs>(OpenButtonClicked);
            _nextButton.Click += new EventHandler<ThumbnailButtonClickedEventArgs>(NextButtonClicked);

            TaskbarManager.Instance.TabbedThumbnail.AddThumbnailPreview(_thumb);

            TaskbarManager.Instance.ThumbnailToolBars.AddButtons(_thumbForm.Handle, _prevButton, _openButton, _nextButton);
        }
コード例 #4
0
ファイル: MainForm.cs プロジェクト: Katorce/Gmail-Notifier
        internal void RemoveThumbAndButtons()
        {
            TaskbarManager.Instance.TabbedThumbnail.RemoveThumbnailPreview(_thumb);

            _thumbForm.Close();
            _thumbForm = null;
        }
コード例 #5
0
ファイル: MainForm.cs プロジェクト: kwerty/Gmail-Notifier
        internal void SetupThumbAndButtons()
        {
            _thumbForm = new ThumbForm(this);

            _thumb = new TabbedThumbnail(this.Handle, _thumbForm);
            _thumb.Title = _gmailClient.Username;
            _thumb.SetWindowIcon((Icon)this.Icon.Clone());

            _thumb.TabbedThumbnailClosed += (sender, e) =>
            {
                //ideally what i would like to here is cancel the close event
                //unfortunately it appears there is a bug in the WindowsAPICodePack which is not receiving any attention from Microsoft
                //the next best alternative is just to close the entire application, otherwise it will crash next time we try to update the thumbnail preview
                Close();

            };

            _thumbForm.Show();
            _thumbForm.Render();

            _prevButton = new ThumbnailToolBarButton(Properties.Resources.Previous, "Previous") { Enabled = false };
            _openButton = new ThumbnailToolBarButton(Properties.Resources.Open, "Open") { Enabled = false };
            _nextButton = new ThumbnailToolBarButton(Properties.Resources.Next, "Next") { Enabled = false };

            _prevButton.Click += new EventHandler<ThumbnailButtonClickedEventArgs>(PrevButtonClicked);
            _openButton.Click += new EventHandler<ThumbnailButtonClickedEventArgs>(OpenButtonClicked);
            _nextButton.Click += new EventHandler<ThumbnailButtonClickedEventArgs>(NextButtonClicked);

            TaskbarManager.Instance.TabbedThumbnail.AddThumbnailPreview(_thumb);

            TaskbarManager.Instance.ThumbnailToolBars.AddButtons(_thumbForm.Handle, _prevButton, _openButton, _nextButton);
        }