120 this.isDestroyed =
false;
121 this.isTriggered = triggerRule;
124 this._controlName = controlName;
125 this._helpText = helpText;
126 this.handlerParams = args;
128 this.dynamicContext =
false;
130 this.contextedObject =
null;
133 public Listener( ChangePredicate<State> triggerRule,
ControlContexted contexted, Ctrl ctrl,
string controlName,
string helpText, Delegate
handler, params
object[] args )
135 this.isDestroyed =
false;
136 this.isTriggered = triggerRule;
139 this._controlName = controlName;
140 this._helpText = helpText;
141 this.handlerParams = args;
143 this.dynamicContext =
true;
145 this.contextedObject = contexted;
152 MethodInfo handlerMethod =
handler.GetMethodInfo();
154 MethodInfo handlerMethod =
handler.Method;
171 this.dynamicContext =
false;
184 this.dynamicContext =
true;
185 this.contextedObject = obj;
189 #region Destroyable Members
Kuuntelukonteksti ohjaimia varten
bool Active
Onko tämä konteksti tällä hetkellä aktiivinen
bool IsDestroyed
Onko konteksti tuhottu
ListenContext ControlContext
Rajapinta olioille, jotka ovat tuhottavissa.
Ohjaintapahtumien kuuntelija.
void CheckAndInvoke(State oldState, State newState)
Listener(ChangePredicate< State > triggerRule, ControlContexted contexted, Ctrl ctrl, string controlName, string helpText, Delegate handler, params object[] args)
bool IsDestroyed
Onko olio tuhottu.
Ctrl Control
Kontrolli, jota kuunnellaan.
Listener InContext(ControlContexted obj)
Kuuntelee tapahtumaa vain tietyssä kontekstissa. Esim. Keyboard.Listen(parametrit)....
Listener(ChangePredicate< State > triggerRule, ListenContext context, Ctrl ctrl, string controlName, string helpText, Delegate handler, params object[] args)
Action Destroyed
Tapahtuu, kun olio tuhotaan.
Listener InContext(ListenContext context)
Kuuntelee tapahtumaa vain tietyssä kontekstissa.
ListenContext? Context
Konteksti, jossa kontrolleja kuunnellaan.
string HelpText
Ohjeteksti.
ControlContexted contextedObject
void Destroy()
Tuhoaa kuuntelijan
string ControlName
Kontrollin nimi jota kuunnellaan. Käytetään vain ohjeen yhteydessä.
ChangePredicate< State > isTriggered
delegate bool ChangePredicate< T >(T prev, T curr)
Metodityyppi, joka ottaa parametrikseen entisen ja nykyisen muuttujan arvon ja palauttaa totuusarvon....