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

Commit a1fd70e

Browse files
PushDataWizard
1 parent 2f519da commit a1fd70e

9 files changed

Lines changed: 172 additions & 34 deletions

File tree

src/AddIns/Misc/Reporting/ICSharpCode.Reporting.Addin/ICSharpCode.Reporting.Addin.csproj

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -150,14 +150,23 @@
150150
<DependentUpon>BaseSettingsPage.xaml</DependentUpon>
151151
<SubType>Code</SubType>
152152
</Compile>
153+
<Compile Include="src\ReportWizard\Dialog\PushDataReport.xaml.cs">
154+
<DependentUpon>PushDataReport.xaml</DependentUpon>
155+
<SubType>Code</SubType>
156+
</Compile>
153157
<Compile Include="src\ReportWizard\Dialog\ReportWizard.xaml.cs">
154158
<DependentUpon>ReportWizard.xaml</DependentUpon>
155159
<SubType>Code</SubType>
156160
</Compile>
161+
<Compile Include="src\ReportWizard\Dialog\WelcomePage.xaml.cs">
162+
<DependentUpon>WelcomePage.xaml</DependentUpon>
163+
<SubType>Code</SubType>
164+
</Compile>
157165
<Compile Include="src\ReportWizard\ReportGenerator.cs" />
158166
<Compile Include="src\ReportWizard\ReportWizardCommand.cs" />
159167
<Compile Include="src\ReportWizard\ViewModels\PageOneContext.cs" />
160168
<Compile Include="src\ReportWizard\ViewModels\ReportWizardContext.cs" />
169+
<Compile Include="src\ReportWizard\WizardHelper.cs" />
161170
<Compile Include="src\Services\DefaultMemberRelationshipService.cs" />
162171
<Compile Include="src\Services\DesignerSerializationService.cs" />
163172
<Compile Include="src\Services\MenuCommandService.cs" />
@@ -230,7 +239,9 @@
230239
</ItemGroup>
231240
<ItemGroup>
232241
<Page Include="src\ReportWizard\Dialog\BaseSettingsPage.xaml" />
242+
<Page Include="src\ReportWizard\Dialog\PushDataReport.xaml" />
233243
<Page Include="src\ReportWizard\Dialog\ReportWizard.xaml" />
244+
<Page Include="src\ReportWizard\Dialog\WelcomePage.xaml" />
234245
</ItemGroup>
235246
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
236247
</Project>

src/AddIns/Misc/Reporting/ICSharpCode.Reporting.Addin/src/ReportWizard/Dialog/BaseSettingsPage.xaml

Lines changed: 24 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -4,11 +4,17 @@
44
xmlns:xctk="http://schemas.xceed.com/wpf/xaml/toolkit"
55
xmlns:System="clr-namespace:System;assembly=mscorlib"
66
xmlns:sdr="clr-namespace:ICSharpCode.Reporting.Globals;assembly=ICSharpCode.Reporting"
7-
7+
Name="Base"
88
Title="Base Settings"
99
Description="Basic Settings and Layout"
10+
PageType="Interior"
1011
Background="LightGray"
11-
CanFinish="true">
12+
CanFinish="true"
13+
CanSelectNextPage="false">
14+
15+
<xctk:WizardPage.ExteriorPanelContent >
16+
<Image Name="_image" Stretch="Fill"></Image>
17+
</xctk:WizardPage.ExteriorPanelContent>
1218

1319
<xctk:WizardPage.Resources>
1420
<ObjectDataProvider x:Key="pushpullEnum" MethodName="GetValues"
@@ -26,7 +32,7 @@
2632
</ObjectDataProvider>
2733
</xctk:WizardPage.Resources>
2834

29-
<Grid >
35+
<Grid ShowGridLines="True" >
3036
<Grid.RowDefinitions>
3137
<RowDefinition Height="Auto"> </RowDefinition>
3238
<RowDefinition Height="Auto"></RowDefinition>
@@ -40,34 +46,37 @@
4046
<RowDefinition Height="Auto"></RowDefinition>
4147
</Grid.RowDefinitions>
4248
<Grid.ColumnDefinitions>
43-
<ColumnDefinition></ColumnDefinition>
49+
<ColumnDefinition MinWidth="80"></ColumnDefinition>
4450
<ColumnDefinition></ColumnDefinition>
4551
<ColumnDefinition></ColumnDefinition>
4652
<ColumnDefinition></ColumnDefinition>
4753
</Grid.ColumnDefinitions>
4854

