Skip to content

Commit 414691d

Browse files
committed
Fixed same demo programs
Fixed minimal-release build settings
1 parent fd7f248 commit 414691d

27 files changed

+756
-328
lines changed

.gitignore

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -251,4 +251,5 @@ paket-files/
251251
.idea/
252252
*.sln.iml
253253

254-
/NuGet
254+
/NuGet
255+
/_Output

Demo/Chart/AreaChartDemo.cs

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -17,12 +17,6 @@
1717
****************************************************************************/
1818

1919
using System;
20-
using System.Collections.Generic;
21-
using System.ComponentModel;
22-
using System.Drawing;
23-
using System.Data;
24-
using System.Linq;
25-
using System.Text;
2620
using System.Windows.Forms;
2721
using unvell.ReoGrid.Chart;
2822

@@ -72,6 +66,12 @@ protected override void OnLoad(EventArgs e)
7266
}
7367
};
7468

69+
// Make all serial colors semi-transparent
70+
foreach (var style in chart.DataSerialStyles)
71+
{
72+
style.FillColor = new Graphics.SolidColor(100, style.FillColor.ToSolidColor());
73+
}
74+
7575
worksheet.FloatingObjects.Add(chart);
7676

7777
}

Demo/Chart/BarChartDemo.cs

Lines changed: 4 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -17,15 +17,9 @@
1717
****************************************************************************/
1818

1919
using System;
20-
using System.Collections.Generic;
21-
using System.ComponentModel;
22-
using System.Data;
23-
using System.Linq;
24-
using System.Text;
2520
using System.Windows.Forms;
2621

2722
using unvell.ReoGrid.Chart;
28-
using unvell.ReoGrid.Graphics;
2923

3024
namespace unvell.ReoGrid.Demo.Charts
3125
{
@@ -60,19 +54,20 @@ protected override void OnLoad(EventArgs e)
6054
worksheet.AddHighlightRange(categoryNamesRange);
6155
worksheet.AddHighlightRange(dataRange);
6256

63-
var c1 = new Chart.BarChart
57+
var chart = new Chart.BarChart
6458
{
65-
Location = new Graphics.Point(460, 30),
59+
Location = new Graphics.Point(220, 160),
6660
Size = new Graphics.Size(400, 260),
6761

6862
Title = "Bar Chart Sample",
63+
6964
DataSource = new WorksheetChartDataSource(worksheet, rowTitleRange, dataRange)
7065
{
7166
CategoryNameRange = categoryNamesRange,
7267
},
7368
};
7469

75-
worksheet.FloatingObjects.Add(c1);
70+
worksheet.FloatingObjects.Add(chart);
7671
}
7772

7873
}

Demo/CustomCells/ImageOwnerDrawingDemo.Designer.cs renamed to Demo/CustomCells/ImageCheckboxDemo.Designer.cs

Lines changed: 27 additions & 4 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Demo/CustomCells/ImageOwnerDrawingDemo.cs renamed to Demo/CustomCells/ImageCheckboxDemo.cs

Lines changed: 25 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -16,13 +16,7 @@
1616
*
1717
****************************************************************************/
1818

19-
using System;
20-
using System.Collections.Generic;
21-
using System.ComponentModel;
2219
using System.Drawing;
23-
using System.Data;
24-
using System.Linq;
25-
using System.Text;
2620
using System.Windows.Forms;
2721

2822
using unvell.ReoGrid.CellTypes;
@@ -31,34 +25,42 @@
3125

3226
namespace unvell.ReoGrid.Demo.CustomCells
3327
{
34-
public partial class ImageOwnerDrawingDemo : UserControl
28+
public partial class ImageCheckboxDemo : UserControl
3529
{
36-
public ImageOwnerDrawingDemo()
30+
public ImageCheckboxDemo()
3731
{
3832
InitializeComponent();
39-
}
40-
}
4133

42-
class MyCheckBox : CheckBoxCell
43-
{
44-
Image checkedImage, uncheckedImage;
34+
var worksheet = this.grid.CurrentWorksheet;
4535

46-
public MyCheckBox()
47-
{
48-
checkedImage = Resources.Checked_Checkbox_20;
49-
uncheckedImage = Resources.Unchecked_Checkbox_20;
36+
worksheet["B3"] = new object[,] {
37+
{ new ImageCheckBox(), "Image checkbox"},
38+
};
5039
}
5140

52-
protected override void OnContentPaint(CellDrawingContext dc)
41+
class ImageCheckBox : CheckBoxCell
5342
{
54-
if (this.IsChecked)
43+
Image checkedImage, uncheckedImage;
44+
45+
public ImageCheckBox(bool defaultStatus = false)
5546
{
56-
dc.Graphics.DrawImage(checkedImage, this.ContentBounds);
47+
this.isChecked = defaultStatus;
48+
49+
checkedImage = Resources.Checked_Checkbox_20;
50+
uncheckedImage = Resources.Unchecked_Checkbox_20;
5751
}
58-
else
52+
53+
protected override void OnContentPaint(CellDrawingContext dc)
5954
{
60-
dc.Graphics.DrawImage(uncheckedImage, this.ContentBounds);
55+
if (this.IsChecked)
56+
{
57+
dc.Graphics.DrawImage(checkedImage, this.ContentBounds);
58+
}
59+
else
60+
{
61+
dc.Graphics.DrawImage(uncheckedImage, this.ContentBounds);
62+
}
6163
}
6264
}
6365
}
64-
}
66+
}

