コード例 #1
0
		/// <summary>
		/// Initializes a new instance of the ImageListViewActionLists class.
		/// </summary>
		/// <param name="component">A component related to the DesignerActionList.</param>
		public ImageListViewActionLists(IComponent component)
			: base(component)
		{
			imageListView = (ImageListView)component;

			designerService = (DesignerActionUIService)GetService(typeof(DesignerActionUIService));
		}
コード例 #2
0
 // Methods
 public PlantillaBotonActionList(IComponent component)
     : base(component)
 {
     this.designerActionUISvc = null;
     this.m_PlantillaBoton = (PlantillaBoton)component;
     this.designerActionUISvc = (DesignerActionUIService)base.GetService(typeof(DesignerActionUIService));
 }
コード例 #3
0
		public TextBasedDesignerActionList(IComponent component):base(component)
		{
			this.component = component;
			this.designerActionUISvc =
            GetService(typeof(DesignerActionUIService))
            as DesignerActionUIService;

		}
コード例 #4
0
        public smtTagActionList(IComponent component)
            : base(component)
        {
            this.commentsForDx = component as UcCommentsForDXGrid;

            // Cache a reference to DesignerActionUIService,
            // so the DesigneractionList can be refreshed.
            this.designerActionUISvc = GetService(typeof(DesignerActionUIService)) as DesignerActionUIService;
        }
 public DesignerActionKeyboardBehavior(DesignerActionPanel panel, IServiceProvider serviceProvider, BehaviorService behaviorService) : base(true, behaviorService)
 {
     this.panel = panel;
     if (serviceProvider != null)
     {
         this.menuService = serviceProvider.GetService(typeof(IMenuCommandService)) as IMenuCommandService;
         this.daUISvc = serviceProvider.GetService(typeof(DesignerActionUIService)) as DesignerActionUIService;
     }
 }
コード例 #6
0
 protected BaseActionList(IComponent component) : base(component)
 {
     //store the component for this instance
     _instanceComponent = component;
     //store a designer service for this instance
     _designerActionUISvc = GetService(typeof(DesignerActionUIService)) as DesignerActionUIService;
     //attach the UI refresh handler
     //this.DesignerActionUISvc.DesignerActionUIStateChange += new DesignerActionUIStateChangeEventHandler(OnDesignerActionUIStateChange);
 }
        // The constructor associates the control to the smart tag action list.
        public KRBTabControlActionList(KrbTabControl control)
            : base(control)
        {
            _linkedControl = control;
            _host = (IDesignerHost)GetService(typeof(IDesignerHost));
            _changeService = (IComponentChangeService)GetService(typeof(IComponentChangeService));
            _designerService = (DesignerActionUIService)GetService(typeof(DesignerActionUIService));

            AutoShow = true;   // When this control will be added to the design area, the smart tag panel will open automatically.
        }
 public ListControlBoundActionList(ControlDesigner owner) : base(owner.Component)
 {
     this._owner = owner;
     ListControl component = (ListControl) base.Component;
     if (component.DataSource != null)
     {
         this._boundMode = true;
     }
     this.uiService = base.GetService(typeof(DesignerActionUIService)) as DesignerActionUIService;
 }
コード例 #9
0
        //The constructor associates the control with the smart tag list.
        public CFComponentActionList(IComponent component) : base(component)
        {
            this.m_cfComponent = component as CFComponentN18.CFComponent;

            // Cache a reference to DesignerActionUIService,
            // so the DesigneractionList can be refreshed.
            this.designerActionUISvc =
                GetService(typeof(System.ComponentModel.Design.DesignerActionUIService)) as
                System.ComponentModel.Design.DesignerActionUIService;
        }
コード例 #10
0
        //The constructor associates the control
        //with the smart tag list.
        public MultiPanelActionList(IComponent component)
            : base(component)
        {
            this.multiPanel = component as MultiPanel;

            // Cache a reference to DesignerActionUIService, so the
            // DesigneractionList can be refreshed.
            this.designerActionUISvc =
                GetService(typeof(DesignerActionUIService))
                as DesignerActionUIService;
        }
