Skip to content

Commit eb478db

Browse files
committed
Added some ReadMe Markdown files
1 parent dd6b89b commit eb478db

File tree

8 files changed

+176
-97
lines changed

8 files changed

+176
-97
lines changed

FabTools/FabOutlookBar_ReadMe.md

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
# FabOutlookBar
2+
3+
If you are moving a VO application that needs the FabOutlookBar support, the process is the following :
4+
5+
1. Export your VO Application with the XSharp XPorter application
6+
2. Copy to your Visual Studio Solution the needed Projects, and in the References add the projects
7+
- FabOutlookBar
8+
- FabSplitShellLib
9+
10+
You can test the port of the libs using :
11+
- FabSplitShellTest : The "original" VO Application, that use VO controls

FabTools/FabPaintLib_Control/XSControl.prg

Lines changed: 95 additions & 95 deletions
Original file line numberDiff line numberDiff line change
@@ -6,99 +6,99 @@
66

77
BEGIN NAMESPACE FabPaintLib.Control
88

9-
//Implicit CLIPPER Calling convention : Off
10-
11-
class FabPaintLib_Control inherit System.Windows.Forms.ScrollableControl
12-
// Fields
13-
Private oImg as FabPaintLib
14-
private r8Zoom as real8
15-
16-
// Methods
17-
constructor()
18-
super()
19-
//
20-
self:r8Zoom := 1
21-
self:SetStyle((System.Windows.Forms.ControlStyles.DoubleBuffer | (System.Windows.Forms.ControlStyles.AllPaintingInWmPaint | (System.Windows.Forms.ControlStyles.ResizeRedraw | System.Windows.Forms.ControlStyles.UserPaint))), true)
22-
self:AutoScroll := true
23-
24-
ACCESS Image AS FabPaintLib
25-
//r Give access to the FabPaintLib object linked to the control
26-
RETURN self:oImg
27-
28-
ASSIGN Image( oNewImg AS FabPaintLib )
29-
//p Set a new FabPaintLib object to be linked to the control
30-
IF ( oNewImg != NULL_OBJECT )
31-
//
32-
IF ( oNewImg:IsValid )
33-
IF ( SELF:oImg != NULL_OBJECT )
34-
SELF:oImg:Destroy()
35-
ENDIF
36-
//
37-
SELF:oImg := oNewImg
38-
Self:UpdateZoom()
39-
SELF:Invalidate()
40-
ENDIF
41-
ENDIF
42-
RETURN
43-
44-
45-
// Drawing the Image
46-
protected virtual method OnPaint(e as System.Windows.Forms.PaintEventArgs) as void
47-
local matrix as System.Drawing.Drawing2D.Matrix
48-
local tmpRect as System.Drawing.Rectangle
49-
Local img as System.Drawing.Image
50-
//
51-
if ((self:oImg == null) .OR. ( Self:oImg:IsValid != True ) )
52-
//
53-
Super:OnPaintBackground(e)
54-
else
55-
// Retrieve the underlying System.Drawing.Bitmap object
56-
img := Self:oImg:Image
57-
//
58-
matrix := Matrix{ (single)self:r8Zoom, 0, 0, (single)self:r8Zoom, 0, 0}
59-
matrix:Translate( (single)((real8)self:AutoScrollPosition:X / self:r8Zoom), (single)((real8)self:AutoScrollPosition:Y / self:r8Zoom))
60-
e:Graphics:Transform := matrix
61-
e:Graphics:InterpolationMode := System.Drawing.Drawing2D.InterpolationMode.High
62-
tmpRect := Rectangle{0, 0, img:Width, img:Height}
63-
e:Graphics:DrawImage(img, tmpRect, 0, 0, img:Width, img:Height, System.Drawing.GraphicsUnit.Pixel)
64-
//
65-
Super:OnPaint(e)
66-
endif
67-
68-
protected virtual method OnPaintBackground( e as System.Windows.Forms.PaintEventArgs) as void
69-
return
70-
71-
72-
73-
access Zoom as real8
74-
//
75-
return self:r8Zoom
76-
77-
assign Zoom(value as real8)
78-
//
79-
if (IIF(((value < 0) .or. (value < 1.0e-5)),1,0) != 0)
80-
//
81-
value := 1.0E-5
82-
endif
83-
self:r8Zoom := value
84-
self:UpdateZoom()
85-
self:Invalidate()
86-
87-
88-
private method UpdateZoom() as void
89-
local tmpSize as System.Drawing.Size
90-
Local img as Image
91-
//
92-
if ((self:oImg == null) .OR. ( Self:oImg:IsValid != True ) )
93-
//
94-
self:AutoScrollMargin := self:Size
95-
else
96-
img := Self:oImg:Image
97-
//
98-
tmpSize := Size{(Long)System.Math.Round((real8)((img:Width * self:r8Zoom) + 0.5) ) , (Long)System.Math.Round((real8)((img:Height * self:r8Zoom) + 0.5) ) }
99-
self:AutoScrollMinSize := tmpSize
100-
endif
101-
102-
end class
103-
9+
//Implicit CLIPPER Calling convention : Off
10+
11+
class FabPaintLib_Control inherit System.Windows.Forms.ScrollableControl
12+
// Fields
13+
Private oImg as FabPaintLib
14+
private r8Zoom as real8
15+
16+
// Methods
17+
constructor()
18+
super()
19+
//
20+
self:r8Zoom := 1
21+
self:SetStyle((System.Windows.Forms.ControlStyles.DoubleBuffer | (System.Windows.Forms.ControlStyles.AllPaintingInWmPaint | (System.Windows.Forms.ControlStyles.ResizeRedraw | System.Windows.Forms.ControlStyles.UserPaint))), true)
22+
self:AutoScroll := true
23+
24+
ACCESS Image AS FabPaintLib
25+
//r Give access to the FabPaintLib object linked to the control
26+
RETURN self:oImg
27+
28+
ASSIGN Image( oNewImg AS FabPaintLib )
29+
//p Set a new FabPaintLib object to be linked to the control
30+
IF ( oNewImg != NULL_OBJECT )
31+
//
32+
IF ( oNewImg:IsValid )
33+
IF ( SELF:oImg != NULL_OBJECT )
34+
SELF:oImg:Destroy()
35+
ENDIF
36+
//
37+
SELF:oImg := oNewImg
38+
Self:UpdateZoom()
39+
SELF:Invalidate()
40+
ENDIF
41+
ENDIF
42+
RETURN
43+
44+
45+
// Drawing the Image
46+
protected virtual method OnPaint(e as System.Windows.Forms.PaintEventArgs) as void
47+
local matrix as System.Drawing.Drawing2D.Matrix
48+
local tmpRect as System.Drawing.Rectangle
49+
Local img as System.Drawing.Image
50+
//
51+
if ((self:oImg == null) .OR. ( Self:oImg:IsValid != True ) )
52+
//
53+
Super:OnPaintBackground(e)
54+
else
55+
// Retrieve the underlying System.Drawing.Bitmap object
56+
img := Self:oImg:Image
57+
//
58+
matrix := Matrix{ (single)self:r8Zoom, 0, 0, (single)self:r8Zoom, 0, 0}
59+
matrix:Translate( (single)((real8)self:AutoScrollPosition:X / self:r8Zoom), (single)((real8)self:AutoScrollPosition:Y / self:r8Zoom))
60+
e:Graphics:Transform := matrix
61+
e:Graphics:InterpolationMode := System.Drawing.Drawing2D.InterpolationMode.High
62+
tmpRect := Rectangle{0, 0, img:Width, img:Height}
63+
e:Graphics:DrawImage(img, tmpRect, 0, 0, img:Width, img:Height, System.Drawing.GraphicsUnit.Pixel)
64+
//
65+
Super:OnPaint(e)
66+
endif
67+
68+
protected virtual method OnPaintBackground( e as System.Windows.Forms.PaintEventArgs) as void
69+
return
70+
71+
72+
73+
access Zoom as real8
74+
//
75+
return self:r8Zoom
76+
77+
assign Zoom(value as real8)
78+
//
79+
if (IIF(((value < 0) .or. (value < 1.0e-5)),1,0) != 0)
80+
//
81+
value := 1.0E-5
82+
endif
83+
self:r8Zoom := value
84+
self:UpdateZoom()
85+
self:Invalidate()
86+
87+
88+
private method UpdateZoom() as void
89+
local tmpSize as System.Drawing.Size
90+
Local img as Image
91+
//
92+
if ((self:oImg == null) .OR. ( Self:oImg:IsValid != True ) )
93+
//
94+
self:AutoScrollMargin := self:Size
95+
else
96+
img := Self:oImg:Image
97+
//
98+
tmpSize := Size{(Long)System.Math.Round((real8)((img:Width * self:r8Zoom) + 0.5) ) , (Long)System.Math.Round((real8)((img:Height * self:r8Zoom) + 0.5) ) }
99+
self:AutoScrollMinSize := tmpSize
100+
endif
101+
102+
end class
103+
104104
END NAMESPACE

