Browse Source

GoPrevious,Goback

pull/505/merge
Peter Forstmeier 11 years ago
parent
commit
d1a18587d8
  1. 1
      src/AddIns/Misc/Reporting/ICSharpCode.Reporting.Addin/src/ReportWizard/Dialog/BaseSettingsPage.xaml
  2. 9
      src/AddIns/Misc/Reporting/ICSharpCode.Reporting.Addin/src/ReportWizard/Dialog/BaseSettingsPage.xaml.cs
  3. 4
      src/AddIns/Misc/Reporting/ICSharpCode.Reporting.Addin/src/ReportWizard/Dialog/PullModelPage.xaml
  4. 1
      src/AddIns/Misc/Reporting/ICSharpCode.Reporting.Addin/src/ReportWizard/Dialog/PullModelPage.xaml.cs
  5. 8
      src/AddIns/Misc/Reporting/ICSharpCode.Reporting.Addin/src/ReportWizard/Dialog/PushDataReport.xaml
  6. 30
      src/AddIns/Misc/Reporting/ICSharpCode.Reporting.Addin/src/ReportWizard/Dialog/ReportWizard.xaml
  7. 36
      src/AddIns/Misc/Reporting/ICSharpCode.Reporting.Addin/src/ReportWizard/Dialog/ReportWizard.xaml.cs
  8. 3
      src/AddIns/Misc/Reporting/ICSharpCode.Reporting.Addin/src/ReportWizard/Dialog/WelcomePage.xaml

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

@ -4,7 +4,6 @@
xmlns:xctk="http://schemas.xceed.com/wpf/xaml/toolkit" xmlns:xctk="http://schemas.xceed.com/wpf/xaml/toolkit"
xmlns:System="clr-namespace:System;assembly=mscorlib" xmlns:System="clr-namespace:System;assembly=mscorlib"
xmlns:sdr="clr-namespace:ICSharpCode.Reporting.Globals;assembly=ICSharpCode.Reporting" xmlns:sdr="clr-namespace:ICSharpCode.Reporting.Globals;assembly=ICSharpCode.Reporting"
Name="Base"
Title="Base Settings" Title="Base Settings"
Description="Basic Settings and Layout" Description="Basic Settings and Layout"
PageType="Interior" PageType="Interior"

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

@ -25,8 +25,6 @@ namespace ICSharpCode.Reporting.Addin.ReportWizard.Dialog{
public BaseSettingsPage() public BaseSettingsPage()
{ {
InitializeComponent(); InitializeComponent();
_DataModel.SelectedItem = PushPullModel.FormSheet;
_DataModel.SelectedItem = PushPullModel.FormSheet; _DataModel.SelectedItem = PushPullModel.FormSheet;
_ReportType.SelectedItem = ReportType.FormSheet; _ReportType.SelectedItem = ReportType.FormSheet;
_image.Source = WizardHelper.GetWizardIcon(); _image.Source = WizardHelper.GetWizardIcon();
@ -66,24 +64,23 @@ namespace ICSharpCode.Reporting.Addin.ReportWizard.Dialog{
this._ReportType.SelectedItem = ReportType.DataReport; this._ReportType.SelectedItem = ReportType.DataReport;
this.CanFinish = false; this.CanFinish = false;
this.CanSelectNextPage = true; this.CanSelectNextPage = true;
NextPage = new PushDataReport();
NextPage.PreviousPage = this;
break; break;
} }
case PushPullModel.PullData: { case PushPullModel.PullData: {
CanSelectNextPage = true; CanSelectNextPage = true;
NextPage = new PullModelPage(); this.CanFinish = false;
NextPage.PreviousPage = this;
break; break;
} }
case PushPullModel.FormSheet: { case PushPullModel.FormSheet: {
this.CanFinish = true; this.CanFinish = true;
CanSelectNextPage = false;
this._ReportType.SelectedItem = ReportType.FormSheet; this._ReportType.SelectedItem = ReportType.FormSheet;
break; break;
} }
} }
} }
} }
} }

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

@ -4,12 +4,12 @@
xmlns:xctk="http://schemas.xceed.com/wpf/xaml/toolkit" xmlns:xctk="http://schemas.xceed.com/wpf/xaml/toolkit"
xmlns:System="clr-namespace:System;assembly=mscorlib" xmlns:System="clr-namespace:System;assembly=mscorlib"
xmlns:sdr="clr-namespace:ICSharpCode.Reporting.Globals;assembly=ICSharpCode.Reporting" xmlns:sdr="clr-namespace:ICSharpCode.Reporting.Globals;assembly=ICSharpCode.Reporting"
Description="Create PullData Report"
CanSelectPreviousPage="true" CanSelectPreviousPage="true"
CanSelectNextPage="false" CanSelectNextPage="false"
CanCancel="true" CanCancel="true"
CanFinish="false" CanFinish="false"
PageType="Interior" PageType="Interior">
>
<Grid> <Grid>
<TextBlock Text="Pull Model not available at the moment" FontSize="16" <TextBlock Text="Pull Model not available at the moment" FontSize="16"
HorizontalAlignment="Center" VerticalAlignment="Center"></TextBlock> HorizontalAlignment="Center" VerticalAlignment="Center"></TextBlock>

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

@ -39,6 +39,7 @@ namespace ICSharpCode.Reporting.Addin.ReportWizard.Dialog
public WizardPageType ReportPageType { public WizardPageType ReportPageType {
get { return WizardPageType.PullModelPage;} get { return WizardPageType.PullModelPage;}
} }
#endregion #endregion
} }
} }

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

