Skip to content

Commit cf533a8

Browse files
author
SlavaRa
committed
Merge branch 'development' of https://github.com/fdorg/flashdevelop into feature/refactoring_move
2 parents 10b86b1 + ec698d9 commit cf533a8

File tree

648 files changed

+15634
-5006
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

648 files changed

+15634
-5006
lines changed

.gitignore

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,3 +22,5 @@ PluginCore/Bin
2222
/FlashDevelop/Bin/Debug/Settings/FileStates
2323
/FlashDevelop/Bin/Debug/Settings/Recovery
2424
/FlashDevelop/Bin/Debug/Exceptions.log
25+
/FlashDevelop/Bin/Debug/Tools/fdbuild/fdbuild.exe
26+
FlashDevelop/Bin/Debug/Settings/Themes/CURRENT

CI/buildl.cmd

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,11 @@
22

33
:: Set paths
44
set PATH=%PATH%;C:\Windows\Microsoft.NET\Framework\v4.0.30319\
5+
set PATH=%PATH%;C:\Program Files\Git\bin\
56
set PATH=%PATH%;C:\Program Files (x86)\Git\bin\
6-
set PATH=%PATH%;C:\Program Files (x86)\NSIS
77
set PATH=%PATH%;C:\Program Files\7-Zip\
8+
set PATH=%PATH%;C:\Program Files (x86)\7-Zip\
9+
set PATH=%PATH%;C:\Program Files (x86)\NSIS
810

911
:: Need path up
1012
cd ..

CONTRIBUTING.md

Lines changed: 208 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,208 @@
1+
# AppMan entries
2+
3+
If you want to add your plugin, theme or extension to AppMan, you need to do a pull request to the appman.xml file adding a new entry inside the FD5 comments. Requirements for the offered plugins, themes or extensions are:
4+
5+
* Code needs to be opensource and reviewable in a public repository
6+
* The item needs to be packaged into a FDZ file and provide a MD5 checksum for verification
7+
* The FDZ needs to extract the files to the user app data directory
8+
9+
# Coding style
10+
11+
##### Use spaces instead of tabs with a width of 4
12+
13+
```c#
14+
public bool IsMember()
15+
{
16+
if (this.value > 2)
17+
{
18+
return false;
19+
}
20+
else return true;
21+
}
22+
```
23+
24+
##### Naming should be in English and clear
25+
26+
```c#
27+
private int memberProperty = 0;
28+
```
29+
30+
##### Use camelCase for private members and uppercase for public properties, methods and types:
31+
32+
```c#
33+
private int memberProperty = 0;
34+
35+
public string MemberName = "MemberName";
36+
37+
public bool IsMember()
38+
{
39+
return true;
40+
}
41+
```
42+
43+
##### Use types without explicit path:
44+
45+
```c#
46+
private void OnFormActivate(object sender, /*System.*/EventArgs e)
47+
{
48+
// Do something...
49+
}
50+
```
51+
52+
##### Do not use extensive extra empty lines and keep the code clean, not like:
53+
54+
```c#
55+
// Comment...
56+
private int MemberMethod(int value)
57+
{
58+
59+
60+
61+
// Comment for something...
62+
63+
64+
if (value > 2))
65+
{
66+
67+
//this.oldCode = 0;
68+
69+
70+
// Random notes here
71+
72+
73+
74+
return -1;
75+
}
76+
77+
78+
79+
// Something here too...
80+
else return value;
81+
82+
83+
84+
85+
//Little bit here too...
86+
}
87+
```
88+
89+
##### Use brackets and parenthesis for easier readability:
90+
91+
```c#
92+
if ((val1 > val2) && (val1 > val3))
93+
{
94+
if (val2 > val3)
95+
{
96+
doThing();
97+
}
98+
}
99+
```
100+
101+
##### Do not nest expressions without brackets:
102+
103+
```c#
104+
if (val1 > val2 && val1 > val3)
105+
106+
if (val2 > val3)
107+
108+
doThing();
109+
110+
```
111+
112+
##### Use can use one liners to shorten the code:
113+
114+
```c#
115+
if (val1 > val2 && val1 > val3)
116+
{
117+
if (val2 > val3) doThing();
118+
}
119+
```
120+
121+
##### Use explicit types:
122+
123+
```c#
124+
int myValue = 0;
125+
Point[] myPoints = new Point[]
126+
{
127+
new Point(1, 1),
128+
new Point(2, 2)
129+
}
130+
```
131+
132+
##### Code example:
133+
134+
```c#
135+
import System;
136+
137+
namespace MyNameSpace
138+
{
139+
class MyClass
140+
{
141+
// Comment here...
142+
private int memberProperty = 0;
143+
private int memberProperty2 = 1;
144+
private int memberProperty3 = 2;
145+
146+
// Comment here...
147+
public string MemberName = "MemberName";
148+
149+
// Comment here...
150+
public static bool IsMemberProperty = false;
151+
152+
// Comment here...
153+
public const int CONSTANT = 1;
154+
155+
/// <summary>
156+
/// Comment here...
157+
/// </summary>
158+
public bool IsMember()
159+
{
160+
return true;
161+
}
162+
163+
/// <summary>
164+
/// Comment here...
165+
/// </summary>
166+
public void MemberMethod(int value)
167+
{
168+
int temp = CONSTANT;
169+
if (value > 2)
170+
{
171+
this.memberProperty2 = temp;
172+
this.memberProperty3 = temp;
173+
}
174+
else this.memberProperty3 = value;
175+
}
176+
177+
/// <summary>
178+
/// Comment here...
179+
/// </summary>
180+
private int MemberMethodEx(int value)
181+
{
182+
int temp = CONSTANT;
183+
this.memberProperty3 = temp;
184+
switch (value)
185+
{
186+
case 1: return 1;
187+
case 2:
188+
{
189+
return -1;
190+
}
191+
default: return value;
192+
}
193+
}
194+
195+
/// <summary>
196+
/// Comment here...
197+
/// </summary>
198+
private void OnFormActivate(object sender, EventArgs e)
199+
{
200+
this.MemberMethod(null, null);
201+
}
202+
203+
}
204+
205+
}
206+
```
207+
208+
##### More generally, be consistent and keep the code clean!

