public override void CreateNewControl(SectionView sectionView) { var startPoint = sectionView.PointInSectionByAbsolutePoint (designService.StartPressPoint.X, designService.StartPressPoint.Y); MonoReports.Model.Controls.Image img = new MonoReports.Model.Controls.Image(){ Location = new MonoReports.Model.Point (startPoint.X, startPoint.Y), Width = 50, Height=50}; ImageView imageView = sectionView.CreateControlView (img) as ImageView; sectionView.Section.Controls.Add (img); imageView.ParentSection = sectionView; designService.SelectedControl = imageView; }
public override void CreateNewControl(SectionView sectionView) { var startPoint = sectionView.PointInSectionByAbsolutePoint (designService.StartPressPoint.X, designService.StartPressPoint.Y); var tb = new TextBlock { Location = new MonoReports.Model.Point (startPoint.X, startPoint.Y), Text="text", FontName="Helvetica", FontSize=11, Size = new Size(70,14) }; TextBlockView textBlockView = sectionView.CreateControlView (tb) as TextBlockView; sectionView.Section.Controls.Add (tb); textBlockView.ParentSection = sectionView; designService.SelectedControl = textBlockView; }
public override void CreateNewControl(SectionView sectionView) { var startPoint = sectionView.PointInSectionByAbsolutePoint (designService.StartPressPoint.X, designService.StartPressPoint.Y); var subreport = new SubReport { Location = new MonoReports.Model.Point (startPoint.X, startPoint.Y), Size = new Size(50,20), BackgroundColor = new MonoReports.Model.Color(0.5,0.5,0.5) }; SubreportView subreportView = sectionView.CreateControlView (subreport) as SubreportView; sectionView.Section.Controls.Add (subreport); subreportView.ParentSection = sectionView; designService.SelectedControl = subreportView; }
public override void CreateNewControl(SectionView sectionView) { var startPoint = sectionView.PointInSectionByAbsolutePoint (designService.StartPressPoint.X, designService.StartPressPoint.Y); var l = createLine(startPoint.X,startPoint.Y); var lineView = sectionView.CreateControlView (l); sectionView.Section.Controls.Add (l); lineView.ParentSection = sectionView; designService.SelectedControl = lineView; }
public override void OnMouseDown() { currentSection = designService.SelectedControl != null ? designService.SelectedControl.ParentSection : null; if (designService.SelectedControl != null) { lineDistance = 6 - designService.Zoom; line = designService.SelectedControl.ControlModel as Line; var location = line.Location; var startPoint = currentSection.PointInSectionByAbsolutePoint (designService.StartPressPoint); Cairo.PointD startDistance = new Cairo.PointD ( location.X - startPoint.X, location.Y - startPoint.Y); Cairo.PointD endDistance = new Cairo.PointD (line.End.X - startPoint.X,line.End.Y - startPoint.Y); if (startDistance.X < lineDistance && startDistance.X > -lineDistance && startDistance.Y < lineDistance && startDistance.Y > -lineDistance) { startPointHit = true; } else { if (endDistance.X < lineDistance && endDistance.X > -lineDistance && endDistance.Y < lineDistance && endDistance.Y > -lineDistance) endPointHit = true; } } }
public override ControlViewBase CreateNewControl(SectionView sectionView) { var startPoint = sectionView.PointInSectionByAbsolutePoint (designService.StartPressPoint.X, designService.StartPressPoint.Y); var l = createLine(startPoint.X,startPoint.Y); return AddControl(sectionView, l); }
public override ControlViewBase CreateNewControl(SectionView sectionView) { var startPoint = sectionView.PointInSectionByAbsolutePoint (designService.StartPressPoint.X, designService.StartPressPoint.Y); MonoReports.Model.Controls.Image img = new MonoReports.Model.Controls.Image(){ Location = new MonoReports.Model.Point (startPoint.X, startPoint.Y), Width = 2.cm(), Height=1.cm()}; return AddControl(sectionView,img); }
public override ControlViewBase CreateNewControl(SectionView sectionView) { var startPoint = sectionView.PointInSectionByAbsolutePoint (designService.StartPressPoint.X, designService.StartPressPoint.Y); var tb = new TextBlock { Location = new MonoReports.Model.Point (startPoint.X, startPoint.Y), Text=Catalog.GetString("text") }; return AddControl(sectionView, tb); }