Example #1
0
        private void DoHidePublishButton()
        {
            ThreadHelper.ThrowIfNotOnUIThread();

            if (PublishButton.TryHide())
            {
                this._retryCount = 0;
                return;
            }

            if (this._retryCount++ > MaximumRetries)
            {
                this._retryCount = 0;

                this.LogWarning("Was not able to find publish button");
                return;
            }

#if DEBUG
            this.LogInfo("Not able to find publish button - retrying later");
#endif

            DispatcherTimer timer = new DispatcherTimer(DispatcherPriority.Normal, Application.Current.Dispatcher)
            {
                Interval = TimeSpan.FromMilliseconds(1000),
            };

            timer.Tick += this.TryHidePublishButton;

            timer.Start();
        }
Example #2
0
 public void OnActivate()
 {
     this.btnToggleVisibility.Visible = PublishButton.IsAvailable();
 }
Example #3
0
 private void btnToggleVisibility_OnClick(object sender, System.EventArgs e)
 {
     PublishButton.Toggle();
 }