コード例 #1
0
ファイル: ItemSelector.cs プロジェクト: zeroxist/Libraries
 ///<summary>Raises the ItemSelecting event.</summary>
 ///<param name="e">A ItemSelectingEventArgs object that provides the event data.</param>
 protected virtual void OnItemSelecting(ItemSelectingEventArgs e)
 {
     if (ItemSelecting != null)
     {
         ItemSelecting(GetEventSender(), e);
     }
 }
コード例 #2
0
ファイル: ItemSelector.cs プロジェクト: zeroxist/Libraries
        ///<summary>Raises the ItemSelecting event.</summary>
        ///<param name="newVal">The item that is being selected.</param>
        ///<returns>False if the selection was cancelled.</returns>
        internal bool RaiseItemSelecting(object newVal)
        {
            var args = new ItemSelectingEventArgs(newVal);

            try {               //Wrap OnItemSelecting overrides
                OwnerEdit.PreventClose = true;
                OnItemSelecting(args);
            } finally { OwnerEdit.PreventClose = false; }
            return(!args.Cancel);
        }