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. 12
      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. 10
      src/AddIns/Misc/Reporting/ICSharpCode.Reporting.Addin/src/ReportWizard/Dialog/PushDataReport.xaml
  6. 32
      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. 5
      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 @@ @@ -4,7 +4,6 @@
xmlns:xctk="http://schemas.xceed.com/wpf/xaml/toolkit"
xmlns:System="clr-namespace:System;assembly=mscorlib"
xmlns:sdr="clr-namespace:ICSharpCode.Reporting.Globals;assembly=ICSharpCode.Reporting"
Name="Base"
Title="Base Settings"
Description="Basic Settings and Layout"
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{ @@ -25,8 +25,6 @@ namespace ICSharpCode.Reporting.Addin.ReportWizard.Dialog{
public BaseSettingsPage()
{
InitializeComponent();
_DataModel.SelectedItem = PushPullModel.FormSheet;
_DataModel.SelectedItem = PushPullModel.FormSheet;
_ReportType.SelectedItem = ReportType.FormSheet;
_image.Source = WizardHelper.GetWizardIcon();
@ -66,24 +64,23 @@ namespace ICSharpCode.Reporting.Addin.ReportWizard.Dialog{ @@ -66,24 +64,23 @@ namespace ICSharpCode.Reporting.Addin.ReportWizard.Dialog{
this._ReportType.SelectedItem = ReportType.DataReport;
this.CanFinish = false;
this.CanSelectNextPage = true;
NextPage = new PushDataReport();
NextPage.PreviousPage = this;
break;
}
case PushPullModel.PullData: {
CanSelectNextPage = true;
NextPage = new PullModelPage();
NextPage.PreviousPage = this;
this.CanFinish = false;
break;
}
case PushPullModel.FormSheet: {
this.CanFinish = true;
CanSelectNextPage = false;
this._ReportType.SelectedItem = ReportType.FormSheet;
break;
}
}
}
}
}

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

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

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

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

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

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

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

@ -10,13 +10,17 @@ @@ -10,13 +10,17 @@
NextButtonVisibility="Visible"
CancelButtonVisibility="Visible"
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"
Title="dritte Seite"
@ -24,26 +28,6 @@ @@ -24,26 +28,6 @@
CanCancel="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>
</Window>

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

@ -12,6 +12,7 @@ using System.Drawing.Imaging; @@ -12,6 +12,7 @@ using System.Drawing.Imaging;
using System.IO;
using System.Windows;
using System.Windows.Media.Imaging;
using ICSharpCode.Reporting.Globals;
using ICSharpCode.SharpDevelop;
using Xceed.Wpf.Toolkit;
using ICSharpCode.Reporting.Addin.ReportWizard.Dialog;
@ -46,7 +47,6 @@ namespace ICSharpCode.Reporting.Addin.ReportWizard.Dialog @@ -46,7 +47,6 @@ namespace ICSharpCode.Reporting.Addin.ReportWizard.Dialog
void UpdateContext(IHasContext hc)
{
switch (hc.ReportPageType) {
case WizardPageType.BaseSettingsPage:{
context.PageOneContext = hc.Context;
@ -59,5 +59,39 @@ namespace ICSharpCode.Reporting.Addin.ReportWizard.Dialog @@ -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;
}
}
}

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

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