private void ComponentChangeSvc_ComponentChanged(object sender, ComponentChangedEventArgs e)
 {
     if (this.containerSelectorGlyph != null)
     {
         this.containerSelectorGlyph.UpdateGlyph();
     }
 }
 private void ComponentChangeSvc_ComponentChanged(object sender, ComponentChangedEventArgs e)
 {
     BindingNavigator component = (BindingNavigator) base.Component;
     if (((e.Component != null) && (e.Component == component.CountItem)) && ((e.Member != null) && (e.Member.Name == "Text")))
     {
         component.CountItemFormat = component.CountItem.Text;
     }
 }
 private void ComponentChanged(object sender, ComponentChangedEventArgs e)
 {
     BindingNavigatorEx component = (BindingNavigatorEx)base.Component;
     if (((e.Component != null) && (e.Component == component.CountLabel)) && ((e.Member != null) && (e.Member.Name == "Text")))
     {
         component.CountLabelFormat = component.CountLabel.Text;
     }
 }
 private void OnComponentChanged(object sender, ComponentChangedEventArgs e)
 {
     if (((e.Component == base.Component) && (e.Member != null)) && (e.Member.Name == "Items"))
     {
         PropertyDescriptor descriptor = TypeDescriptor.GetProperties(base.Component)["Name"];
         if (descriptor != null)
         {
             this.UpdateControlName(descriptor.GetValue(base.Component).ToString());
         }
     }
 }
 private void OnComponentChanged(object sender, ComponentChangedEventArgs e)
 {
     if (((this.bindingUpdatedByUser && (e.Component == base.Component)) && (e.Member != null)) && ((e.Member.Name == "DataSource") || (e.Member.Name == "DataMember")))
     {
         this.bindingUpdatedByUser = false;
         DataSourceProviderService service = (DataSourceProviderService) this.GetService(typeof(DataSourceProviderService));
         if (service != null)
         {
             service.NotifyDataSourceComponentAdded(base.Component);
         }
     }
 }
Example #6
0
        private void valueEditor1_ValueChanged(object sender, System.ComponentModel.Design.ComponentChangedEventArgs e)
        {
            IDictionaryService dictionaryService = GetService(typeof(IDictionaryService)) as IDictionaryService;

            dictionaryService.SetValue("Argument3", valueEditor1.Value);
            if (valueEditor1.Value == null)
            {
                this.label3.Visible = false;
            }
            else
            {
                this.label3.Font    = (Font)valueEditor1.Value;
                this.label3.Visible = true;
            }
        }
        private void OnComponentChanged(object sender, ComponentChangedEventArgs e)
        {
            if (e.Component != null && (e.OldValue is ActivityBind && !(e.NewValue is ActivityBind)) ||
                (!(e.OldValue is ActivityBind) && e.NewValue is ActivityBind))
                TypeDescriptor.Refresh(e.Component);

            IReferenceService referenceService = GetService(typeof(IReferenceService)) as IReferenceService;
            Activity changedActivity = (referenceService != null) ? referenceService.GetComponent(e.Component) as Activity : e.Component as Activity;
            if (changedActivity != null)
            {
                ActivityDesigner designer = ActivityDesigner.GetDesigner(changedActivity);
                if (designer != null)
                    designer.OnActivityChanged(new ActivityChangedEventArgs(changedActivity, e.Member, e.OldValue, e.NewValue));
            }
        }
 public override void OnComponentChanged(object sender, ComponentChangedEventArgs ce)
 {
     base.OnComponentChanged(sender, ce);
     MemberDescriptor member = ce.Member;
     if ((member != null) && member.GetType().FullName.Equals("System.ComponentModel.ReflectPropertyDescriptor"))
     {
         PropertyDescriptor descriptor2 = (PropertyDescriptor) member;
         if (descriptor2.Name.Equals("Text"))
         {
             this._textControl.Controls.Clear();
         }
     }
 }
        public override void OnComponentChanged(Object sender, ComponentChangedEventArgs ce)
        {
            // Delegate to the base class implementation first!
            base.OnComponentChanged(sender, ce);

            MemberDescriptor member = ce.Member;
            if (member != null &&
                member.GetType().FullName.Equals(Constants.ReflectPropertyDescriptorTypeFullName))
            {
                PropertyDescriptor propDesc = (PropertyDescriptor)member;
                String propName = propDesc.Name;

                if ((_mobileControl is TextControl || _mobileControl is TextView)
                    && propName.Equals("Text"))
                {
                    _mobileControl.Controls.Clear();
                }
            }
        }