FabTools/FabPaintLib_ReadMe.md

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
# FabPaintLib
2+
3+
If you are moving a VO application that needs the FabPaintLib support, the process is the following :
4+
5+
1. Export your VO Application with the XSharp XPorter application
6+
2. Copy to your Visual Studio Solution the needed Projects, and in the References add the projects
7+
- FabPaintLib (at least)
8+
- FabPaintLib_Control, if you are using the control to show images
9+
3. Copy the FreeImage files in the Exe folder
10+
( Theses files are in the FreeImage folder, in the FabPaintLib project folder)
11+
- FreeImage.dll
12+
- FreeImageNET.dll
13+
14+
15+
You can test the port of the libs using :
16+
- FabPaintLib_Test : The "original" VO Application, that use VO controls
17+
- XSPaintLib_Test : The "new" XSharp Application, that use Windows Forms controls

FabTools/FabTools.sln

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,9 @@ Project("{AA6C8D78-22FF-423A-9C7C-5F2393824E04}") = "FabTwain", "FabTwain\FabTwa
1717
EndProject
1818
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Solution Items", "Solution Items", "{1B0EB998-92E0-4B69-9497-6B3A8F82AA33}"
1919
ProjectSection(SolutionItems) = preProject
20+
FabOutlookBar_ReadMe.md = FabOutlookBar_ReadMe.md
21+
FabPaintLib_ReadMe.md = FabPaintLib_ReadMe.md
22+
FabTwain_ReadMe.md = FabTwain_ReadMe.md
2023
..\README.md = ..\README.md
2124
EndProjectSection
2225
EndProject