コード例 #11
0
        /// <summary>
        /// Initialize a new instance of the KryptonNavigatorActionList class.
        /// </summary>
        /// <param name="owner">Designer that owns this action list instance.</param>
        public KryptonNavigatorActionList(KryptonNavigatorDesigner owner)
            : base(owner.Component)
        {
            // Remember designer and actual component instance being designed
            _designer = owner;
            _navigator = (KryptonNavigator)owner.Component;

            // Cache service used to notify when a property has changed
            _serviceComponentChange = (IComponentChangeService)GetService(typeof(IComponentChangeService));
            _serviceDesignerAction = (DesignerActionUIService)GetService(typeof(DesignerActionUIService));
        }
コード例 #12
0
		/// <summary>
		/// Initializes a new instance of the <see cref="NuGenCalendarActionList"/> class.
		/// </summary>
		/// <param name="component">A component related to the <see cref="T:System.ComponentModel.Design.DesignerActionList"></see>.</param>
		public NuGenCalendarActionList(IComponent component)
			: base(component)
		{
			this.calendar = component as NuGenCalendar;

			// Cache a reference to DesignerActionUIService, so the
			// DesigneractionList can be refreshed.
			this.designerActionUISvc =
				GetService(typeof(DesignerActionUIService))
				as DesignerActionUIService;
		}
コード例 #13
0
        public NavigateBarActionList(IComponent component)
            : base(component)
        {
            if (!(component is NavigateBar))
            {
                throw new System.ArgumentException("The NavigateBarActionList only defines a list of smart tag items for controls of type, or controls that derive from type, NavigateBar.", "component");
            }

            this.actionUISvc = GetService(typeof(DesignerActionUIService)) as DesignerActionUIService;
            this.designerHost = (IDesignerHost)GetService(typeof(IDesignerHost));

            // Set Designer Item Collection

            SetDesignerActionItemObjects();
        }
コード例 #14
0
        private void ShowDesignerActionUI(object sender, DesignerTransactionCloseEventArgs e)
        {
            DesignerActionUIService service = (DesignerActionUIService)this.GetService(typeof(DesignerActionUIService));

            if (service != null)
            {
                service.ShowUI(this.Component);
            }
            IDesignerHost host = (IDesignerHost)this.GetService(typeof(IDesignerHost));

            if (host != null)
            {
                host.TransactionClosed -= new DesignerTransactionCloseEventHandler(this.ShowDesignerActionUI);
            }
        }
コード例 #15
0
        public virtual void InitializeNewComponent(IDictionary defaultValues)
        {
            DesignerActionUIService service = (DesignerActionUIService)this.GetService(typeof(DesignerActionUIService));

            if ((service != null) && service.ShouldAutoShow(this.Component))
            {
                IDesignerHost host = (IDesignerHost)this.GetService(typeof(IDesignerHost));
                if ((host != null) && host.InTransaction)
                {
                    host.TransactionClosed += new DesignerTransactionCloseEventHandler(this.ShowDesignerActionUI);
                }
                else
                {
                    service.ShowUI(this.Component);
                }
            }
            this.OnSetComponentDefaults();
        }
コード例 #16
0
 public DesignerActionUI(IServiceProvider serviceProvider, Adorner containerAdorner)
 {
     this.serviceProvider = serviceProvider;
     this.designerActionAdorner = containerAdorner;
     this.behaviorService = (BehaviorService) serviceProvider.GetService(typeof(BehaviorService));
     this.menuCommandService = (IMenuCommandService) serviceProvider.GetService(typeof(IMenuCommandService));
     this.selSvc = (ISelectionService) serviceProvider.GetService(typeof(ISelectionService));
     if ((this.behaviorService != null) && (this.selSvc != null))
     {
         this.designerActionService = (DesignerActionService) serviceProvider.GetService(typeof(DesignerActionService));
         if (this.designerActionService == null)
         {
             this.designerActionService = new DesignerActionService(serviceProvider);
             this.disposeActionService = true;
         }
         this.designerActionUIService = (DesignerActionUIService) serviceProvider.GetService(typeof(DesignerActionUIService));
         if (this.designerActionUIService == null)
         {
             this.designerActionUIService = new DesignerActionUIService(serviceProvider);
             this.disposeActionUIService = true;
         }
         this.designerActionUIService.DesignerActionUIStateChange += new DesignerActionUIStateChangeEventHandler(this.OnDesignerActionUIStateChange);
         this.designerActionService.DesignerActionListsChanged += new DesignerActionListsChangedEventHandler(this.OnDesignerActionsChanged);
         this.lastPanelComponent = null;
         IComponentChangeService service = (IComponentChangeService) serviceProvider.GetService(typeof(IComponentChangeService));
         if (service != null)
         {
             service.ComponentChanged += new ComponentChangedEventHandler(this.OnComponentChanged);
         }
         if (this.menuCommandService != null)
         {
             this.cmdShowDesignerActions = new MenuCommand(new EventHandler(this.OnKeyShowDesignerActions), MenuCommands.KeyInvokeSmartTag);
             this.menuCommandService.AddCommand(this.cmdShowDesignerActions);
         }
         this.uiService = (IUIService) serviceProvider.GetService(typeof(IUIService));
         if (this.uiService != null)
         {
             this.mainParentWindow = this.uiService.GetDialogOwnerWindow();
         }
         this.componentToGlyph = new Hashtable();
         this.marshalingControl = new Control();
         this.marshalingControl.CreateControl();
     }
 }
