Ejemplo n.º 1
0
        public void Ctor(object component, MemberDescriptor member)
        {
            var eventArgs = new ComponentChangingEventArgs(component, member);

            Assert.Same(component, eventArgs.Component);
            Assert.Same(member, eventArgs.Member);
        }
Ejemplo n.º 2
0
 private void Host_ComponentChanging(object sender, ComponentChangingEventArgs e)
 {
     if (_snapshot == null && e.Component is IDataObject)
     {
         _snapshot = _host.Game.CreateSnapshot();
     }
 }
 /* This method handles the OnComponentChanging event to display a notification. */
 private void OnComponentChanging(object sender, ComponentChangingEventArgs ce)
 {
     if (ce.Component != null && ((IComponent)ce.Component).Site != null && ce.Member != null)
     {
         OnUserChange("The " + ce.Member.Name + " member of the " + ((IComponent)ce.Component).Site.Name + " component is being changed.");
     }
 }
 private void OnComponentChanging(object sender, ComponentChangingEventArgs args)
 {
     if (!_loading && _loaded)
     {
         OnModifying();
     }
 }
Ejemplo n.º 5
0
 private void OnComponentChanging(object source, ComponentChangingEventArgs ce)
 {
     if (this.cache != null)
     {
         if (ce.Component != null)
         {
             this.RemoveEntry(ce.Component);
             if (!(ce.Component is IComponent) && (this.serManager != null))
             {
                 IReferenceService service = this.serManager.GetService(typeof(IReferenceService)) as IReferenceService;
                 if (service != null)
                 {
                     IComponent component = service.GetComponent(ce.Component);
                     if (component != null)
                     {
                         this.RemoveEntry(component);
                     }
                     else
                     {
                         this.cache.Clear();
                     }
                 }
             }
         }
         else
         {
             this.cache.Clear();
         }
     }
 }
Ejemplo n.º 6
0
 private void OnComponentChanging(object sender, ComponentChangingEventArgs e)
 {
     if (this._state[StateEnableComponentEvents] && !this.LoaderHost.Loading)
     {
         this.OnModifying();
     }
 }
Ejemplo n.º 7
0
 private void OnComponentChanging(object sender, ComponentChangingEventArgs e)
 {
     if (e.Component == Component && e.Member != null && e.Member.Name == "Images")
     {
         PropertyDescriptor imageProp = TypeDescriptor.GetProperties(Component)["ImageStream"];
         RaiseComponentChanging(imageProp);
     }
 }
 private void OnComponentChanging(object sender, ComponentChangingEventArgs e)
 {
     if (e.Component == Component && e.Member != null && e.Member.Name == "TabPages")
     {
         PropertyDescriptor controlsProp = TypeDescriptor.GetProperties(Component)["Controls"];
         RaiseComponentChanging(controlsProp);
     }
 }
        //<Snippet1>
        // This example method creates a ComponentChangingEventArgs using the specified arguments.
        // Typically, this type of event args is created by a design mode subsystem.
        public ComponentChangingEventArgs CreateComponentChangingEventArgs(object component, MemberDescriptor member)
        {
            ComponentChangingEventArgs args = new ComponentChangingEventArgs(component, member);

            // The component that is about to change:       args.Component
            // The member that is about to change:          args.Member

            return(args);
        }
Ejemplo n.º 10
0
 private void OnComponentChanging(object sender, ComponentChangingEventArgs args)
 {
     if (_currentUnit == null)
     {
         _currentUnit = CreateUndoUnit("Modify " + ((IComponent)args.Component).Site.Name +
                                       (args.Member != null ? "." + args.Member.Name : ""),
                                       true);
     }
     _currentUnit.ComponentChanging(args);
 }
Ejemplo n.º 11
0
 public void OnComponentChanging(object component, MemberDescriptor member)
 {
     if (ComponentChanging != null)
     {
         ComponentChangingEventArgs ce = new ComponentChangingEventArgs(component, member);
         try
         {
             ComponentChanging(this, ce);
         }
         catch {}
     }
 }