Example #10
0
		/// <summary>
		/// This method handles the OnComponentChanged event to display a notification.
		/// </summary>
		/// <param name="sender"></param>
		/// <param name="ce"></param>
		private void OnComponentChanged(object sender, ComponentChangedEventArgs ce) {
			if (ce.Component != null && ((IComponent)ce.Component).Site != null && ce.Member != null) {
				if ("LanguageKey".Equals(ce.Member.Name)) {
					Control control = ce.Component as Control;
					if (control != null) {
						LOG.InfoFormat("Changing LanguageKey for {0} to {1}", control.Name, ce.NewValue);
						ApplyLanguage(control, (string)ce.NewValue);
					} else {
						ToolStripItem item = ce.Component as ToolStripItem;
						if (item != null) {
							LOG.InfoFormat("Changing LanguageKey for {0} to {1}", item.Name, ce.NewValue);
							ApplyLanguage(item, (string)ce.NewValue);
						} else {
							LOG.InfoFormat("Not possible to changing LanguageKey for {0} to {1}", ce.Component.GetType(), ce.NewValue);
						}
					}
				}
			}
		}
 private void OnComponentChanged(object sender, ComponentChangedEventArgs ce)
 {
     this.dirty = true;
     this.unsaved = true;
 }
 private void OnComponentChanged(object sender, ComponentChangedEventArgs e)
 {
     Control component = e.Component as Control;
     if ((component != null) && component.IsHandleCreated)
     {
         System.Design.UnsafeNativeMethods.NotifyWinEvent(0x800b, new HandleRef(component, component.Handle), -4, 0);
         if (this.frame.Focused)
         {
             System.Design.UnsafeNativeMethods.NotifyWinEvent(0x8005, new HandleRef(component, component.Handle), -4, 0);
         }
     }
 }
 private void OnComponentChanged(object sender, ComponentChangedEventArgs e)
 {
     UpdateVerbStatus();
 }
		/*
		private void OnComponentRemoving (object sender, ComponentEventArgs ce)
		
//			System.Console.WriteLine("RootDesigner:OnComponentRemoving {0}",ce.Component.ToString());
		}
		
		
		private void OnComponentRemoved (object sender, ComponentEventArgs ce)
		{
//			System.Console.WriteLine("RootDesigner:OnComponentRemoved {0}",ce.Component.ToString());
		}
		*/
		
		private void OnComponentChanged(object sender, ComponentChangedEventArgs ce)
		{
			System.Console.WriteLine("RootDesigner:OnComponentChanged {0} from {1} to {2}",ce.Component.ToString(),ce.OldValue,ce.NewValue);
			
//			MemberDescriptor m = ce.Member;
			if (ce.Member.Name == "Name") {
				AbstractItem item = ce.Component as AbstractItem;
				if (item != null) {
					item.Name = ce.NewValue.ToString();
				}
			}
			
			BaseSection section = ce.Component as BaseSection;
			if (section != null) {
				foreach (BaseSection s in sections)
				{
					if (s.Name == section.Name) {
						s.Size = section.Size;
					}
				}
				RecalculateSections();
			}
		}
 protected void OnComponentChanged(object source, ComponentChangedEventArgs args)
 {
     System.Web.UI.Control component = args.Component as System.Web.UI.Control;
     if (component != null)
     {
         IDesignerHost service = (IDesignerHost) this.GetService(typeof(IDesignerHost));
         ControlDesigner designer = service.GetDesigner(component) as ControlDesigner;
         if (designer != null)
         {
             designer.OnComponentChanged(source, args);
         }
     }
 }
        private void OnComponentChanged(object sender, ComponentChangedEventArgs e)
        {
            if (dsVerbs == null)
                return;
            if ((e.Component is NeoTabWindow == false) ||
                e.Member.Name != "Controls")
                return;

            NeoTabWindow tw = e.Component as NeoTabWindow;
            switch (tw.Controls.Count)
            {
                case 0:
                    dsVerbs[0].Enabled = true;
                    dsVerbs[1].Enabled = false;
                    break;
                default:
                    dsVerbs[0].Enabled = true;
                    dsVerbs[1].Enabled = true;
                    break;
            }
        }
