Bloom.Edit.EditingView.OnVisibleChanged C# (CSharp) 메소드

OnVisibleChanged() 공개 메소드

this is called by our model, as a result of a "SelectedTabChangedEvent". So it's a lot more reliable than the normal winforms one.
public OnVisibleChanged ( bool visible ) : void
visible bool
리턴 void
        public void OnVisibleChanged(bool visible)
        {
            _visible = visible;
            if(visible)
            {
                if(_model.GetBookHasChanged())
                {
                    //now we're doing it based on the focus textarea: ShowOrHideSourcePane(_model.ShowTranslationPanel);
                    SetTranslationPanelVisibility();
                    //even before showing, we need to clear some things so the user doesn't see the old stuff
                    _pageListView.Clear();
                }
                Application.Idle += new EventHandler(VisibleNowAddSlowContents);
                Cursor = Cursors.WaitCursor;
                Logger.WriteEvent("Entered Edit Tab");
            }
            else
            {
                RemoveMessageEventListener("setModalStateEvent");
                Application.Idle -= new EventHandler(VisibleNowAddSlowContents); //make sure
                _browser1.Navigate("about:blank", false); //so we don't see the old one for moment, the next time we open this tab
            }
        }

Usage Example

예제 #1
0
 private void OnTabChanged(TabChangedDetails details)
 {
     _previouslySelectedPage = null;
     Visible = details.To == _view;
     _view.OnVisibleChanged(Visible);
 }