C# Класс SIL.FieldWorks.Common.RootSites.ActiveViewHelper

ActiveViewHelper attemps to keep track of the active view (i.e. an IRootSite) of a form.
Наследование: IFWDisposable
Показать файл Открыть проект Примеры использования класса

Открытые методы

Метод Описание
ActiveViewHelper ( Control rootControl ) : System

Creates an ActiveViewHelper for the specified form.

CheckDisposed ( ) : void

Throw if the IsDisposed property is true

Dispose ( ) : void

Must not be virtual.

IsViewVisible ( IRootSite view ) : bool

Determines whether or not the specified view is visible.

Защищенные методы

Метод Описание
Dispose ( bool disposing ) : void

Executes in two distinct scenarios. 1. If disposing is true, the method has been called directly or indirectly by a user's code via the Dispose method. Both managed and unmanaged resources can be disposed. 2. If disposing is false, the method has been called by the runtime from inside the finalizer and you should not reference (access) other managed objects, as they already have been garbage collected. Only unmanaged resources can be disposed.

If any exceptions are thrown, that is fine. If the method is being done in a finalizer, it will be ignored. If it is thrown by client code calling Dispose, it needs to be handled by fixing the bug. If subclasses override this method, they should call the base implementation.

Приватные методы

Метод Описание
ControlWasAdded ( object sender, System.Windows.Forms.ControlEventArgs e ) : void
ControlWasRemoved ( object sender, System.Windows.Forms.ControlEventArgs e ) : void
DeepAddControl ( Control control ) : void

Recursively add handlers for the ControlAdded and GotFocus events of the specified control and all its sub-controls.

DeepRemoveControl ( Control control ) : void

Recursively remove handlers for the ControlAdded and GotFocus events of the specified control and all its sub-controls.

IsReallyVisible ( IRootSite site ) : bool

This function attempts to determine whether a root site can really be seen in the sense that it can reasonably receive commands (such as from the style dialog). It doesn't check everything possible; for example, a control could be visible in all the ways checked here and still covered by another control or scrolled out of sight.

ViewGotFocus ( object sender, EventArgs e ) : void

Handler for when a view gains focus. This sets the active view to the view that got focus.

Описание методов

ActiveViewHelper() публичный Метод

Creates an ActiveViewHelper for the specified form.
public ActiveViewHelper ( Control rootControl ) : System
rootControl System.Windows.Forms.Control Control to create an ActiveViewHelper for
Результат System

CheckDisposed() публичный Метод

Throw if the IsDisposed property is true
public CheckDisposed ( ) : void
Результат void

Dispose() публичный Метод

Must not be virtual.
public Dispose ( ) : void
Результат void

Dispose() защищенный Метод

Executes in two distinct scenarios. 1. If disposing is true, the method has been called directly or indirectly by a user's code via the Dispose method. Both managed and unmanaged resources can be disposed. 2. If disposing is false, the method has been called by the runtime from inside the finalizer and you should not reference (access) other managed objects, as they already have been garbage collected. Only unmanaged resources can be disposed.
If any exceptions are thrown, that is fine. If the method is being done in a finalizer, it will be ignored. If it is thrown by client code calling Dispose, it needs to be handled by fixing the bug. If subclasses override this method, they should call the base implementation.
protected Dispose ( bool disposing ) : void
disposing bool
Результат void

IsViewVisible() публичный Метод

Determines whether or not the specified view is visible.
public IsViewVisible ( IRootSite view ) : bool
view IRootSite
Результат bool