FabTools/FabTwain_ReadMe.md

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
# FabTwain
2+
3+
If you are moving a VO application that needs the FabTwain support, the process is the following :
4+
5+
1. Export your VO Application with the XSharp XPorter application
6+
2. Copy to your Visual Studio Solution the needed Projects, and in the References add the projects
7+
- FabTwain (at Least)
8+
- If using the Preview features
9+
- FabPaintLib
10+
- FabPaintLib_Control
11+
1. Copy the FreeImage files in the Exe folder
12+
( Theses files are in the FreeImage folder, in the FabPaintLib project folder)
13+
- FreeImage.dll
14+
- FreeImageNET.dll
15+
16+
17+
You can test the port of the libs using :
18+
- FabTwainTest : The "original" VO Application, that use VO controls

FabTools/FabZip.sln

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,11 @@ Project("{AA6C8D78-22FF-423A-9C7C-5F2393824E04}") = "NewZipApp", "NewZipApp\NewZ
1717
EndProject
1818
Project("{AA6C8D78-22FF-423A-9C7C-5F2393824E04}") = "FabZipVo", "FabZipVo\FabZipVo.xsproj", "{4DD08A41-2945-4DDD-9821-4BF8A301FA9B}"
1919
EndProject
20+
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Solution Items", "Solution Items", "{8F785A8B-2454-4FD2-9BEA-0CD5B568235A}"
21+
ProjectSection(SolutionItems) = preProject
22+
FabZip_ReadMe.md = FabZip_ReadMe.md
23+
EndProjectSection
24+
EndProject
2025
Global
2126
GlobalSection(SolutionConfigurationPlatforms) = preSolution
2227
Debug|Any CPU = Debug|Any CPU

FabTools/FabZip_ReadMe.md

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
# FabZip
2+
3+
The "new" FabZip library for XSharp has changed the underlying Zip Library.
4+
I'm no more using the DelZip library, but a .NET one that is called DotNetZip : https://github.com/haf/DotNetZip.Semverd
5+
6+
You can either use the DLL reference, or as the FabZip project, use the NuGet package found at : https://www.nuget.org/packages/DotNetZip
7+
8+
If you are moving a VO application that needs the FabZip support, the process is the following :
9+
10+
1. Export your VO Application with the XSharp XPorter application
11+
2. Copy to your Visual Studio Solution the needed Projects, and in the References add the projects
12+
- FabZip (at Least)
13+
- FabTools
14+
- If using VO Controls to get the Zip Events
15+
- FabZipVo
16+
-
17+
18+
19+
You can test the port of the libs using :
20+
- Fab_Zip_1_52j_Test : The "original" VO Application, that use VO controls
21+
- FabZip_Test : A Windows Forms Test Application
22+
- NewZipApp : A Windows Forms Test Application

README.md

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,10 @@ Port to X# of most of FabTools Libraries
33

44
- [x] FabOutlookBar
55
- [x] FabSplitShellLib
6-
- [ ] FabTools - WIP
6+
- [ ] FabTools - Work In Progress but mostly done
77
- [x] FabTwain
88
- [x] FabPaintLib
9-
- [ ] FabZip - WIP
9+
- [x] FabZip
10+
11+
12+
You will find some xxx_ReadMe.md files for each lib with some explanations.

0 commit comments

Comments
 (0)