External/3rdParty/Aga-1.7/Aga.Controls/Tree/Input/ReorderColumnState.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ public ReorderColumnState(TreeViewAdv tree, TreeColumn column, Point initialMous
4141
{
4242
_location = new Point(initialMouseLocation.X + Tree.OffsetX, 0);
4343
_dragOffset = tree.GetColumnX(column) - initialMouseLocation.X;
44-
_ghostImage = column.CreateGhostImage(new Rectangle(0, 0, column.Width, tree.ActualColumnHeaderHeight), tree.Font);
44+
_ghostImage = column.CreateGhostImage(new Rectangle(0, 0, column.Width, tree.ActualColumnHeaderHeight), tree.Font, tree.ForeColor);
4545
}
4646

4747
public override void KeyDown(KeyEventArgs args)

External/3rdParty/Aga-1.7/Aga.Controls/Tree/TreeColumn.cs

Lines changed: 19 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -288,23 +288,22 @@ private static void CreateRenderers()
288288
}
289289
}
290290

291-
internal Bitmap CreateGhostImage(Rectangle bounds, Font font)
291+
internal Bitmap CreateGhostImage(Rectangle bounds, Font font, Color color)
292292
{
293293
Bitmap b = new Bitmap(bounds.Width, bounds.Height, PixelFormat.Format32bppArgb);
294294
Graphics gr = Graphics.FromImage(b);
295295
gr.FillRectangle(SystemBrushes.ControlDark, bounds);
296-
DrawContent(gr, bounds, font);
296+
DrawContent(gr, bounds, font, color);
297297
BitmapHelper.SetAlphaChanelValue(b, 150);
298298
return b;
299299
}
300300

301-
internal void Draw(Graphics gr, Rectangle bounds, Font font, bool pressed, bool hot)
301+
internal void Draw(Graphics gr, Rectangle bounds, Font font, bool pressed, bool hot, Color color)
302302
{
303-
DrawBackground(gr, bounds, pressed, hot);
304-
DrawContent(gr, bounds, font);
303+
DrawContent(gr, bounds, font, color);
305304
}
306305

307-
private void DrawContent(Graphics gr, Rectangle bounds, Font font)
306+
private void DrawContent(Graphics gr, Rectangle bounds, Font font, Color color)
308307
{
309308
Rectangle innerBounds = new Rectangle(bounds.X + HeaderLeftMargin, bounds.Y,
310309
bounds.Width - HeaderLeftMargin - HeaderRightMargin,
@@ -331,9 +330,9 @@ private void DrawContent(Graphics gr, Rectangle bounds, Font font)
331330
}
332331

333332
if (textSize.Width < maxTextSize.Width)
334-
TextRenderer.DrawText(gr, Header, font, innerBounds, SystemColors.ControlText, _baseHeaderFlags | TextFormatFlags.Left);
333+
TextRenderer.DrawText(gr, Header, font, innerBounds, color, _baseHeaderFlags | TextFormatFlags.Left);
335334
else
336-
TextRenderer.DrawText(gr, Header, font, innerBounds, SystemColors.ControlText, _headerFlags);
335+
TextRenderer.DrawText(gr, Header, font, innerBounds, color, _headerFlags);
337336
}
338337

339338
private void DrawSortMark(Graphics gr, Rectangle bounds, int x)
@@ -391,11 +390,20 @@ internal static void DrawBackground(Graphics gr, Rectangle bounds, bool pressed,
391390
}
392391
}
393392

394-
#endregion
393+
internal static void DrawCustomBackground(Graphics gr, Color back, Color fore, Rectangle bounds, bool pressed, bool hot)
394+
{
395+
gr.FillRectangle(new SolidBrush(back), bounds);
396+
Pen p1 = new Pen(fore);
397+
gr.DrawLine(p1, bounds.X, bounds.Y - 1, bounds.Right, bounds.Y - 1);
398+
gr.DrawLine(p1, bounds.Right - 1, bounds.Y + 3, bounds.Right - 1, bounds.Bottom - 4);
399+
gr.DrawLine(p1, bounds.X, bounds.Bottom, bounds.Right, bounds.Bottom);
400+
}
401+
402+
#endregion
395403