49-
<Label Content="DataModel :"></Label>
55+
<Label Content="DataModel :" Grid.Column="1"></Label>
5056
<ComboBox Name="_DataModel" Margin="10,5,0,5"
51-
Grid.Column="1"
57+
Grid.Column="2"
58+
SelectionChanged="_DataModel_SelectionChanged"
5259
ItemsSource="{Binding Source={StaticResource pushpullEnum}}">
5360
</ComboBox>
5461

55-
<Label Content="ReportType :" Margin="0,5,0,5" Grid.Row="2"></Label>
62+
<Label Content="ReportType :" Margin="0,5,0,5" Grid.Column="1" Grid.Row="2"></Label>
5663
<ComboBox Name="_ReportType" Margin="10,5,0,5"
57-
Grid.Row="2" Grid.Column="1"
64+
Grid.Row="2" Grid.Column="2"
5865
ItemsSource="{Binding Source={StaticResource reportTypeEnum}}">
5966
</ComboBox>
6067

6168

62-
<Label Content="Report Name :" Margin="0,5,0,5" Grid.Row="4"></Label>
63-
<TextBox Name="_ReportName" Margin="10,5,0,5" Grid.Row="4" Grid.Column="1" Grid.ColumnSpan="3"></TextBox>
69+
<Label Content="Report Name :" Margin="0,5,0,5" Grid.Column="1" Grid.Row="4"></Label>
70+
<TextBox Name="_ReportName" Margin="10,5,0,5" Grid.Row="4" Grid.Column="2" Grid.ColumnSpan="3"></TextBox>
6471

65-
<Label Content="Filename :" Margin="0,5,0,5" Grid.Row="5"></Label>
66-
<TextBox Name="_Filename" Margin="10,5,0,5" Grid.Row="5" Grid.Column="1" Grid.ColumnSpan="3"></TextBox>
72+
<Label Content="Filename :" Margin="0,5,0,5" Grid.Column="1" Grid.Row="5"></Label>
73+
<TextBox Name="_Filename" Margin="10,5,0,5" Grid.Row="5" Grid.Column="2" Grid.ColumnSpan="3"></TextBox>
6774

68-
<Label Content="Page Layout :" Grid.Row="6" Margin="0,5,0,5"></Label>
69-
<RadioButton Name="_Legal" GroupName="PageLayout" Content="Legal" IsChecked="true" Grid.Row="7" Margin="0,5,0,5" ></RadioButton>
70-
<RadioButton Name="_Landscape" GroupName="PageLayout" Content="Landscape" Grid.Row="7" Grid.Column="1" Margin="0,5,0,5"></RadioButton>
75+
76+
<Label Content="Page Layout :" Grid.Column="1" Grid.Row="6" Margin="0,5,0,5"></Label>
77+
<RadioButton Name="_Legal" GroupName="PageLayout" Content="Legal" IsChecked="true" Grid.Column="1" Grid.Row="7" Margin="0,5,0,5" ></RadioButton>
78+
<RadioButton Name="_Landscape" GroupName="PageLayout" Content="Landscape" Grid.Row="7" Grid.Column="2" Margin="0,5,0,5"></RadioButton>
79+
7180
</Grid>
7281

7382
</xctk:WizardPage>

src/AddIns/Misc/Reporting/ICSharpCode.Reporting.Addin/src/ReportWizard/Dialog/BaseSettingsPage.xaml.cs

Lines changed: 26 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,14 @@
77
* To change this template use Tools | Options | Coding | Edit Standard Headers.
88
*/
99
using System;
10+
using System.Drawing;
11+
using System.Drawing.Imaging;
12+
using System.IO;
1013
using System.Windows;
14+
using System.Windows.Controls;
15+
using System.Windows.Media.Imaging;
1116
using ICSharpCode.Reporting.Globals;
17+
using ICSharpCode.SharpDevelop;
1218
using Xceed.Wpf.Toolkit;
1319
using ICSharpCode.Reporting.Addin.ReportWizard.ViewModels;
1420

@@ -26,9 +32,11 @@ public BaseSettingsPage()
2632
InitializeComponent();
2733
_DataModel.SelectedItem = PushPullModel.FormSheet;
2834
_ReportType.SelectedItem = ReportType.FormSheet;
29-
this.context = new PageOneContext();
35+
this.context = new PageOneContext();
36+
this._DataModel.SelectedItem = PushPullModel.FormSheet;
37+
_image.Source = WizardHelper.GetWizardIcon();
3038
}
31-
39+
3240

