Table of Contents

Class BasePollForm

Namespace
Lers.UI.Tabs
Assembly
Lers.UI.dll

Базовая форма для реализации опроса устройств.

public class BasePollForm : Form, IDropTarget, ISynchronizeInvoke, IWin32Window, IBindableComponent, IComponent, IDisposable, IContainerControl
Inheritance
BasePollForm
Implements
Derived
Inherited Members
Extension Methods

Constructors

BasePollForm()

Конструктор.

public BasePollForm()

Fields

confirmCloseMessage

Сообщение выдаваемое для подтверждения закрытия формы при запущеном опросе.

protected string confirmCloseMessage

Field Value

string

toolBar

Панель инструментов формы.

protected ToolStrip toolBar

Field Value

ToolStrip

Properties

Parameters

Параметры формы опроса.

protected BasePollFormParameters Parameters { get; set; }

Property Value

BasePollFormParameters

Server

Ссылка на экземпляр сервера, с которым работает окно

protected LersServer Server { get; }

Property Value

LersServer

UserArea

Возвращает контрол, на котором можно размещать свои компоненты

public Control UserArea { get; }

Property Value

Control

Methods

AddLogRecord(Importance, DateTime, string)

Протоколирование в журнал опроса

public void AddLogRecord(Importance importance, DateTime dateTime, string text)

Parameters

importance Importance
dateTime DateTime
text string

ApplyParameters()

Применение указанных пользователем параметров.

protected virtual void ApplyParameters()

Dispose(bool)

Clean up any resources being used.

protected override void Dispose(bool disposing)

Parameters

disposing bool

true if managed resources should be disposed; otherwise, false.

GetTitleText(string)

Возвращает заголовок контрола.

protected virtual string GetTitleText(string deviceTitle)

Parameters

deviceTitle string

Returns

string

Initialize(BasePollFormParameters, LersServer)

Инициализация формы с заданием параметров.

public virtual void Initialize(BasePollFormParameters parameters, LersServer server)

Parameters

parameters BasePollFormParameters

Параметры формы.

server LersServer

OnFormClosed(FormClosedEventArgs)

Обработчик закртия формы.

protected override void OnFormClosed(FormClosedEventArgs e)

Parameters

e FormClosedEventArgs

OnSelectedConnectionChanged(PollConnection)

Вызвается при выборе другого подключения.

protected virtual void OnSelectedConnectionChanged(PollConnection connection)

Parameters

connection PollConnection

Подключение.

OnStartButtonClicked()

Вызывается при нажатии на кнопку запуска опроса.

protected virtual void OnStartButtonClicked()

OnStopButtonClicked()

Вызывается при нажатии на кнопку остановки опроса.

protected virtual void OnStopButtonClicked()

SetFormState(FormState)

Установка состояния формы.

protected void SetFormState(BasePollForm.FormState state)

Parameters

state BasePollForm.FormState

Новое состояние.

ValidateParameters()

Проверка правильности указанных пользователем параметров.

protected virtual bool ValidateParameters()

Returns

bool