Browse Source

WizardPages

pull/505/merge
Peter Forstmeier 11 years ago
parent
commit
e6b7ed94fc
  1. 2
      src/AddIns/Misc/Reporting/ICSharpCode.Reporting.Addin/src/DesignableItems/BaseSection.cs
  2. 4
      src/AddIns/Misc/Reporting/ICSharpCode.Reporting.Addin/src/DesignerBinding/ReportDefinitionDeserializer.cs
  3. 5
      src/AddIns/Misc/Reporting/ICSharpCode.Reporting.Addin/src/ReportWizard/Dialog/BaseSettingsPage.xaml
  4. 13
      src/AddIns/Misc/Reporting/ICSharpCode.Reporting.Addin/src/ReportWizard/Dialog/BaseSettingsPage.xaml.cs
  5. 2
      src/AddIns/Misc/Reporting/ICSharpCode.Reporting.Addin/src/ReportWizard/Dialog/ReportWizard.xaml
  6. 14
      src/AddIns/Misc/Reporting/ICSharpCode.Reporting.Addin/src/ReportWizard/Dialog/ReportWizard.xaml.cs
  7. 1
      src/AddIns/Misc/Reporting/ICSharpCode.Reporting.Addin/src/ReportWizard/ReportGenerator.cs

2
src/AddIns/Misc/Reporting/ICSharpCode.Reporting.Addin/src/DesignableItems/BaseSection.cs