Example #17
0
		public virtual void OnComponentChanged (object sender, ComponentChangedEventArgs ce) { throw new NotImplementedException (); }
 public void OnComponentChanged(object component, MemberDescriptor member, object oldValue, object newValue)
 {
     if (ComponentChanged != null)
     {
         ComponentChangedEventArgs ce = new ComponentChangedEventArgs(component, member, oldValue, newValue);
         try
         {
             ComponentChanged(this, ce);
         }
         catch{}
     }
 }
Example #19
0
		void OnComponentChanged (object sender, ComponentChangedEventArgs e)
		{
//			BaseImageItem item = e.Component as BaseImageItem;
//			
//			if (item != null) {
//				item.ReportFileName = this.loader.ReportModel.ReportSettings.FileName;
//			}
			
			bool loading = this.loader != null && this.loader.Loading;
			LoggingService.Debug("ReportDesignerView: ComponentChanged: " + (e.Component == null ? "<null>" : e.Component.ToString()) + ", Member=" + (e.Member == null ? "<null>" : e.Member.Name) + ", OldValue=" + (e.OldValue == null ? "<null>" : e.OldValue.ToString()) + ", NewValue=" + (e.NewValue == null ? "<null>" : e.NewValue.ToString()) + "; Loading=" + loading + "; Unloading=" + this.unloading);
			if (!loading && !unloading) {
				this.MakeDirty();
			}
//			MergeFormChanges();
		}
 public override void OnComponentChanged(object sender, ComponentChangedEventArgs ce)
 {
     base.OnComponentChanged(sender, new ComponentChangedEventArgs(ce.Component, null, null, null));
 }
 private void componentChanged(object sender, ComponentChangedEventArgs e)
 {
     if ((e.Component is ListBoxItem) && this.selectedColumns.Items.Contains(e.Component))
     {
         this.formIsDirty = true;
     }
 }
 private void OnComponentChanged(object sender, ComponentChangedEventArgs e)
 {
     if (((e.Component is ToolStripItem) && (e.Member is PropertyDescriptor)) && (e.Member.Name == "Name"))
     {
         this.lblItems.Invalidate();
     }
 }
Example #23
0
 public override void OnComponentChanged(object sender, ComponentChangedEventArgs ce)
 {
     PropertyDescriptor member = ce.Member as PropertyDescriptor;
     string key = null;
     object propertyValue = null;
     object component = ce.Component;
     base.OnComponentChanged(sender, ce);
     if ((this.ActiveDeviceFilter != null) && (this._overridenValues[this.ActiveDeviceFilter] == null))
     {
         this._overridenValues[this.ActiveDeviceFilter] = new Hashtable();
     }
     if (member != null)
     {
         if (member.Converter is ExpandableObjectConverter)
         {
             Utils.ChangedSubProperty property = Utils.FindChangedSubProperty(string.Empty, this._mobileControl, member, (this.ActiveDeviceFilter != null) ? ((Hashtable) this._overridenValues[this.ActiveDeviceFilter]) : null, this._defaultValues);
             component = property.parentObject;
             member = property.propertyDescriptor;
             key = property.propertyName;
             propertyValue = property.propertyValue;
         }
         else
         {
             key = ce.Member.Name;
             propertyValue = ce.NewValue;
         }
         if (!this._isResetting)
         {
             if ((this.ActiveDeviceFilter != null) && this._deviceSpecificSelectionProvider.DeviceSpecificSelectionProviderEnabled)
             {
                 IAttributeAccessor currentChoice = this.CurrentChoice;
                 base.IsDirty = true;
                 if (currentChoice != null)
                 {
                     currentChoice.SetAttribute(key, member.Converter.ConvertToInvariantString(propertyValue));
                     ((Hashtable) this._overridenValues[this.ActiveDeviceFilter])[key] = propertyValue;
                 }
                 if (propertyValue.Equals(Utils.GetDefaultAttributeValue(member)))
                 {
                     IDictionary dictionary = this.CurrentChoice.get_Contents();
                     dictionary.Remove(key);
                     ((Hashtable) this._overridenValues[this.ActiveDeviceFilter]).Remove(key);
                     if (((Hashtable) this._overridenValues[this.ActiveDeviceFilter]).Count == 0)
                     {
                         this._overridenValues.Remove(this.ActiveDeviceFilter);
                     }
                     if (dictionary.Count == 0)
                     {
                         this._mobileControl.get_DeviceSpecific().get_Choices().Remove(this.CurrentChoice);
                         if (this._mobileControl.get_DeviceSpecific().get_Choices().get_Count() == 0)
                         {
                             this._mobileControl.set_DeviceSpecific(null);
                         }
                         else
                         {
                             Utils.SetDeviceSpecificChoice(this._mobileControl, null);
                         }
                     }
                     this._isResetting = true;
                     member.SetValue(component, this._defaultValues[key]);
                     this._isResetting = false;
                 }
             }
             else
             {
                 this._defaultValues[key] = propertyValue;
             }
         }
     }
 }
 private void OnComponentChanged(object sender, ComponentChangedEventArgs e)
 {
     IReferenceService referenceService = GetService(typeof(IReferenceService)) as IReferenceService;
     Activity changedActivity = (referenceService != null) ? referenceService.GetComponent(e.Component) as Activity : e.Component as Activity;
     if (changedActivity != null)
     {
         ActivityDesigner designer = ActivityDesigner.GetDesigner(changedActivity);
         if (designer != null)
         {
             CompositeActivityDesigner parentDesigner = designer.ParentDesigner;
             if (parentDesigner != null)
                 parentDesigner.OnContainedActivityChanged(new ActivityChangedEventArgs(changedActivity, e.Member, e.OldValue, e.NewValue));
         }
     }
 }