396-
#region Events
404+
#region Events
397405

398-
public event EventHandler HeaderChanged;
406+
public event EventHandler HeaderChanged;
399407
private void OnHeaderChanged()
400408
{
401409
if (HeaderChanged != null)

External/3rdParty/Aga-1.7/Aga.Controls/Tree/TreeViewAdv.Draw.cs

Lines changed: 22 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,8 @@ public void AutoSizeColumn(TreeColumn column)
4040
private void CreatePens()
4141
{
4242
CreateLinePen();
43-
CreateMarkPen();
43+
CreateMarkPen();
44+
CreateLine2Pen();
4445
}
4546

4647
private void CreateMarkPen()
@@ -61,6 +62,11 @@ private void CreateLinePen()
6162
_linePen.DashStyle = DashStyle.Dot;
6263
}
6364

65+
private void CreateLine2Pen()
66+
{
67+
_line2Pen = new Pen(_lineColor);
68+
}
69+
6470
protected override void OnPaintBackground(PaintEventArgs pevent)
6571
{
6672
if (this.BackgroundPaintMode == Tree.BackgroundPaintMode.Gradiant)
@@ -90,7 +96,7 @@ protected override void OnPaint(PaintEventArgs e)
9096

9197
if (UseColumns)
9298
{
93-
DrawColumnHeaders(e.Graphics);
99+
DrawColumnHeaders(e.Graphics, this.ColumnHeaderBackColor, this.ColumnHeaderBorderColor, this.ColumnHeaderTextColor);
94100
y += ActualColumnHeaderHeight;
95101
if (Columns.Count == 0 || e.ClipRectangle.Height + e.ClipRectangle.Top <= y)
96102
return;
@@ -169,7 +175,7 @@ private void DrawRow(PaintEventArgs e, ref DrawContext context, int row, Rectang
169175
}
170176

171177
if ((GridLineStyle & GridLineStyle.Horizontal) == GridLineStyle.Horizontal)
172-
e.Graphics.DrawLine(SystemPens.InactiveBorder, 0, rowRect.Bottom, e.Graphics.ClipBounds.Right, rowRect.Bottom);
178+
e.Graphics.DrawLine(_line2Pen, 0, rowRect.Bottom, e.Graphics.ClipBounds.Right, rowRect.Bottom);
173179

174180
if (ShowLines)
175181
DrawLines(e.Graphics, node, rowRect);
@@ -185,18 +191,21 @@ private void DrawVerticalGridLines(Graphics gr, int y)
185191
if (c.IsVisible)
186192
{
187193
x += c.Width;
188-
gr.DrawLine(SystemPens.InactiveBorder, x - 1, y, x - 1, gr.ClipBounds.Bottom);
194+
gr.DrawLine(_line2Pen, x - 1, y, x - 1, gr.ClipBounds.Bottom);
189195
}
190196
}
191197
}
192198

193-
private void DrawColumnHeaders(Graphics gr)
199+
private void DrawColumnHeaders(Graphics gr, Color back, Color fore, Color text)
194200
{
195201
PerformanceAnalyzer.Start("DrawColumnHeaders");
196202
ReorderColumnState reorder = Input as ReorderColumnState;
197203
int x = 0;
198-
TreeColumn.DrawBackground(gr, new Rectangle(0, 0, ClientRectangle.Width + 2, ActualColumnHeaderHeight - 1), false, false);
199-
gr.TranslateTransform(-OffsetX, 0);
204+
205+
if (this.CustomDrawHeaders) TreeColumn.DrawCustomBackground(gr, back, fore, new Rectangle(0, 0, ClientRectangle.Width + 2, ActualColumnHeaderHeight - 1), false, false);
206+
else TreeColumn.DrawBackground(gr, new Rectangle(0, 0, ClientRectangle.Width + 2, ActualColumnHeaderHeight - 1), false, false);
207+
208+
gr.TranslateTransform(-OffsetX, 0);
200209
foreach (TreeColumn c in Columns)
201210
{
202211
if (c.IsVisible)
@@ -206,7 +215,12 @@ private void DrawColumnHeaders(Graphics gr)
206215
Rectangle rect = new Rectangle(x, 0, c.Width, ActualColumnHeaderHeight - 1);
207216
gr.SetClip(rect);
208217
bool pressed = ((Input is ClickColumnState || reorder != null) && ((Input as ColumnState).Column == c));
209-
c.Draw(gr, rect, Font, pressed, _hotColumn == c);
218+
219+
if (this.CustomDrawHeaders) TreeColumn.DrawCustomBackground(gr, back, fore, rect, pressed, _hotColumn == c);
220+
else TreeColumn.DrawBackground(gr, rect, pressed, _hotColumn == c);
221+
222+
c.Draw(gr, rect, Font, pressed, _hotColumn == c, text);
223+
210224
gr.ResetClip();
211225

212226
if (reorder != null && reorder.DropColumn == c)

0 commit comments

Comments
 (0)