private void EndPollDirectory(IAsyncResult asyncResult) { // harvest results SearchResponse response = (SearchResponse)_connection.EndSendRequest(asyncResult); // grab the current search cookie foreach (DirectoryControl control in response.Controls) { DirSyncResponseControl dsrc = control as DirSyncResponseControl; if (null != dsrc) { cookie = dsrc.Cookie; } } // if anything changed, notify any listeners if (response.Entries.Count > 0) { if (null != Changed) { Changed(this, EventArg.New(response)); } } }
protected void OnBeginEventOccurs(string tag) { if (EventOccurs != null) { EventOccurs.BeginInvoke(this, EventArg.New(tag), null, null); } }
void okButton_Click(object sender, RoutedEventArgs e) { var colorSelector = GetTemplateChild("colorSelector") as ColorSelector; if (colorSelector != null) { SelectedColor = colorSelector.SelectedColor; if (SelectedColorChanged != null) { SelectedColorChanged(this, EventArg.New(SelectedColor)); } } ClosePopup(); }