コード例 #17
0
        /// <summary>
        /// component kontrol et ve servisleri yükle
        /// </summary>
        /// <param name="component"></param>
        public override void Initialize(IComponent component)
        {
            base.Initialize(component);

            if (component == null)
                throw new NullReferenceException("Component cannot be null");

            if (!(component is NavigateBar))
                throw new System.ArgumentException("Component not NavigateBar or derived ", "component");

            this.actionUISvc = GetService(typeof(DesignerActionUIService)) as DesignerActionUIService;
            this.componentChnSvc = (IComponentChangeService)GetService(typeof(IComponentChangeService));
            this.designerHost = (IDesignerHost)GetService(typeof(IDesignerHost));
            this.selectionSvc = (ISelectionService)GetService(typeof(ISelectionService));

            // Eventlar
            this.componentChnSvc.ComponentRemoving += new ComponentEventHandler(componentChnSvc_ComponentRemoving);
            this.selectionSvc.SelectionChanged += new EventHandler(selectionSvc_SelectionChanged);
        }
コード例 #18
0
        public ProgressBarActionList(IComponent component) : base(component)
        {

            // Save a reference to the control we are designing.
            _ProgressBarSelector = (ProgressBar)component;

            // Save a reference to the DesignerActionUIService
            _DesignerService = (DesignerActionUIService)GetService(typeof(DesignerActionUIService));

            //Makes the Smart Tags open automatically
            this.AutoShow = true;
        }
 public virtual void Initialize(IComponent component)
 {
     ControlDesigner.VerifyInitializeArgument(component, typeof(TemplateControl));
     this._component = component;
     IServiceContainer container = (IServiceContainer) this.GetService(typeof(IServiceContainer));
     if (container != null)
     {
         this._urlResolutionService = this.CreateUrlResolutionService();
         if (this._urlResolutionService != null)
         {
             container.AddService(typeof(IUrlResolutionService), this._urlResolutionService);
         }
         this._designerActionService = this.CreateDesignerActionService(this._component.Site);
         this._designerActionUIService = new DesignerActionUIService(this._component.Site);
         ServiceCreatorCallback callback = new ServiceCreatorCallback(this.OnCreateService);
         container.AddService(typeof(IImplicitResourceProvider), callback);
     }
     IPropertyValueUIService service = (IPropertyValueUIService) this.GetService(typeof(IPropertyValueUIService));
     if (service != null)
     {
         service.AddPropertyValueUIHandler(new PropertyValueUIHandler(this.OnGetUIValueItem));
     }
 }
