Example #1
0
 /// <summary>
 /// Triggers the CommentInstancesAdded event.
 /// </summary>
 internal virtual void OnUtilityInstancesAdded(UtilityInstancesAddedEventArgs ea)
 {
     if (UtilityInstancesAdded != null)
         UtilityInstancesAdded(this, ea);
 }
Example #2
0
        /// <summary>
        /// Handles the <see cref="IComments"/>.<see cref="Added"/> event which is fired when an comment is added
        /// to the comments mgr of this workspace.
        /// </summary>
        internal void _utilitiesMgr_Added(IUtilitiesMgr sender, UtilityCollectionEventArgs ea)
        {
            if (sender != null)
            {
                // subscribe to the StatusChange events when an comment is added to the comments mgr.
                for (int i = 0; i < ea.Utilities.Length; i++)
                {
                    ea.Utilities[i].SelectionChanged += new SelectionEventHandler<IUtility, SelectionEventArgs>(utility_SelectionChanged);
                }

                // fire the event which confirms to subscribers that the comment(s) has been successfully added.  This
                // is the final confirmation of a successful addition of an comment.
                if (ea.Utilities.Length > 0)
                {
                    UtilityInstancesAddedEventArgs arg = new UtilityInstancesAddedEventArgs(ea.Utilities);
                    OnUtilityInstancesAdded(arg);
                }
            }
        }
Example #3
0
 public void UtilityInstancesAdded_DummyHandler(IWorkSpace sender, UtilityInstancesAddedEventArgs ea)
 {
     //throw new Exception("The method or operation is not implemented.");
     UtilityInstancesAdded_TimesHandled++;
 }