コード例 #1
0
        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));
                }
            }
        }
コード例 #2
0
 protected void OnBeginEventOccurs(string tag)
 {
     if (EventOccurs != null)
     {
         EventOccurs.BeginInvoke(this, EventArg.New(tag), null, null);
     }
 }
コード例 #3
0
        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();
        }