Example #25
0
		private void OnComponentChanged (object sender, ComponentChangedEventArgs args)
		{
			if (_currentUnit == null)
				_currentUnit = CreateUndoUnit ("Modify " + ((IComponent)args.Component).Site.Name + "." + 
							       (args.Member != null ? "." + args.Member.Name : ""), 
							       true);
			_currentUnit.ComponentChanged (args);

			IDesignerHost host = GetRequiredService (typeof (IDesignerHost)) as IDesignerHost;
			if (!host.InTransaction) {
				_currentUnit.Close ();
				AddUndoUnit (_currentUnit);
				_currentUnit = null;
			}
		}
 private void Handler_ComponentChanged(object theSender, ComponentChangedEventArgs theArgs)
 {
     this.CheckVerbStatus();
 }
Example #27
0
		private void OnComponentChanged(object sender,ComponentChangedEventArgs e)
		{
			System.Console.WriteLine("changed");
			System.Console.WriteLine("{0}",this.baseLine.ClientRectangle);
		}
Example #28
0
 void OnComponentChanged(object sender, ComponentChangedEventArgs e)
 {
     // repaint the control when any properties have changed
     Control.Invalidate();
 }
        void configurationsChangeService_ComponentChanged(object sender, ComponentChangedEventArgs e)
        {
            //you can make changes while in Debug mode, so do not quit if in debug mode
            //in debug mode, this function clears the cache immediately, but no rescanning is done because BuildToDos quits in debug mode

            bool bHighlightCalled = false;
            try
            {
                mostRecentComponentEvent = DateTime.Now;
                System.Diagnostics.Debug.WriteLine("enter " + e.Component.GetType().FullName + " ComponentChanged");
                if (e.Member != null)
                    System.Diagnostics.Debug.WriteLine("member descriptor type: " + e.Member.GetType().FullName);

                if (e.Component is Package)
                {
                    if (e.Member == null) //capture when the package configuration editor window is closed
                    {
                        IDesignerHost designer = (IDesignerHost)sender;
                        Window win = FindWindowForDesigner(designer);
                        if (win == null) return;
                        HighlightingToDo.ClearCache((Package)e.Component);
                        BuildToDos(win, (DtsContainer)e.Component);
                        bHighlightCalled = true;
                        return;
                    }
                }
                else if (e.Component is DtsObject && e.Member != null)
                {
                    if (e.Member.Name == "Expressions" || e.Member.Name == "Name")
                    {
                        IDesignerHost designer = (IDesignerHost)sender;
                        Window win = FindWindowForDesigner(designer);
                        if (win == null) return;
                        if (e.Component is Executable)
                            HighlightingToDo.ClearCache((Executable)e.Component);
                        else if (e.Component is ConnectionManager)
                            HighlightingToDo.ClearCache((ConnectionManager)e.Component);
                        BuildToDos(win, (DtsObject)(e.Component));
                        bHighlightCalled = true;
                        return;
                    }
                }
                else if (e.Component is Microsoft.DataTransformationServices.PipelineDesignTimeObject)
                {
                    Microsoft.DataTransformationServices.PipelineDesignTimeObject pipelineMetadata = e.Component as Microsoft.DataTransformationServices.PipelineDesignTimeObject;
                    System.Diagnostics.Debug.WriteLine("edited transform: " + pipelineMetadata.Name);
                    IDesignerHost designer = (IDesignerHost)sender;
                    Window win = FindWindowForDesigner(designer);
                    if (win == null) return;
                    string sUniqueID = win.ProjectItem.Name + "/" + pipelineMetadata.PipelineTask.ID + "/components/" + pipelineMetadata.ID;
                    System.Diagnostics.Debug.WriteLine("clearing cache for: " + sUniqueID);
                    HighlightingToDo.ClearCache(sUniqueID);
                    BuildToDos(win, pipelineMetadata.PipelineTask, pipelineMetadata.ID);
                    bHighlightCalled = true;
                    return;
                }
                //TODO:
                //don't think this is necessary anymore
                //else if (e.Component is Microsoft.DataWarehouse.VsIntegration.Designer.NamedCustomTypeDescriptor)
                //{
                //    IDesignerHost designer = (IDesignerHost)sender;
                //    foreach (Window win in this.ApplicationObject.Windows)
                //    {
                //        if (win.Object == designer)
                //        {
                //            BuildToDos(win, null);
                //            bHighlightCalled = true;
                //            return;
                //        }
                //    }
                //}
            }
            catch (Exception ex)
            {
                System.Diagnostics.Debug.WriteLine("error in configurationsChangeService_ComponentChanged: " + ex.Message + " " + ex.StackTrace);
            }
            finally
            {
                try
                {
                    if (e.Component != null)
                    {
                        if (e.Member != null)
                            System.Diagnostics.Debug.WriteLine(e.Component.GetType().FullName + " property updated: " + e.Member.Name + (bHighlightCalled ? " HIGHLIGHTED" : ""));
                        else
                            System.Diagnostics.Debug.WriteLine(e.Component.GetType().FullName + " updated" + (bHighlightCalled ? " HIGHLIGHTED" : ""));
                    }
                }
                catch { }
            }
        }
