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

Commit d1a1858

Browse files
GoPrevious,Goback
1 parent eb4423f commit d1a1858

8 files changed

Lines changed: 66 additions & 46 deletions

File tree

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

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,6 @@
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-
Name="Base"
87
Title="Base Settings"
98
Description="Basic Settings and Layout"
109
PageType="Interior"

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

Lines changed: 5 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -25,8 +25,6 @@ public partial class BaseSettingsPage : WizardPage,IHasContext
2525
public BaseSettingsPage()
2626
{
2727
InitializeComponent();
28-
29-
_DataModel.SelectedItem = PushPullModel.FormSheet;
3028
_DataModel.SelectedItem = PushPullModel.FormSheet;
3129
_ReportType.SelectedItem = ReportType.FormSheet;
3230
_image.Source = WizardHelper.GetWizardIcon();
@@ -60,30 +58,29 @@ void _DataModel_SelectionChanged(object sender, SelectionChangedEventArgs e){
6058
var cbo = (ComboBox) sender;
6159

6260
var pushPullModel = (PushPullModel)cbo.SelectedItem;
63-
61+
6462
switch (pushPullModel) {
6563
case PushPullModel.PushData: {
6664
this._ReportType.SelectedItem = ReportType.DataReport;
6765
this.CanFinish = false;
68-
this.CanSelectNextPage = true;
69-
NextPage = new PushDataReport();
70-
NextPage.PreviousPage = this;
66+
this.CanSelectNextPage = true;
7167
break;
7268
}
7369

7470
case PushPullModel.PullData: {
7571
CanSelectNextPage = true;
76-
NextPage = new PullModelPage();
77-
NextPage.PreviousPage = this;
72+
this.CanFinish = false;
7873
break;
7974
}
8075

8176
case PushPullModel.FormSheet: {
8277
this.CanFinish = true;
78+
CanSelectNextPage = false;
8379
this._ReportType.SelectedItem = ReportType.FormSheet;
8480
break;
8581
}
8682
}
83+
8784
}
8885
}
8986
}

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

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -4,14 +4,14 @@
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-
CanSelectPreviousPage="true"
7+
Description="Create PullData Report"
8+
CanSelectPreviousPage="true"
89
CanSelectNextPage="false"
910
CanCancel="true"
10-
CanFinish="false"
11-
PageType="Interior"
12-
>
11+
CanFinish="false"
12+
PageType="Interior">
1313
<Grid>
14-
<TextBlock Text="Pull Model not available at the moment" FontSize="16"
15-
HorizontalAlignment="Center" VerticalAlignment="Center"></TextBlock>
14+
<TextBlock Text="Pull Model not available at the moment" FontSize="16"
15+
HorizontalAlignment="Center" VerticalAlignment="Center"></TextBlock>
1616
</Grid>
1717
</xctk:WizardPage>

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

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,7 @@ public ICSharpCode.Reporting.Addin.ReportWizard.ViewModels.IWizardContext Contex
3939
public WizardPageType ReportPageType {
4040
get { return WizardPageType.PullModelPage;}
4141
}
42+
4243
#endregion
4344
}
4445
}

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

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -6,17 +6,19 @@
66
xmlns:sdr="clr-namespace:ICSharpCode.Reporting.Globals;assembly=ICSharpCode.Reporting"
77
Name="PushData"
88
Title="SharpDevelop Reporting"
9-
Description="Welcome to Sharpdevelop Reporting Wizard"
9+
Description="Create Columns for a PusData Report"
1010
PageType="Interior"
11-
CanFinish="true"
12-
CancelButtonVisibility="Visible">
11+
CanFinish="true"
12+
CancelButtonVisibility="Visible"
13+
CanSelectPreviousPage="true"
14+
CanSelectNextPage="false">
1315

14-
<Grid ShowGridLines="True">
16+
<Grid >
1517
<Grid.RowDefinitions>
1618
<RowDefinition Height="30"></RowDefinition>
1719
<RowDefinition Height="200"></RowDefinition>
1820
</Grid.RowDefinitions>
19-
21+
2022
<DataGrid Name="_DataGrid"
2123
ItemsSource="{Binding}"
2224
CanUserAddRows="True"

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

