Skip to content
This repository was archived by the owner on Oct 16, 2020. It is now read-only.

Commit 2966668

Browse files
Cleanup Designer
1 parent c8a714b commit 2966668

9 files changed

Lines changed: 49 additions & 31 deletions

File tree

src/AddIns/Misc/Reporting/ICSharpCode.Reporting.Addin/src/Commands/FormsCommands.cs

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@
99
using System;
1010
using System.ComponentModel.Design;
1111
using ICSharpCode.Core;
12+
using ICSharpCode.SharpDevelop;
1213
using ICSharpCode.SharpDevelop.Gui;
1314
using ICSharpCode.Reporting.Addin.Views;
1415

@@ -31,7 +32,7 @@ protected virtual bool CanExecuteCommand(IDesignerHost host)
3132

3233
protected static DesignerView ReportDesigner {
3334
get {
34-
var window = WorkbenchSingleton.Workbench.ActiveWorkbenchWindow;
35+
var window = SD.Workbench;
3536
if (window == null) {
3637
return null;
3738
}
@@ -67,7 +68,8 @@ public override CommandID CommandID {
6768

6869
public override void Run()
6970
{
70-
var window = WorkbenchSingleton.Workbench.ActiveWorkbenchWindow;
71+
// var window = WorkbenchSingleton.Workbench.ActiveWorkbenchWindow;
72+
var window = SD.Workbench;
7173
if (window == null) {
7274
return;
7375
}

src/AddIns/Misc/Reporting/ICSharpCode.Reporting.Addin/src/DesignableItems/BaseLineItem.cs

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,7 @@ public override void Draw(Graphics graphics)
5858
throw new ArgumentNullException("graphics");
5959
}
6060
using (var p = new Pen(ForeColor,Thickness)) {
61-
p.SetLineCap(StartLineCap,EndLineCap,DashLineCap);
61+
p.SetLineCap(StartLineCap,EndLineCap,DashCap.Flat);
6262
graphics.DrawLine(p,fromPoint,toPoint);
6363
}
6464
}
@@ -115,14 +115,14 @@ public LineCap EndLineCap {
115115
}
116116

117117

118-
[Category("Appearance")]
119-
public DashCap DashLineCap {
120-
get { return dashLineCap; }
121-
set {
122-
dashLineCap = value;
123-
Invalidate();
124-
}
125-
}
118+
// [Category("Appearance")]
119+
// public DashCap DashLineCap {
120+
// get { return dashLineCap; }
121+
// set {
122+
// dashLineCap = value;
123+
// Invalidate();
124+
// }
125+
// }
126126

127127
}
128128
}

src/AddIns/Misc/Reporting/ICSharpCode.Reporting.Addin/src/DesignableItems/BaseSection.cs

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -43,14 +43,14 @@ public override void Draw(Graphics graphics)
4343

4444

4545
#region Propertys
46+
//
47+
// [Browsable(false)]
48+
// public int SectionOffset {get;set;}
4649

47-
[Browsable(false)]
48-
public int SectionOffset {get;set;}
49-
50-
[Browsable(false)]
51-
public int SectionMargin {get;set;}
50+
// [Browsable(false)]
51+
// public int SectionMargin {get;set;}
5252

53-
public bool PageBreakAfter {get;set;}
53+
// public bool PageBreakAfter {get;set;}
5454

5555
public bool CanGrow {get;set;}
5656

