/// <summary>
        /// Handles the InstancesHasBeenSelected event from the Selector
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        private void HandleSelectorInstancesHasBeenSelected(object sender, InstancesSelectedEventArgs e)
        {
            // Set flag.
            IgnoreEditorsValueChangeEvent = true;

            // Set values.
            List <Oid> lLastValue = LastValueListOids;

            SetValue(e.OidList);

            // Remove flag.
            IgnoreEditorsValueChangeEvent = false;

            // Set focus to the button.
            if (this.Trigger != null)
            {
                this.Trigger.Focused = true;
            }

            if (!UtilFunctions.OidListEquals(lLastValue, e.OidList))
            {
                // If more than one instance is selected, the dependency Rules should not be thrown.
                if ((e.OidList != null) && (e.OidList.Count > 1))
                {
                    return;
                }

                OnValueChanged(new ValueChangedEventArgs(this, lLastValue, e.OidList, DependencyRulesAgentLogic.User));
            }
        }
Exemplo n.º 2
0
        /// <summary>
        /// Raises the InstancesHasBeenSelected event
        /// </summary>
        /// <param name="eventArgs"></param>
        protected void OnInstancesHasBeenSelected(InstancesSelectedEventArgs eventArgs)
        {
            EventHandler <InstancesSelectedEventArgs> handler = InstancesHasBeenSelected;

            if (handler != null)
            {
                handler(this, eventArgs);
            }
        }
        /// <summary>
        /// Raises the InstancesHasBeenSelected event
        /// </summary>
        /// <param name="eventArgs"></param>
        protected void OnInstancesHasBeenSelected(InstancesSelectedEventArgs eventArgs)
        {
            EventHandler<InstancesSelectedEventArgs> handler = InstancesHasBeenSelected;

            if (handler != null)
            {
                handler(this, eventArgs);
            }
        }