Demo/Demo.csproj

Lines changed: 6 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -181,11 +181,11 @@
181181
<Compile Include="CustomCells\AnimationCellDemo.Designer.cs">
182182
<DependentUpon>AnimationCellDemo.cs</DependentUpon>
183183
</Compile>
184-
<Compile Include="CustomCells\ImageOwnerDrawingDemo.cs">
184+
<Compile Include="CustomCells\ImageCheckboxDemo.cs">
185185
<SubType>UserControl</SubType>
186186
</Compile>
187-
<Compile Include="CustomCells\ImageOwnerDrawingDemo.Designer.cs">
188-
<DependentUpon>ImageOwnerDrawingDemo.cs</DependentUpon>
187+
<Compile Include="CustomCells\ImageCheckboxDemo.Designer.cs">
188+
<DependentUpon>ImageCheckboxDemo.cs</DependentUpon>
189189
</Compile>
190190
<Compile Include="CustomCells\NumericProgressDemo.cs">
191191
<SubType>UserControl</SubType>
@@ -553,8 +553,8 @@
553553
<DependentUpon>AnimationCellDemo.cs</DependentUpon>
554554
<SubType>Designer</SubType>
555555
</EmbeddedResource>
556-
<EmbeddedResource Include="CustomCells\ImageOwnerDrawingDemo.resx">
557-
<DependentUpon>ImageOwnerDrawingDemo.cs</DependentUpon>
556+
<EmbeddedResource Include="CustomCells\ImageCheckboxDemo.resx">
557+
<DependentUpon>ImageCheckboxDemo.cs</DependentUpon>
558558
</EmbeddedResource>
559559
<EmbeddedResource Include="CustomCells\NumericProgressDemo.resx">
560560
<DependentUpon>NumericProgressDemo.cs</DependentUpon>
@@ -797,10 +797,7 @@
797797
<Compile Include="Scripts\RunScriptDemo.Designer.cs">
798798
<DependentUpon>RunScriptDemo.cs</DependentUpon>
799799
</Compile>
800-
<None Include="_Templates\Excel\welcome-093.xlsx">
801-
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
802-
</None>
803-
<None Include="_Templates\Excel\welcome-100.xlsx">
800+
<None Include="_Templates\Excel\welcome-200.xlsx">
804801
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
805802
</None>
806803
<None Include="_Templates\RGF\calendar_2008_1.rgf">

Demo/DemoCategory.xml

Lines changed: 15 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@
2020
****************************************************************************/
2121
-->
2222

23-
<Demo BaseSite="http://reogrid.net/" DefaultItem="What's in 1.0">
23+
<Demo BaseSite="http://reogrid.net/" DefaultItem="What's new in 2.0">
2424

2525
<New>
2626
<Item Name="Welcome"></Item>
@@ -34,7 +34,7 @@
3434

3535
<Categories>
3636
<Category Name="Welcome" Expansion="True">
37-
<Item Name="What's in 1.0" Class="Welcome.V100WhatsNew"></Item>
37+
<Item Name="What's new in 2.0" Class="Welcome.V100WhatsNew"></Item>
3838
</Category>
3939

4040
<Category Name="Chart" Expansion="True">
@@ -50,9 +50,18 @@
5050
<Doc-Url>document/chart/bar-chart</Doc-Url>
5151
</Item>
5252

53+
<Item Name="Area Chart" Class="Charts.AreaChartDemo">
54+
<Doc-Url>document/chart/area-chart</Doc-Url>
55+
</Item>
56+
5357
<Item Name="Pie 2D Chart" Class="Charts.Pie2DChartDemo">
5458
<Doc-Url>document/chart/pie-chart-2d</Doc-Url>
5559
</Item>
60+
61+
<Item Name="Doughnut Chart" Class="Charts.DoughnutChartDemo">
62+
<Doc-Url>document/chart/doughnut-chart</Doc-Url>
63+
</Item>
64+
5665
</Category>
5766

5867
<Category Name="Drawing" Expansion="True">
@@ -116,6 +125,10 @@
116125
<Item Name="Animation Cell" Class="CustomCells.AnimationCellDemo">
117126
<Doc-Url>document/custom-cell</Doc-Url>
118127
</Item>
128+
129+
<Item Name="Image Checkbox Cell" Class="CustomCells.ImageCheckboxDemo">
130+
<Doc-Url>document/custom-cell</Doc-Url>
131+
</Item>
119132
</Category>
120133

121134
<Category Name="Features">

Demo/Properties/AssemblyInfo.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -32,5 +32,5 @@
3232
// You can specify all the values or you can default the Build and Revision Numbers
3333
// by using the '*' as shown below:
3434
// [assembly: AssemblyVersion("1.0.*")]
35-
[assembly: AssemblyVersion("1.3.0.0")]
36-
[assembly: AssemblyFileVersion("1.3.0.0")]
35+
[assembly: AssemblyVersion("2.0.0.0")]
36+
[assembly: AssemblyFileVersion("2.0.0.0")]