Example #30
0
			public virtual void ComponentChanged (ComponentChangedEventArgs e)
			{
				if (_closed)
					return;

				// A component starts getting removed. 
				// ComponentRemoving -> remove component -> ComponentRemoved
				// The problem is that someone can subscribe to the Removed event after us (the UndoEngine) - e.g
				// ParentControlDesigner will explicitly request (by setting it to null between Removing and Removed 
				// the serialization of the Parent property of the removed child.
				// In the case where someone subscribes after and performs changes to the component, we might get 
				// ComponentChanged events after we've already created the addremove action, but the componentchangeaction
				// will be incomplete standing before the addremove one.
				//
				ComponentChangeAction changeAction = null;
				for (int i=0; i < _actions.Count; i++) {
					changeAction = _actions[i] as ComponentChangeAction;
					if (changeAction != null && !changeAction.IsComplete &&
					    changeAction.Component == e.Component &&
					    changeAction.Member.Equals (e.Member)) {
						changeAction.SetModifiedState (_engine, (IComponent) e.Component, e.Member);
						break;
					}
				}
			}
Example #31
0
 /// <summary>
 /// Called when the associated control changes.
 /// </summary>
 /// <param name="sender">The source of the event.</param>
 /// <param name="ce">A <see cref="T:System.ComponentModel.Design.ComponentChangedEventArgs"></see> that contains the event data.</param>
 public override void OnComponentChanged(object sender, ComponentChangedEventArgs ce)
 {
     base.OnComponentChanged(sender, ce);
     UpdateDesignTimeHtml();
 }