@ -25,10 +25,10 @@ namespace ICSharpCode.Reporting.Addin.DesignableItems
{ {
FrameColor = Color.Black; FrameColor = Color.Black;
TypeDescriptor.AddProvider(new SectionItemTypeProvider(), typeof(BaseSection)); TypeDescriptor.AddProvider(new SectionItemTypeProvider(), typeof(BaseSection));
var s = Size;
} }
// [EditorBrowsableAttribute()]
protected override void OnPaint(System.Windows.Forms.PaintEventArgs e) protected override void OnPaint(System.Windows.Forms.PaintEventArgs e)
{ {
base.OnPaint(e); base.OnPaint(e);

4
src/AddIns/Misc/Reporting/ICSharpCode.Reporting.Addin/src/DesignerBinding/ReportDefinitionDeserializer.cs

@ -61,7 +61,7 @@ namespace ICSharpCode.Reporting.Addin.DesignerBinding
foreach (XmlNode sectionNode in sectionList) { foreach (XmlNode sectionNode in sectionList) {
try { try {
object o = this.Load(sectionNode as XmlElement,null); var o = this.Load(sectionNode as XmlElement,null);
var section = o as ICSharpCode.Reporting.Addin.DesignableItems.BaseSection; var section = o as ICSharpCode.Reporting.Addin.DesignableItems.BaseSection;
host.Container.Add(section); host.Container.Add(section);
} catch (Exception e) { } catch (Exception e) {
@ -85,8 +85,6 @@ namespace ICSharpCode.Reporting.Addin.DesignerBinding
{ {
var a = Assembly.GetExecutingAssembly(); var a = Assembly.GetExecutingAssembly();
Type t = a.GetType("ICSharpCode.Reporting.Addin.DesignableItems" + "." + name); Type t = a.GetType("ICSharpCode.Reporting.Addin.DesignableItems" + "." + name);
// Type t = typeof(BaseSection).Assembly.GetType(typeof(BaseSection).Namespace + "." + name);
return t; return t;
} }
} }

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

@ -32,7 +32,7 @@
</ObjectDataProvider> </ObjectDataProvider>
</xctk:WizardPage.Resources> </xctk:WizardPage.Resources>
<Grid ShowGridLines="True" > <Grid>
<Grid.RowDefinitions> <Grid.RowDefinitions>
<RowDefinition Height="Auto"> </RowDefinition> <RowDefinition Height="Auto"> </RowDefinition>
<RowDefinition Height="Auto"></RowDefinition> <RowDefinition Height="Auto"></RowDefinition>
@ -74,7 +74,8 @@
<Label Content="Page Layout :" Grid.Column="1" Grid.Row="6" Margin="0,5,0,5"></Label> <Label Content="Page Layout :" Grid.Column="1" Grid.Row="6" Margin="0,5,0,5"></Label>
<RadioButton Name="_Legal" GroupName="PageLayout" Content="Legal" IsChecked="true" Grid.Column="1" Grid.Row="7" Margin="0,5,0,5" ></RadioButton>
<RadioButton Name="_Legal" GroupName="PageLayout" Content="Legal" Grid.Column="1" Grid.Row="7" Margin="0,5,0,5" ></RadioButton>
<RadioButton Name="_Landscape" GroupName="PageLayout" Content="Landscape" Grid.Row="7" Grid.Column="2" Margin="0,5,0,5"></RadioButton> <RadioButton Name="_Landscape" GroupName="PageLayout" Content="Landscape" Grid.Row="7" Grid.Column="2" Margin="0,5,0,5"></RadioButton>
</Grid> </Grid>

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

@ -7,14 +7,9 @@
* To change this template use Tools | Options | Coding | Edit Standard Headers. * To change this template use Tools | Options | Coding | Edit Standard Headers.
*/ */
using System; using System;
using System.Drawing;
using System.Drawing.Imaging;
using System.IO;
using System.Windows; using System.Windows;
using System.Windows.Controls; using System.Windows.Controls;
using System.Windows.Media.Imaging;
using ICSharpCode.Reporting.Globals; using ICSharpCode.Reporting.Globals;
using ICSharpCode.SharpDevelop;
using Xceed.Wpf.Toolkit; using Xceed.Wpf.Toolkit;
using ICSharpCode.Reporting.Addin.ReportWizard.ViewModels; using ICSharpCode.Reporting.Addin.ReportWizard.ViewModels;
@ -30,11 +25,13 @@ 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;
this.context = new PageOneContext();
this._DataModel.SelectedItem = PushPullModel.FormSheet;
_image.Source = WizardHelper.GetWizardIcon(); _image.Source = WizardHelper.GetWizardIcon();
_Legal.IsChecked = true;
this.context = new PageOneContext();
} }
@ -50,7 +47,7 @@ namespace ICSharpCode.Reporting.Addin.ReportWizard.Dialog{
void UpdateContext(){ void UpdateContext(){
Console.WriteLine("Legal at bbbb {0}",_Legal.IsChecked);
context.DataModel = (PushPullModel) _DataModel.SelectedItem; context.DataModel = (PushPullModel) _DataModel.SelectedItem;
context.ReportType = (ReportType) _ReportType.SelectedItem; context.ReportType = (ReportType) _ReportType.SelectedItem;
context.ReportName = this._ReportName.Text; context.ReportName = this._ReportName.Text;

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

@ -7,10 +7,8 @@
Height="600" Width="800"> Height="600" Width="800">
<xctk:Wizard x:Name="_wizard" FinishButtonClosesWindow="True" <xctk:Wizard x:Name="_wizard" FinishButtonClosesWindow="True"
Next="_wizard_Next"
NextButtonVisibility="Visible" NextButtonVisibility="Visible"
CancelButtonVisibility="Visible" CancelButtonVisibility="Visible"
PageChanged="_wizard_PageChanged"
Finish="_wizard_Finish" Finish="_wizard_Finish"
CanHelp="False"> CanHelp="False">

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

@ -26,27 +26,13 @@ namespace ICSharpCode.Reporting.Addin.ReportWizard.Dialog
public partial class ReportWizard : Window public partial class ReportWizard : Window
{ {
readonly ReportWizardContext context; readonly ReportWizardContext context;
readonly BaseSettingsPage baseSettingsPage;
public ReportWizard(ReportWizardContext context) public ReportWizard(ReportWizardContext context)
{ {
InitializeComponent(); InitializeComponent();
this.context = context; this.context = context;
baseSettingsPage = new BaseSettingsPage();
}
void _wizard_Next(object sender, Xceed.Wpf.Toolkit.Core.CancelRoutedEventArgs e)
{
Console.WriteLine(" _wizard_Next {0}",((Wizard)sender).CurrentPage.Name);
} }
void _wizard_PageChanged(object sender, RoutedEventArgs e)
{
Console.WriteLine("_wizard_PageChanged {0}",((Wizard)sender).CurrentPage.Name);
}
void _wizard_Finish(object sender, RoutedEventArgs e) void _wizard_Finish(object sender, RoutedEventArgs e)
{ {
foreach (WizardPage element in _wizard.Items) { foreach (WizardPage element in _wizard.Items) {

1
src/AddIns/Misc/Reporting/ICSharpCode.Reporting.Addin/src/ReportWizard/ReportGenerator.cs

@ -66,7 +66,6 @@ namespace ICSharpCode.Reporting.Addin.ReportWizard
dataItem.Location = location; dataItem.Location = location;
dataItem.Size = GlobalValues.PreferedSize; dataItem.Size = GlobalValues.PreferedSize;
xLocation = xLocation + GlobalValues.PreferedSize.Width + gap; xLocation = xLocation + GlobalValues.PreferedSize.Width + gap;
Console.WriteLine("Create dataItem with {0} - {1}items",dataItem.Location,dataItem.Size);
ReportModel.DetailSection.Items.Add(dataItem); ReportModel.DetailSection.Items.Add(dataItem);
} }
} }

Loading…
Cancel
Save