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

Commit eb4423f

Browse files
PullModelPage
1 parent d4ff35e commit eb4423f

7 files changed

Lines changed: 95 additions & 14 deletions

File tree

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

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -150,6 +150,10 @@
150150
<DependentUpon>BaseSettingsPage.xaml</DependentUpon>
151151
<SubType>Code</SubType>
152152
</Compile>
153+
<Compile Include="src\ReportWizard\Dialog\PullModelPage.xaml.cs">
154+
<DependentUpon>PullModelPage.xaml</DependentUpon>
155+
<SubType>Code</SubType>
156+
</Compile>
153157
<Compile Include="src\ReportWizard\Dialog\PushDataReport.xaml.cs">
154158
<DependentUpon>PushDataReport.xaml</DependentUpon>
155159
<SubType>Code</SubType>
@@ -241,6 +245,7 @@
241245
</ItemGroup>
242246
<ItemGroup>
243247
<Page Include="src\ReportWizard\Dialog\BaseSettingsPage.xaml" />
248+
<Page Include="src\ReportWizard\Dialog\PullModelPage.xaml" />
244249
<Page Include="src\ReportWizard\Dialog\PushDataReport.xaml" />
245250
<Page Include="src\ReportWizard\Dialog\ReportWizard.xaml" />
246251
<Page Include="src\ReportWizard\Dialog\WelcomePage.xaml" />

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

Lines changed: 25 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,6 @@ public WizardPageType ReportPageType {
4747

4848

4949
void UpdateContext(){
50-
Console.WriteLine("Legal at bbbb {0}",_Legal.IsChecked);
5150
context.DataModel = (PushPullModel) _DataModel.SelectedItem;
5251
context.ReportType = (ReportType) _ReportType.SelectedItem;
5352
context.ReportName = this._ReportName.Text;
@@ -57,17 +56,33 @@ void UpdateContext(){
5756
}
5857

5958

60-
void _DataModel_SelectionChanged(object sender, System.Windows.Controls.SelectionChangedEventArgs e){
59+
void _DataModel_SelectionChanged(object sender, SelectionChangedEventArgs e){
6160
var cbo = (ComboBox) sender;
6261

63-
if (((PushPullModel)cbo.SelectedItem) == PushPullModel.FormSheet) {
64-
this.CanFinish = true;
65-
this.CanSelectNextPage = false;
66-
this._ReportType.SelectedItem = ReportType.FormSheet;
67-
} else {
68-
this._ReportType.SelectedItem = ReportType.DataReport;
69-
this.CanFinish = false;
70-
this.CanSelectNextPage = true;
62+
var pushPullModel = (PushPullModel)cbo.SelectedItem;
63+
64+
switch (pushPullModel) {
65+
case PushPullModel.PushData: {
66+
this._ReportType.SelectedItem = ReportType.DataReport;
67+
this.CanFinish = false;
68+
this.CanSelectNextPage = true;
69+
NextPage = new PushDataReport();
70+
NextPage.PreviousPage = this;
71+
break;
72+
}
73+
74+
case PushPullModel.PullData: {
75+
CanSelectNextPage = true;
76+
NextPage = new PullModelPage();
77+
NextPage.PreviousPage = this;
78+
break;
79+
}
80+
81+
case PushPullModel.FormSheet: {
82+
this.CanFinish = true;
83+
this._ReportType.SelectedItem = ReportType.FormSheet;
84+
break;
85+
}
7186
}
7287
}
7388
}
Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
<xctk:WizardPage x:Class="ICSharpCode.Reporting.Addin.ReportWizard.Dialog.PullModelPage"
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+
xmlns:sdr="clr-namespace:ICSharpCode.Reporting.Globals;assembly=ICSharpCode.Reporting"
7+
CanSelectPreviousPage="true"
8+
CanSelectNextPage="false"
9+
CanCancel="true"
10+
CanFinish="false"
11+
PageType="Interior"
12+
>
13+
<Grid>
14+
<TextBlock Text="Pull Model not available at the moment" FontSize="16"
15+
HorizontalAlignment="Center" VerticalAlignment="Center"></TextBlock>
16+
</Grid>
17+
</xctk:WizardPage>
Lines changed: 44 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,44 @@
1+
/*
2+
* Created by SharpDevelop.
3+
* User: Peter Forstmeier
4+
* Date: 16.08.2014
5+
* Time: 16:43
6+
*
7+
* To change this template use Tools | Options | Coding | Edit Standard Headers.
8+
*/
9+
using System;
10+
using System.Collections.Generic;
11+
using System.Text;
12+
using System.Windows;
13+
using System.Windows.Controls;
14+
using System.Windows.Data;
15+
using System.Windows.Documents;
16+
using System.Windows.Input;
17+
using System.Windows.Media;
18+
using Xceed.Wpf.Toolkit;
19+
20+
namespace ICSharpCode.Reporting.Addin.ReportWizard.Dialog
21+
{
22+
/// <summary>
23+
/// Interaction logic for PullModelPage.xaml
24+
/// </summary>
25+
public partial class PullModelPage : WizardPage,IHasContext
26+
{
27+
public PullModelPage()
28+
{
29+
InitializeComponent();
30+
}
31+
32+
33+
#region IHasContext implementation
34+
public ICSharpCode.Reporting.Addin.ReportWizard.ViewModels.IWizardContext Context {
35+
get {
36+
throw new NotImplementedException();
37+
}
38+
}
39+
public WizardPageType ReportPageType {
40+
get { return WizardPageType.PullModelPage;}
41+
}
42+
#endregion
43+
}
44+
}

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

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,13 +3,12 @@
33
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
44
xmlns:xctk="http://schemas.xceed.com/wpf/xaml/toolkit"
55
xmlns:System="clr-namespace:System;assembly=mscorlib"
6-
76
xmlns:sdr="clr-namespace:ICSharpCode.Reporting.Globals;assembly=ICSharpCode.Reporting"
87
Name="PushData"
98
Title="SharpDevelop Reporting"
109
Description="Welcome to Sharpdevelop Reporting Wizard"
1110
PageType="Interior"
12-
CanFinish="true"
11+
CanFinish="true"
1312
CancelButtonVisibility="Visible">
1413

1514
<Grid ShowGridLines="True">

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616

1717
<local:BaseSettingsPage></local:BaseSettingsPage>
1818

19-
<local:PushDataReport></local:PushDataReport>
19+
<!-- <local:PushDataReport></local:PushDataReport>-->
2020

2121
<!--<xctk:WizardPage PageType="Interior"
2222
Title="dritte Seite"

src/AddIns/Misc/Reporting/ICSharpCode.Reporting.Addin/src/ReportWizard/WizardPageType.cs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@ namespace ICSharpCode.Reporting.Addin.ReportWizard
1515
/// </summary>
1616
public enum WizardPageType {
1717
BaseSettingsPage,
18-
PushModelPage
18+
PushModelPage,
19+
PullModelPage
1920
}
2021
}

0 commit comments

Comments
 (0)