private void SubjectValuesChangedHandler(object sender, CogChangedEventArgs e) { lock (this.mHandleSubjectValuesChangedLock) { if (this.mHandleSubjectValuesChanged) { goto end_IL_0002; } return; end_IL_0002 :; } if (base.InvokeRequired) { base.Invoke(new CogChangedEventHandler(this.SubjectValuesChangedHandler), sender, e); } else if (object.ReferenceEquals(sender, this.GetSubject())) { using (this.mSafeFlag.StartUsing()) { this.ProcessLoopSafeQueuedDelegates(); if (!base.IsDisposed) { this.SubjectValuesChanged(sender, e); } } } }
void CogDisplay_Changed(object sender, CogChangedEventArgs e) { CogDisplay cog = (sender as CogDisplay); if (cog.Parent.Controls.ContainsKey(CROSSHAIRSCTLNAME)) { cog.Parent.Controls[CROSSHAIRSCTLNAME].Invalidate(); } }
private void WatcherHandler(object sender, CogChangedEventArgs e) { if (base.InvokeRequired) { base.Invoke(new CogChangedEventHandler(this.WatcherHandler), sender, e); } else { using (this.mSafeFlag.StartUsing()) { this.ProcessLoopSafeQueuedDelegates(); if (!base.IsDisposed) { CogSubcontrolWatcher cogSubcontrolWatcher = (CogSubcontrolWatcher)sender; if ((e.StateFlags & 0x20) != 0) { cogSubcontrolWatcher.mSubcontrol.Enabled = cogSubcontrolWatcher.IsConnected; } if ((e.StateFlags & 8) != 0) { if (cogSubcontrolWatcher.Subject == null) { cogSubcontrolWatcher.mSubcontrol.SetSubjectAndInitialize(null); } else { object subjectAndInitialize = null; try { subjectAndInitialize = cogSubcontrolWatcher.Value; } catch (Exception) { } cogSubcontrolWatcher.mSubcontrol.SetSubjectAndInitialize(subjectAndInitialize); } } } } } }
private void mToolBlockProcess_Changed(object sender, CogChangedEventArgs e) { // To see what has changed, look at the state flags that are contained in // the CogChangedEventArgs object. The StateFlags property is a bitfield, // where each bit represents a single element of the tool that may have changed. If a bit // is asserted, that element in the tool has changed. Multiple bits may be asserted // simultaneously. To see what has changed, bitwise AND the StateFlags with the static // Sf**** members in the tool class. If it returns a value greater than 0, then that // particular element has changed. // In the example below, we are testing to see if the RunStatus property has changed // by bitwise AND'ing StateFlags with SfRunStatus. // Report error conditions, if any. Console.WriteLine("mToolBlockProcess_Changed"); if ((e.StateFlags & CogBlobTool.SfRunStatus) > 0) { if (objectManager.mToolBlockProcess.RunStatus.Result == CogToolResultConstants.Error) { Console.WriteLine(objectManager.mToolBlockProcess.RunStatus.Message); } } }
private void MToolBlockAcq_Changed(object sender, CogChangedEventArgs e) { Console.WriteLine("MToolBlockAcq_Changed"); }
protected virtual void SubjectValuesChanged(object sender, CogChangedEventArgs e) { }
protected void raise_Changed(object i1, CogChangedEventArgs i2);