3341
public IWizardContext Context {
3442
get{
@@ -41,16 +49,29 @@ public int PageNumber {
4149
}
4250

4351

44-
void UpdateContext()
45-
{
52+
void UpdateContext(){
4653

4754
context.DataModel = (PushPullModel) _DataModel.SelectedItem;
4855
context.ReportType = (ReportType) _ReportType.SelectedItem;
4956
context.ReportName = this._ReportName.Text;
5057
context.FileName = this._Filename.Text;
5158
context.Legal = _Legal.IsChecked == true;
52-
;
5359
context.Landscape = _Landscape.IsChecked == true;
5460
}
61+
62+
63+
void _DataModel_SelectionChanged(object sender, System.Windows.Controls.SelectionChangedEventArgs e){
64+
var cbo = (ComboBox) sender;
65+
66+
if (((PushPullModel)cbo.SelectedItem) == PushPullModel.FormSheet) {
67+
this.CanFinish = true;
68+
this.CanSelectNextPage = false;
69+
this._ReportType.SelectedItem = ReportType.FormSheet;
70+
} else {
71+
this._ReportType.SelectedItem = ReportType.DataReport;
72+
this.CanFinish = false;
73+
this.CanSelectNextPage = true;
74+
}
75+
}
5576
}
5677
}
Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
<xctk:WizardPage x:Class="ICSharpCode.Reporting.Addin.ReportWizard.Dialog.PushDataReport"
2+
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
3+
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
4+
xmlns:xctk="http://schemas.xceed.com/wpf/xaml/toolkit"
5+
xmlns:System="clr-namespace:System;assembly=mscorlib"
6+
7+
xmlns:sdr="clr-namespace:ICSharpCode.Reporting.Globals;assembly=ICSharpCode.Reporting"
8+
Name="PushData"
9+
Title="SharpDevelop Reporting"
10+
Description="Welcome to Sharpdevelop Reporting Wizard"
11+
PageType="Interior"
12+
NextButtonVisibility="Visible"
13+
CancelButtonVisibility="Visible">
14+
15+
<Grid ShowGridLines="True">
16+
<Grid.RowDefinitions>
17+
<RowDefinition Height="30"></RowDefinition>
18+
<RowDefinition Height="200"></RowDefinition>
19+
</Grid.RowDefinitions>
20+
21+
<DataGrid Name="_DataGrid"
22+
ItemsSource="{Binding}"
23+
CanUserAddRows="True"
24+
CanUserDeleteRows="True"
25+
26+
AutoGenerateColumns="False" Grid.Row="1" Margin="30,10,30,5">
27+
<DataGrid.Columns>
28+
<DataGridTextColumn Header="ColumnName" Binding="{Binding ColumnName}" Width="150"></DataGridTextColumn>
29+
<DataGridTextColumn Header="DataType" Binding="{Binding DataTypeName}" Width="150"></DataGridTextColumn>
30+
</DataGrid.Columns>
31+
</DataGrid>
32+
</Grid>
33+
</xctk:WizardPage>

src/AddIns/Misc/Reporting/ICSharpCode.Reporting.Addin/src/ReportWizard/Dialog/ReportWizard.xaml

Lines changed: 24 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -4,25 +4,41 @@
44
xmlns:xctk="http://schemas.xceed.com/wpf/xaml/toolkit"
55
xmlns:local="clr-namespace:ICSharpCode.Reporting.Addin.ReportWizard.Dialog"
66
Title="{Binding Title}"
7-
Height="600" Width="600">
7+
Height="600" Width="800">
88

99
<xctk:Wizard x:Name="_wizard" FinishButtonClosesWindow="True"
1010
Next="_wizard_Next"
11+
NextButtonVisibility="Visible"
12+
CancelButtonVisibility="Visible"
1113
PageChanged="_wizard_PageChanged"
1214
Finish="_wizard_Finish"
1315
CanHelp="False">
16+
<local:WelcomePage></local:WelcomePage>
1417

18+
<local:BaseSettingsPage></local:BaseSettingsPage>
19+
20+
<local:PushDataReport></local:PushDataReport>
21+
22+
<!--<xctk:WizardPage PageType="Interior"
23+
Title="dritte Seite"
24+
Description="this Page will guide you to creating an DataDriven Report"
25+
CanCancel="true"
26+
CanFinish="True"
27+
/>-->
28+
29+
30+
<!--
1531
<xctk:WizardPage PageType="Exterior" Title="Welcome to Reporting Wizard"
16-
Description="This Wizard will walk you though how to do something." />
32+
Description="This Wizard will walk you though how to do something.">
1733
18-
<!-- ! <local:BaseSettingsPage ></local:BaseSettingsPage> -->
34+
<Image Name="_image"></Image>
35+
</xctk:WizardPage>-->
1936

37+
<!-- ! <local:BaseSettingsPage ></local:BaseSettingsPage> -->
2038

21-
<xctk:WizardPage PageType="Interior"
22-
Title="Page 1"
23-
Description="This is the first page in the process."
24-
CanFinish="True" />
25-
<!-- <xctk:WizardPage PageType="Interior"
39+
40+
41+
<!-- <xctk:WizardPage PageType="Interior"
2642
Title="Page 2"
2743
Description="This is the second page in the process" />
2844
<xctk:WizardPage PageType="Interior"

src/AddIns/Misc/Reporting/ICSharpCode.Reporting.Addin/src/ReportWizard/Dialog/ReportWizard.xaml.cs

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,12 @@
77
* To change this template use Tools | Options | Coding | Edit Standard Headers.
88
*/
99
using System;
10+
using System.Drawing;
11+
using System.Drawing.Imaging;
12+
using System.IO;
1013
using System.Windows;
14+
using System.Windows.Media.Imaging;
15+
using ICSharpCode.SharpDevelop;
1116
using Xceed.Wpf.Toolkit;
1217
using ICSharpCode.Reporting.Addin.ReportWizard.ViewModels;
1318
using System.Linq;
@@ -27,25 +32,25 @@ public ReportWizard(ReportWizardContext context)
2732
InitializeComponent();
2833
this.context = context;
2934
baseSettingsPage = new BaseSettingsPage();
30-
_wizard.Items.Insert(1,baseSettingsPage);
3135
}
3236