src/AddIns/Misc/Reporting/ICSharpCode.Reporting.Addin/src/TypeProvider/LineItemTypeProvider.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -71,8 +71,8 @@ public override PropertyDescriptorCollection GetProperties(Attribute[] attribute
7171
prop = props.Find("EndLineCap",true);
7272
allProperties.Add(prop);
7373

74-
prop = props.Find("dashLineCap",true);
75-
allProperties.Add(prop);
74+
// prop = props.Find("DashLineCap",true);
75+
// allProperties.Add(prop);
7676

7777
prop = props.Find("DashStyle",true);
7878
allProperties.Add(prop);

src/AddIns/Misc/Reporting/ICSharpCode.Reporting.Addin/src/TypeProvider/SectionItemTypeProvider.cs

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -55,17 +55,17 @@ public override PropertyDescriptorCollection GetProperties(Attribute[] attribute
5555
TypeProviderHelper.AddDefaultProperties(allProperties,props);
5656
PropertyDescriptor prop = null;
5757

58-
prop = props.Find("SectionOffset",true);
59-
allProperties.Add(prop);
58+
// prop = props.Find("SectionOffset",true);
59+
// allProperties.Add(prop);
6060

61-
prop = props.Find("SectionMargin",true);
62-
allProperties.Add(prop);
61+
// prop = props.Find("SectionMargin",true);
62+
// allProperties.Add(prop);
6363

6464
prop = props.Find("DrawBorder",true);
6565
allProperties.Add(prop);
6666

67-
prop = props.Find("PageBreakAfter",true);
68-
allProperties.Add(prop);
67+
// prop = props.Find("PageBreakAfter",true);
68+
// allProperties.Add(prop);
6969

7070
prop = props.Find("Controls",true);
7171
allProperties.Add(prop);

src/AddIns/Misc/Reporting/ICSharpCode.Reporting/Src/Items/Graphics/BaseLineItem.cs

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@
1616
// OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
1717
// DEALINGS IN THE SOFTWARE.
1818

19+
using System.Drawing;
1920
using ICSharpCode.Reporting.Interfaces.Export;
2021
using ICSharpCode.Reporting.PageBuilder.ExportColumns;
2122

@@ -41,7 +42,16 @@ public override IExportColumn CreateExportColumn()
4142
ex.DashStyle = DashStyle;
4243
ex.StartLineCap = StartLineCap;
4344
ex.EndLineCap = EndLineCap;
45+
ex.FromPoint = FromPoint;
46+
ex.ToPoint = ToPoint;
4447
return ex;
4548
}
49+
50+
51+
public Point FromPoint {get;set;}
52+
53+
public Point ToPoint {get;set;}
54+
55+
4656
}
4757
}

src/AddIns/Misc/Reporting/ICSharpCode.Reporting/Src/PageBuilder/ExportColumns/ExportLine.cs

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@
1717
// DEALINGS IN THE SOFTWARE.
1818

1919
using System;
20+
using System.Drawing;
2021
using System.Drawing.Drawing2D;
2122
using ICSharpCode.Reporting.Exporter.Visitors;
2223
using ICSharpCode.Reporting.Interfaces.Export;
@@ -60,5 +61,9 @@ public override ICSharpCode.Reporting.Arrange.IMeasurementStrategy MeasurementSt
6061
public LineCap StartLineCap {get;set;}
6162

6263
public LineCap EndLineCap {get;set;}
64+
65+
public Point FromPoint {get;set;}
66+
67+
public Point ToPoint {get;set;}
6368
}
6469
}

src/AddIns/Misc/Reporting/ICSharpCode.Reporting/Src/Wpf/Visitor/WpfVisitor.cs

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -134,14 +134,15 @@ public override void Visit(ExportText exportColumn){
134134
}
135135

136136

137-
public override void Visit(ExportLine exportGraphics)
137+
public override void Visit(ExportLine exportLine)
138138
{
139-
var pen = FixedDocumentCreator.CreateWpfPen(exportGraphics);
139+
var pen = FixedDocumentCreator.CreateWpfPen(exportLine);
140140
var visual = new DrawingVisual();
141141
using (var dc = visual.RenderOpen()){
142142
dc.DrawLine(pen,
143-
new Point(exportGraphics.Location.X, exportGraphics.Location.Y),
144-
new Point(exportGraphics.Location.X + exportGraphics.Size.Width,exportGraphics.Location.Y));
143+
new Point(exportLine.Location.X + exportLine.FromPoint.X, exportLine.Location.Y + exportLine.FromPoint.Y),
144+
new Point(exportLine.Location.X + exportLine.ToPoint.X ,
145+
exportLine.Location.Y + exportLine.FromPoint.Y));
145146
}
146147
var dragingElement = new DrawingElement(visual);
147148
UIElement = dragingElement;

src/AddIns/Misc/Reporting/ICSharpCode.Reporting/Src/Xml/MycroParser.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,7 @@ object ProcessNode(XmlNode node, object parent)
6262
// instantiate the class
6363
string ns=node.Prefix;
6464
string cname=node.LocalName;
65-
65+
6666
Type t=GetTypeByName(ns, cname);
6767

6868
// Trace.Assert(t != null, "Type "+cname+" could not be determined.");
@@ -119,7 +119,7 @@ protected void ProcessChildProperties(XmlNode node, object parent)
119119
{
120120
if (!(child is XmlElement)) continue;
121121
string pname=child.LocalName;
122-
122+
123123
var pi=t.GetProperty(pname);
124124

125125
if (pi==null)

0 commit comments

Comments
 (0)