Ejemplo n.º 12
0
            public virtual void ComponentChanging(ComponentChangingEventArgs e)
            {
                if (_closed)
                {
                    return;
                }

                // Console.WriteLine ("New Action: ComponentChangeAction (" + ((IComponent)e.Component).Site.Name + ")");
                ComponentChangeAction action = new ComponentChangeAction();

                action.SetOriginalState(_engine, (IComponent)e.Component, e.Member);
                _actions.Add(action);
            }
 void IComponentChangeService.OnComponentChanging(object component, MemberDescriptor member)
 {
     if (this.Loading)
     {
         if (member.Name == "Size")
         {
             string _DEBUG_ = member.Name;
         }
     }
     else if (this.ComponentChanging != null)
     {
         ComponentChangingEventArgs ce = new ComponentChangingEventArgs(component, member);
         this.ComponentChanging(this, ce);
     }
 }
Ejemplo n.º 14
0
        //=------------------------------------------------------------------=
        // ComponentChanging
        //=------------------------------------------------------------------=
        /// <summary>
        ///   A compnent is changing.  If it's the TaskFrames collection on a
        ///   TaskPane that's changing, make sure everybody knwos about it.
        /// </summary>
        ///
        /// <param name="sender">
        ///   From whence cometht the event.
        /// </param>
        ///
        /// <param name="e">
        ///   Details about the event.
        /// </param>
        ///
        private void ComponentChanging(object sender, ComponentChangingEventArgs e)
        {
            if (e.Component == this.Component)
            {
                if (e.Member != null)
                {
                    if (e.Member.Name == "TaskFrames")
                    {
                        PropertyDescriptor pd;
                        pd = TypeDescriptor.GetProperties(this.Control)["Controls"];

                        RaiseComponentChanging(pd);
                    }
                }
            }
        }
Ejemplo n.º 15
0
        private void OnComponentChanging(object sender, ComponentChangingEventArgs e)
        {
//			System.Console.WriteLine("changing");
//			System.Console.WriteLine("{0}",this.baseLine.ClientRectangle);
        }
Ejemplo n.º 16
0
 private void changeService_ComponentChanging(object sender, ComponentChangingEventArgs e)
 {
     AssociatedFile.GiveUnsavedData();
     _propertyContainer.SelectedObjects = new object[] { e.Component };
 }
Ejemplo n.º 17
0
 void componentChangeService_ComponentChanging(object sender, ComponentChangingEventArgs e)
 {
 }
Ejemplo n.º 18
0
        private void OnComponentChanging(object sender, ComponentChangingEventArgs ce)
        {
//			System.Console.WriteLine("RootDesigner:OnComponentChanging");
        }
Ejemplo n.º 19
0
 public virtual void ComponentChanging(ComponentChangingEventArgs e)
 {
     throw null;
 }
Ejemplo n.º 20
0
 private void OnComponentChanging(object sender, ComponentChangingEventArgs e)
 {
     // Displays changing component information on the console.
     Console.WriteLine("Type of the component that is about to change: " + e.Component.GetType().FullName);
     Console.WriteLine("Name of the member of the component that is about to change: " + e.Member.Name);
 }
        void OnComponentChanging(object sender, ComponentChangingEventArgs ce)
        {
            System.Console.WriteLine("RootDesigner:OnComponentChanging");
//			Host.CreateTransaction();
        }
Ejemplo n.º 22
0
 void service_ComponentChanging(object sender, ComponentChangingEventArgs e)
 {
     //we need to initialize verbs collection to null because the collection is changed from property grid & form designer separately.
     ResetVerbs();
 }
        /// <summary>
        /// Extends BeginInvoke so that when a state object is not needed, null does not need to be passed.
        /// <example>
        /// componentchangingeventhandler.BeginInvoke(sender, e, callback);
        /// </example>
        /// </summary>
        public static IAsyncResult BeginInvoke(this ComponentChangingEventHandler componentchangingeventhandler, Object sender, ComponentChangingEventArgs e, AsyncCallback callback)
        {
            if (componentchangingeventhandler == null)
            {
                throw new ArgumentNullException("componentchangingeventhandler");
            }

            return(componentchangingeventhandler.BeginInvoke(sender, e, callback, null));
        }
Ejemplo n.º 24
0
 public virtual void OnComponentChanging(object sender, ComponentChangingEventArgs ce)
 {
     throw new NotImplementedException();
 }
 private void componentChangeService_ComponentChanging(object sender, ComponentChangingEventArgs e)
 {
     // this._componentChanging = true;
 }