示例#1
0
        void CreatePageHeader(ReportWizardContext context)
        {
            var pushModelContext = (PushModelContext)context.PushModelContext;

            foreach (var element in pushModelContext.Items)
            {
                var dataItem = new BaseTextItem()
                {
                    Name = element.ColumnName,
                    Text = element.ColumnName
                };
                ReportModel.PageHeader.Items.Add(dataItem);
            }

            AdjustItems(ReportModel.PageHeader.Items, startLocation);

            var line = new BaseLineItem()
            {
                Location  = new Point(2, 35),
                FromPoint = new Point(1, 1),
                ToPoint   = new Point(ReportModel.ReportSettings.PrintableWidth() - 10, 1),
                Size      = new Size(ReportModel.ReportSettings.PrintableWidth() - 5, 5)
            };

            ReportModel.PageHeader.Items.Add(line);
        }
 public override void Initialize(IComponent component)
 {
     if (component == null)
     {
         throw new ArgumentNullException("component");
     }
     base.Initialize(component);
     baseLine = (BaseLineItem)component;
 }
示例#3
0
        protected override void OnPaintAdornments(PaintEventArgs pe)
        {
            BaseLineItem label = (BaseLineItem)Control;

            if (selectionService != null)
            {
                if (selectionService.GetComponentSelected(label))
                {
                    // Paint grab handles.
                    Rectangle grapRectangle = GetHandle(label.FromPoint);
                    ControlPaint.DrawGrabHandle(pe.Graphics, grapRectangle, true, true);
                    grapRectangle = GetHandle(label.ToPoint);
                    ControlPaint.DrawGrabHandle(pe.Graphics, grapRectangle, true, true);
                }
            }
        }
示例#4
0
        protected override void OnSetCursor(  )
        {
            // Get mouse cursor position relative to
            // the control's coordinate space.

            BaseLineItem label = (BaseLineItem)Control;
            Point        p     = label.PointToClient(Cursor.Position);

            // Display a resize cursor if the mouse is
            // over a grab handle; otherwise show a
            // normal arrow.
            if (GetHandle(label.FromPoint).Contains(p) ||
                GetHandle(label.ToPoint).Contains(p))
            {
                Cursor.Current = Cursors.SizeAll;
            }
            else
            {
                Cursor.Current = Cursors.Default;
            }
        }
示例#5
0
		public override void Initialize(IComponent component)
		{
			if (component == null) {
				throw new ArgumentNullException("component");
			}
			base.Initialize(component);
			this.baseLine = (BaseLineItem)component;
			
			this.componentChangeService = (IComponentChangeService)component.Site.GetService(typeof(IComponentChangeService));
			if (componentChangeService != null) {
				componentChangeService.ComponentChanging += OnComponentChanging;
				componentChangeService.ComponentChanged += OnComponentChanged;
				componentChangeService.ComponentRename += new ComponentRenameEventHandler(OnComponentRename);
			}
			
			selectionService = GetService(typeof(ISelectionService)) as ISelectionService;
			if (selectionService != null)
			{
				selectionService.SelectionChanged += OnSelectionChanged;
			}
			
		}
示例#6
0
        public override void Initialize(IComponent component)
        {
            if (component == null)
            {
                throw new ArgumentNullException("component");
            }
            base.Initialize(component);
            this.baseLine = (BaseLineItem)component;

            this.componentChangeService = (IComponentChangeService)component.Site.GetService(typeof(IComponentChangeService));
            if (componentChangeService != null)
            {
                componentChangeService.ComponentChanging += OnComponentChanging;
                componentChangeService.ComponentChanged  += OnComponentChanged;
                componentChangeService.ComponentRename   += new ComponentRenameEventHandler(OnComponentRename);
            }

            selectionService = GetService(typeof(ISelectionService)) as ISelectionService;
            if (selectionService != null)
            {
                selectionService.SelectionChanged += OnSelectionChanged;
            }
        }