3337

3438
void _wizard_Next(object sender, Xceed.Wpf.Toolkit.Core.CancelRoutedEventArgs e)
3539
{
40+
Console.WriteLine(" _wizard_Next {0}",((Wizard)sender).CurrentPage.Name);
3641
}
3742

3843

3944
void _wizard_PageChanged(object sender, RoutedEventArgs e)
4045
{
41-
46+
Console.WriteLine("_wizard_PageChanged {0}",((Wizard)sender).CurrentPage.Name);
4247
}
4348

4449
void _wizard_Finish(object sender, RoutedEventArgs e)
4550
{
4651
context.PageOneContext = baseSettingsPage.Context;
4752

4853
}
49-
54+
5055
}
5156
}
Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
<xctk:WizardPage x:Class="ICSharpCode.Reporting.Addin.ReportWizard.Dialog.WelcomePage"
2+
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
3+
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
4+
xmlns:xctk="http://schemas.xceed.com/wpf/xaml/toolkit"
5+
xmlns:System="clr-namespace:System;assembly=mscorlib"
6+
7+
xmlns:sdr="clr-namespace:ICSharpCode.Reporting.Globals;assembly=ICSharpCode.Reporting"
8+
Name="Welcome"
9+
Title="SharpDevelop Reporting"
10+
Description="Welcome to Sharpdevelop Reporting Wizard"
11+
PageType="Interior"
12+
NextButtonVisibility="Visible"
13+
CancelButtonVisibility="Visible">
14+
15+
<Grid>
16+
<Image Name="_image" Margin="0,8,0,0" ></Image>
17+
</Grid>
18+
</xctk:WizardPage>
Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
/*
2+
* Created by SharpDevelop.
3+
* User: Peter Forstmeier
4+
* Date: 05.08.2014
5+
* Time: 20:08
6+
*
7+
* To change this template use Tools | Options | Coding | Edit Standard Headers.
8+
*/
9+
using System;
10+
using System.Windows.Media;
11+
using ICSharpCode.SharpDevelop;
12+
13+
namespace ICSharpCode.Reporting.Addin.ReportWizard
14+
{
15+
/// <summary>
16+
/// Description of WizardHelper.
17+
/// </summary>
18+
class WizardHelper
19+
{
20+
21+
public static ImageSource GetWizardIcon () {
22+
return IconService.GetImageSource("GeneralWizardBackground");
23+
}
24+
}
25+
}

src/AddIns/Misc/Reporting/ICSharpCode.Reporting/Src/BaseClasses/AbstractColumn.cs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -26,8 +26,8 @@ namespace ICSharpCode.Reporting.BaseClasses
2626
/// </summary>
2727
public class AbstractColumn
2828
{
29-
private Type dataType;
30-
private string dataTypeName;
29+
Type dataType;
30+
string dataTypeName;
3131

3232
public AbstractColumn() {
3333
this.dataType = typeof(System.String);
@@ -53,7 +53,7 @@ public string DataTypeName {
5353
}
5454
}
5555

56-
[XmlIgnoreAttribute]
56+
// [XmlIgnoreAttribute]
5757
public Type DataType {
5858
get {
5959
return dataType;

0 commit comments

Comments
 (0)