コード例 #20
0
 public void Dispose()
 {
     if (this.marshalingControl != null)
     {
         this.marshalingControl.Dispose();
         this.marshalingControl = null;
     }
     if (this.serviceProvider != null)
     {
         IComponentChangeService service = (IComponentChangeService) this.serviceProvider.GetService(typeof(IComponentChangeService));
         if (service != null)
         {
             service.ComponentChanged -= new ComponentChangedEventHandler(this.OnComponentChanged);
         }
         if (this.cmdShowDesignerActions != null)
         {
             IMenuCommandService service2 = (IMenuCommandService) this.serviceProvider.GetService(typeof(IMenuCommandService));
             if (service2 != null)
             {
                 service2.RemoveCommand(this.cmdShowDesignerActions);
             }
         }
     }
     this.serviceProvider = null;
     this.behaviorService = null;
     this.selSvc = null;
     if (this.designerActionService != null)
     {
         this.designerActionService.DesignerActionListsChanged -= new DesignerActionListsChangedEventHandler(this.OnDesignerActionsChanged);
         if (this.disposeActionService)
         {
             this.designerActionService.Dispose();
         }
     }
     this.designerActionService = null;
     if (this.designerActionUIService != null)
     {
         this.designerActionUIService.DesignerActionUIStateChange -= new DesignerActionUIStateChangeEventHandler(this.OnDesignerActionUIStateChange);
         if (this.disposeActionUIService)
         {
             this.designerActionUIService.Dispose();
         }
     }
     this.designerActionUIService = null;
     this.designerActionAdorner = null;
 }
コード例 #21
0
ファイル: SmartTag.cs プロジェクト: hbaes/updateSystem.NET
		public SmartTagActionListBase(IComponent component)
			: base(component) {
			m_DesignerService = (DesignerActionUIService) GetService(typeof (DesignerActionUIService));
			m_ActionList = new DesignerActionItemCollection();
			if (component is Control) {
				m_Control = (Control) component;
			}
			else {
				m_Control = null;
			}
		}
コード例 #22
0
         /// <summary>
         /// Initializes a new instance of the <see cref="MonthCalendarControlDesignerActionList"/> class.
         /// </summary>
         /// <param name="component">The component.</param>
         public MonthCalendarControlDesignerActionList(IComponent component)
            : base(component)
         {
            Type compType = component.GetType();

            if (component == null || (compType != typeof(CustomControls.MonthCalendar) && compType != typeof(DatePicker)))
            {
               throw new InvalidOperationException("MonthCalendarDesigner : component is null or not of the correct type.");
            }

            if (compType == typeof(DatePicker))
            {
               this.cal = ((DatePicker)component).Picker;
            }
            else
            {
               this.cal = (CustomControls.MonthCalendar)component;
            }

            this.iccs = (IComponentChangeService)GetService(typeof(IComponentChangeService));

            this.designerUISvc = (DesignerActionUIService)GetService(typeof(DesignerActionUIService));
         }
コード例 #23
0
ファイル: TabItem.cs プロジェクト: gratianlup/TabControl
        public TabItemActionList(IComponent component)
            : base(component)
        {
            tabItem = component as TabItem;
            service = GetService(typeof(DesignerActionUIService)) as DesignerActionUIService;

            IDesignerHost host = Component.Site.GetService(typeof(IDesignerHost)) as IDesignerHost;
            tabItemDesigner = host.GetDesigner(component) as TabItemDesigner;
        }
コード例 #24
0
        //The constructor associates the control with the smart tag list.
        public Class1DesignerActionList(IComponent component)
            : base(component)
        {
            //this.colUserControl = component as Class1;

            // Cache a reference to DesignerActionUIService, 
            // so the DesigneractionList can be refreshed.
            this.designerActionUISvc = GetService(typeof(DesignerActionUIService))
                as DesignerActionUIService;
        }
コード例 #25
0
ファイル: PagerDesigner.cs プロジェクト: mizanasp/AspNetPager
 /// <summary>
 /// Constructor
 /// </summary>
 /// <param name="component"></param>
 public AspNetPagerActionList(IComponent component)
     : base(component)
 {
     pager = component as AspNetPager;
     svc = GetService(typeof(DesignerActionUIService)) as DesignerActionUIService;
 }
コード例 #26
0
            /// <summary>
            /// Initializes a new instance of the <see cref="FrameDesignerActionList"/> class.
            /// </summary>
            /// <param name="control">The base control.</param>
            public FrameDesignerActionList(BaseControl control)
                : base(control)
            {
                if (control == null)
                    throw new ArgumentNullException("control");

                this.control = control;

                // Get the Designer Action UI service
                this.designerActionUIService = GetService(typeof(DesignerActionUIService)) as DesignerActionUIService;
            }
コード例 #27
0
ファイル: TabHost.cs プロジェクト: gratianlup/TabControl
 public TabHostActionList(IComponent component)
     : base(component)
 {
     tabHost = component as TabHost;
     service = GetService(typeof(DesignerActionUIService)) as DesignerActionUIService;
 }