Lines changed: 8 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -10,40 +10,24 @@
1010
NextButtonVisibility="Visible"
1111
CancelButtonVisibility="Visible"
1212
Finish="_wizard_Finish"
13-
CanHelp="False">
13+
CanHelp="False"
14+
PageChanged="_wizard_PageChanged"
15+
Next="_wizard_Next">
1416

15-
<local:WelcomePage></local:WelcomePage>
17+
<local:WelcomePage ></local:WelcomePage>
1618

17-
<local:BaseSettingsPage></local:BaseSettingsPage>
19+
<local:BaseSettingsPage x:Name="BaseSettings"></local:BaseSettingsPage>
1820

19-
<!-- <local:PushDataReport></local:PushDataReport>-->
21+
<local:PushDataReport PreviousPage="{Binding ElementName=BaseSettings}"></local:PushDataReport>
22+
23+
<local:PullModelPage PreviousPage="{Binding ElementName=BaseSettings}"></local:PullModelPage>
2024

2125
<!--<xctk:WizardPage PageType="Interior"
2226
Title="dritte Seite"
2327
Description="this Page will guide you to creating an DataDriven Report"
2428
CanCancel="true"
2529
CanFinish="True"
2630
/>-->
27-
28-
29-
<!--
30-
<xctk:WizardPage PageType="Exterior" Title="Welcome to Reporting Wizard"
31-
Description="This Wizard will walk you though how to do something.">
32-
33-
<Image Name="_image"></Image>
34-
</xctk:WizardPage>-->
35-
36-
<!-- ! <local:BaseSettingsPage ></local:BaseSettingsPage> -->
37-
38-
39-
40-
<!-- <xctk:WizardPage PageType="Interior"
41-
Title="Page 2"
42-
Description="This is the second page in the process" />
43-
<xctk:WizardPage PageType="Interior"
44-
Title="Last Page"
45-
Description="This is the last page in the process"
46-
CanFinish="True" />-->
4731
</xctk:Wizard>
4832

4933
</Window>

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

Lines changed: 35 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@
1212
using System.IO;
1313
using System.Windows;
1414
using System.Windows.Media.Imaging;
15+
using ICSharpCode.Reporting.Globals;
1516
using ICSharpCode.SharpDevelop;
1617
using Xceed.Wpf.Toolkit;
1718
using ICSharpCode.Reporting.Addin.ReportWizard.Dialog;
@@ -46,7 +47,6 @@ void _wizard_Finish(object sender, RoutedEventArgs e)
4647

4748
void UpdateContext(IHasContext hc)
4849
{
49-
5050
switch (hc.ReportPageType) {
5151
case WizardPageType.BaseSettingsPage:{
5252
context.PageOneContext = hc.Context;
@@ -59,5 +59,39 @@ void UpdateContext(IHasContext hc)
5959
}
6060
}
6161
}
62+
63+
64+
void _wizard_Next(object sender, Xceed.Wpf.Toolkit.Core.CancelRoutedEventArgs e)
65+
{
66+
var current = this._wizard.CurrentPage;
67+
if (current.Name.Equals("BaseSettings")) {
68+
var hasContext = current as IHasContext;
69+
if (hasContext != null) {
70+
var pushPullModel = ((PageOneContext)hasContext.Context).DataModel;
71+
switch (pushPullModel) {
72+
case PushPullModel.PushData: {
73+
current.NextPage = (WizardPage)_wizard.Items[2];
74+
break;
75+
}
76+
77+
case PushPullModel.PullData: {
78+
current.NextPage = (WizardPage)_wizard.Items[3];
79+
break;
80+
}
81+
82+
case PushPullModel.FormSheet: {
83+
break;
84+
}
85+
}
86+
}
87+
}
88+
89+
Console.WriteLine("CurrentPage {0}",current.Name);
90+
91+
}
92+
void _wizard_PageChanged(object sender, RoutedEventArgs e)
93+
{
94+
var x = _wizard.CurrentPage;
95+
}
6296
}
6397
}

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

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,9 @@
1313
CancelButtonVisibility="Visible">
1414

1515
<Grid>
16-
<Image Name="_image" Margin="0,8,0,0" ></Image>
16+
<Border BorderThickness="3" Margin="10,10,10,10">
17+
<Image Name="_image" Margin="0,8,0,0" ></Image>
18+
</Border>
19+
1720
</Grid>
1821
</xctk:WizardPage>

0 commit comments

Comments
 (0)