Demo/Welcome/V100WhatsNew.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ public V100WhatsNew()
3434
InitializeComponent();
3535

3636
// load Excel template file
37-
this.reoGridControl.Load("_Templates\\Excel\\Welcome-100.xlsx");
37+
this.reoGridControl.Load("_Templates\\Excel\\Welcome-200.xlsx");
3838

3939
var sheet1 = this.reoGridControl.Worksheets[0];
4040

-24.1 KB
Binary file not shown.

DemoJP/DemoCategory.xml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515
*
1616
****************************************************************************/
1717
-->
18-
<Demo BaseSite="https://reogrid.net/jp/" DefaultItem="バージョン1.3 新機能">
18+
<Demo BaseSite="https://reogrid.net/jp/" DefaultItem="バージョン2.0 新機能">
1919

2020
<New>
2121
<Item Name="ようこそ"></Item>
@@ -29,7 +29,7 @@
2929

3030
<Categories>
3131
<Category Name="ようこそ" Expansion="True">
32-
<Item Name="バージョン1.3 新機能" Class="Welcome.WhatsNewDemo"></Item>
32+
<Item Name="バージョン2.0 新機能" Class="Welcome.WhatsNewDemo"></Item>
3333
</Category>
3434

3535
<Category Name="グラフ" Expansion="True" Namespace="ChartDemo">

DemoJP/Properties/AssemblyInfo.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -32,5 +32,5 @@
3232
// You can specify all the values or you can default the Build and Revision Numbers
3333
// by using the '*' as shown below:
3434
// [assembly: AssemblyVersion("1.0.*")]
35-
[assembly: AssemblyVersion("1.3.0.0")]
36-
[assembly: AssemblyFileVersion("1.3.0.0")]
35+
[assembly: AssemblyVersion("2.0.0.0")]
36+
[assembly: AssemblyFileVersion("2.0.0.0")]

DemoWPF/Properties/AssemblyInfo.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -51,5 +51,5 @@
5151
// You can specify all the values or you can default the Build and Revision Numbers
5252
// by using the '*' as shown below:
5353
// [assembly: AssemblyVersion("1.0.*")]
54-
[assembly: AssemblyVersion("1.3.0.0")]
55-
[assembly: AssemblyFileVersion("1.3.0.0")]
54+
[assembly: AssemblyVersion("2.0.0.0")]
55+
[assembly: AssemblyFileVersion("2.0.0.0")]

Editor/Properties/AssemblyInfo.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -32,5 +32,5 @@
3232
// You can specify all the values or you can default the Build and Revision Numbers
3333
// by using the '*' as shown below:
3434
// [assembly: AssemblyVersion("1.0.*")]
35-
[assembly: AssemblyVersion("1.3.0.0")]
36-
[assembly: AssemblyFileVersion("1.3.0.0")]
35+
[assembly: AssemblyVersion("2.0.0.0")]
36+
[assembly: AssemblyFileVersion("2.0.0.0")]

Editor/ReoGridEditor.cs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,10 +37,11 @@
3737
using unvell.ReoGrid.IO;
3838
using unvell.ReoGrid.DataFormat;
3939
using unvell.ReoGrid.Graphics;
40-
using unvell.ReoGrid.Print;
4140
using unvell.ReoGrid.Rendering;
4241
using unvell.ReoGrid.Editor.LangRes;
4342

43+
using unvell.ReoGrid.Print;
44+
4445
#if EX_SCRIPT
4546
using unvell.ReoScript.Editor;
4647
#endif // EX_SCRIPT

ReoGrid/Chart/AreaLine.cs

Lines changed: 21 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,23 @@
1-
using System;
2-
using System.Collections.Generic;
3-
using System.Linq;
4-
using System.Text;
1+
/*****************************************************************************
2+
*
3+
* ReoGrid - .NET Spreadsheet Control
4+
*
5+
* http://reogrid.net/
6+
*
7+
* THIS CODE AND INFORMATION IS PROVIDED "AS IS" WITHOUT WARRANTY OF ANY
8+
* KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE
9+
* IMPLIED WARRANTIES OF MERCHANTABILITY AND/OR FITNESS FOR A PARTICULAR
10+
* PURPOSE.
11+
*
12+
* Author: Jing <lujing at unvell.com>
13+
*
14+
* Copyright (c) 2012-2016 Jing <lujing at unvell.com>
15+
* Copyright (c) 2012-2016 unvell.com, all rights reserved.
16+
*
17+
****************************************************************************/
18+
19+
#if DRAWING
520

6-
using unvell.ReoGrid.Graphics;
721
using unvell.ReoGrid.Rendering;
822

923
namespace unvell.ReoGrid.Chart
@@ -154,3 +168,5 @@ protected override void OnPaint(DrawingContext dc)
154168

155169
}
156170
}
171+
172+
#endif // DRAWING

0 commit comments

Comments
 (0)