Пример #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);
        }
Пример #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();
     }
 }
Пример #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();
         }
     }
 }
Пример #6
0
 private void OnComponentChanging(object sender, ComponentChangingEventArgs e)
 {
     if (this._state[StateEnableComponentEvents] && !this.LoaderHost.Loading)
     {
         this.OnModifying();
     }
 }
Пример #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);
        }
Пример #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);
 }
Пример #11
0
 public void OnComponentChanging(object component, MemberDescriptor member)
 {
     if (ComponentChanging != null)
     {
         ComponentChangingEventArgs ce = new ComponentChangingEventArgs(component, member);
         try
         {
             ComponentChanging(this, ce);
         }
         catch {}
     }
 }
Пример #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);
     }
 }
Пример #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);
                    }
                }
            }
        }
Пример #15
0
        private void OnComponentChanging(object sender, ComponentChangingEventArgs e)
        {
//			System.Console.WriteLine("changing");
//			System.Console.WriteLine("{0}",this.baseLine.ClientRectangle);
        }
 private void changeService_ComponentChanging(object sender, ComponentChangingEventArgs e)
 {
     AssociatedFile.GiveUnsavedData();
     _propertyContainer.SelectedObjects = new object[] { e.Component };
 }
Пример #17
0
 void componentChangeService_ComponentChanging(object sender, ComponentChangingEventArgs e)
 {
 }
Пример #18
0
        private void OnComponentChanging(object sender, ComponentChangingEventArgs ce)
        {
//			System.Console.WriteLine("RootDesigner:OnComponentChanging");
        }
Пример #19
0
 public virtual void ComponentChanging(ComponentChangingEventArgs e)
 {
     throw null;
 }
Пример #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();
        }
Пример #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));
        }
Пример #24
0
 public virtual void OnComponentChanging(object sender, ComponentChangingEventArgs ce)
 {
     throw new NotImplementedException();
 }
 private void componentChangeService_ComponentChanging(object sender, ComponentChangingEventArgs e)
 {
     // this._componentChanging = true;
 }