@ -6,12 +6,14 @@
xmlns:sdr="clr-namespace:ICSharpCode.Reporting.Globals;assembly=ICSharpCode.Reporting" xmlns:sdr="clr-namespace:ICSharpCode.Reporting.Globals;assembly=ICSharpCode.Reporting"
Name="PushData" Name="PushData"
Title="SharpDevelop Reporting" Title="SharpDevelop Reporting"
Description="Welcome to Sharpdevelop Reporting Wizard" Description="Create Columns for a PusData Report"
PageType="Interior" PageType="Interior"
CanFinish="true" CanFinish="true"
CancelButtonVisibility="Visible"> CancelButtonVisibility="Visible"
CanSelectPreviousPage="true"
CanSelectNextPage="false">
<Grid ShowGridLines="True"> <Grid >
<Grid.RowDefinitions> <Grid.RowDefinitions>
<RowDefinition Height="30"></RowDefinition> <RowDefinition Height="30"></RowDefinition>
<RowDefinition Height="200"></RowDefinition> <RowDefinition Height="200"></RowDefinition>

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

@ -10,13 +10,17 @@
NextButtonVisibility="Visible" NextButtonVisibility="Visible"
CancelButtonVisibility="Visible" CancelButtonVisibility="Visible"
Finish="_wizard_Finish" Finish="_wizard_Finish"
CanHelp="False"> CanHelp="False"
PageChanged="_wizard_PageChanged"
Next="_wizard_Next">
<local:WelcomePage ></local:WelcomePage> <local:WelcomePage ></local:WelcomePage>
<local:BaseSettingsPage></local:BaseSettingsPage> <local:BaseSettingsPage x:Name="BaseSettings"></local:BaseSettingsPage>
<!-- <local:PushDataReport></local:PushDataReport>--> <local:PushDataReport PreviousPage="{Binding ElementName=BaseSettings}"></local:PushDataReport>
<local:PullModelPage PreviousPage="{Binding ElementName=BaseSettings}"></local:PullModelPage>
<!--<xctk:WizardPage PageType="Interior" <!--<xctk:WizardPage PageType="Interior"
Title="dritte Seite" Title="dritte Seite"
@ -24,26 +28,6 @@
CanCancel="true" CanCancel="true"
CanFinish="True" CanFinish="True"
/>--> />-->
<!--
<xctk:WizardPage PageType="Exterior" Title="Welcome to Reporting Wizard"
Description="This Wizard will walk you though how to do something.">
<Image Name="_image"></Image>
</xctk:WizardPage>-->
<!-- ! <local:BaseSettingsPage ></local:BaseSettingsPage> -->
<!-- <xctk:WizardPage PageType="Interior"
Title="Page 2"
Description="This is the second page in the process" />
<xctk:WizardPage PageType="Interior"
Title="Last Page"
Description="This is the last page in the process"
CanFinish="True" />-->
</xctk:Wizard> </xctk:Wizard>
</Window> </Window>

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

@ -12,6 +12,7 @@ using System.Drawing.Imaging;
using System.IO; using System.IO;
using System.Windows; using System.Windows;
using System.Windows.Media.Imaging; using System.Windows.Media.Imaging;
using ICSharpCode.Reporting.Globals;
using ICSharpCode.SharpDevelop; using ICSharpCode.SharpDevelop;
using Xceed.Wpf.Toolkit; using Xceed.Wpf.Toolkit;
using ICSharpCode.Reporting.Addin.ReportWizard.Dialog; using ICSharpCode.Reporting.Addin.ReportWizard.Dialog;
@ -46,7 +47,6 @@ namespace ICSharpCode.Reporting.Addin.ReportWizard.Dialog
void UpdateContext(IHasContext hc) void UpdateContext(IHasContext hc)
{ {
switch (hc.ReportPageType) { switch (hc.ReportPageType) {
case WizardPageType.BaseSettingsPage:{ case WizardPageType.BaseSettingsPage:{
context.PageOneContext = hc.Context; context.PageOneContext = hc.Context;
@ -59,5 +59,39 @@ namespace ICSharpCode.Reporting.Addin.ReportWizard.Dialog
} }
} }
} }
void _wizard_Next(object sender, Xceed.Wpf.Toolkit.Core.CancelRoutedEventArgs e)
{
var current = this._wizard.CurrentPage;
if (current.Name.Equals("BaseSettings")) {
var hasContext = current as IHasContext;
if (hasContext != null) {
var pushPullModel = ((PageOneContext)hasContext.Context).DataModel;
switch (pushPullModel) {
case PushPullModel.PushData: {
current.NextPage = (WizardPage)_wizard.Items[2];
break;
}
case PushPullModel.PullData: {
current.NextPage = (WizardPage)_wizard.Items[3];
break;
}
case PushPullModel.FormSheet: {
break;
}
}
}
}
Console.WriteLine("CurrentPage {0}",current.Name);
}
void _wizard_PageChanged(object sender, RoutedEventArgs e)
{
var x = _wizard.CurrentPage;
}
} }
} }

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

@ -13,6 +13,9 @@
CancelButtonVisibility="Visible"> CancelButtonVisibility="Visible">
<Grid> <Grid>
<Border BorderThickness="3" Margin="10,10,10,10">
<Image Name="_image" Margin="0,8,0,0" ></Image> <Image Name="_image" Margin="0,8,0,0" ></Image>
</Border>
</Grid> </Grid>
</xctk:WizardPage> </xctk:WizardPage>
Loading…
Cancel
Save