From e6b7ed94fcdb7c1b2a4d087f9299aaa0a1590fa8 Mon Sep 17 00:00:00 2001 From: Peter Forstmeier Date: Fri, 15 Aug 2014 12:01:06 +0200 Subject: [PATCH] WizardPages --- .../src/DesignableItems/BaseSection.cs | 2 +- .../ReportDefinitionDeserializer.cs | 4 +--- .../src/ReportWizard/Dialog/BaseSettingsPage.xaml | 5 +++-- .../ReportWizard/Dialog/BaseSettingsPage.xaml.cs | 13 +++++-------- .../src/ReportWizard/Dialog/ReportWizard.xaml | 2 -- .../src/ReportWizard/Dialog/ReportWizard.xaml.cs | 14 -------------- .../src/ReportWizard/ReportGenerator.cs | 1 - 7 files changed, 10 insertions(+), 31 deletions(-) diff --git a/src/AddIns/Misc/Reporting/ICSharpCode.Reporting.Addin/src/DesignableItems/BaseSection.cs b/src/AddIns/Misc/Reporting/ICSharpCode.Reporting.Addin/src/DesignableItems/BaseSection.cs index 55ac69ff3a..70e5fec903 100644 --- a/src/AddIns/Misc/Reporting/ICSharpCode.Reporting.Addin/src/DesignableItems/BaseSection.cs +++ b/src/AddIns/Misc/Reporting/ICSharpCode.Reporting.Addin/src/DesignableItems/BaseSection.cs @@ -25,10 +25,10 @@ namespace ICSharpCode.Reporting.Addin.DesignableItems { FrameColor = Color.Black; TypeDescriptor.AddProvider(new SectionItemTypeProvider(), typeof(BaseSection)); + var s = Size; } -// [EditorBrowsableAttribute()] protected override void OnPaint(System.Windows.Forms.PaintEventArgs e) { base.OnPaint(e); diff --git a/src/AddIns/Misc/Reporting/ICSharpCode.Reporting.Addin/src/DesignerBinding/ReportDefinitionDeserializer.cs b/src/AddIns/Misc/Reporting/ICSharpCode.Reporting.Addin/src/DesignerBinding/ReportDefinitionDeserializer.cs index 5bd939f324..06f6bc8b85 100644 --- a/src/AddIns/Misc/Reporting/ICSharpCode.Reporting.Addin/src/DesignerBinding/ReportDefinitionDeserializer.cs +++ b/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) { 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; host.Container.Add(section); } catch (Exception e) { @@ -85,8 +85,6 @@ namespace ICSharpCode.Reporting.Addin.DesignerBinding { var a = Assembly.GetExecutingAssembly(); Type t = a.GetType("ICSharpCode.Reporting.Addin.DesignableItems" + "." + name); -// Type t = typeof(BaseSection).Assembly.GetType(typeof(BaseSection).Namespace + "." + name); - return t; } } diff --git a/src/AddIns/Misc/Reporting/ICSharpCode.Reporting.Addin/src/ReportWizard/Dialog/BaseSettingsPage.xaml b/src/AddIns/Misc/Reporting/ICSharpCode.Reporting.Addin/src/ReportWizard/Dialog/BaseSettingsPage.xaml index 4f200abc5b..cd40ceb109 100644 --- a/src/AddIns/Misc/Reporting/ICSharpCode.Reporting.Addin/src/ReportWizard/Dialog/BaseSettingsPage.xaml +++ b/src/AddIns/Misc/Reporting/ICSharpCode.Reporting.Addin/src/ReportWizard/Dialog/BaseSettingsPage.xaml @@ -32,7 +32,7 @@ - + @@ -74,7 +74,8 @@ - + + diff --git a/src/AddIns/Misc/Reporting/ICSharpCode.Reporting.Addin/src/ReportWizard/Dialog/BaseSettingsPage.xaml.cs b/src/AddIns/Misc/Reporting/ICSharpCode.Reporting.Addin/src/ReportWizard/Dialog/BaseSettingsPage.xaml.cs index e08b8f28a5..90f8275d1f 100644 --- a/src/AddIns/Misc/Reporting/ICSharpCode.Reporting.Addin/src/ReportWizard/Dialog/BaseSettingsPage.xaml.cs +++ b/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. */ using System; -using System.Drawing; -using System.Drawing.Imaging; -using System.IO; using System.Windows; using System.Windows.Controls; -using System.Windows.Media.Imaging; using ICSharpCode.Reporting.Globals; -using ICSharpCode.SharpDevelop; using Xceed.Wpf.Toolkit; using ICSharpCode.Reporting.Addin.ReportWizard.ViewModels; @@ -30,11 +25,13 @@ namespace ICSharpCode.Reporting.Addin.ReportWizard.Dialog{ public BaseSettingsPage() { InitializeComponent(); + + _DataModel.SelectedItem = PushPullModel.FormSheet; _DataModel.SelectedItem = PushPullModel.FormSheet; _ReportType.SelectedItem = ReportType.FormSheet; - this.context = new PageOneContext(); - this._DataModel.SelectedItem = PushPullModel.FormSheet; _image.Source = WizardHelper.GetWizardIcon(); + _Legal.IsChecked = true; + this.context = new PageOneContext(); } @@ -50,7 +47,7 @@ namespace ICSharpCode.Reporting.Addin.ReportWizard.Dialog{ void UpdateContext(){ - +Console.WriteLine("Legal at bbbb {0}",_Legal.IsChecked); context.DataModel = (PushPullModel) _DataModel.SelectedItem; context.ReportType = (ReportType) _ReportType.SelectedItem; context.ReportName = this._ReportName.Text; diff --git a/src/AddIns/Misc/Reporting/ICSharpCode.Reporting.Addin/src/ReportWizard/Dialog/ReportWizard.xaml b/src/AddIns/Misc/Reporting/ICSharpCode.Reporting.Addin/src/ReportWizard/Dialog/ReportWizard.xaml index 34166be08c..b316c345a3 100644 --- a/src/AddIns/Misc/Reporting/ICSharpCode.Reporting.Addin/src/ReportWizard/Dialog/ReportWizard.xaml +++ b/src/AddIns/Misc/Reporting/ICSharpCode.Reporting.Addin/src/ReportWizard/Dialog/ReportWizard.xaml @@ -7,10 +7,8 @@ Height="600" Width="800"> diff --git a/src/AddIns/Misc/Reporting/ICSharpCode.Reporting.Addin/src/ReportWizard/Dialog/ReportWizard.xaml.cs b/src/AddIns/Misc/Reporting/ICSharpCode.Reporting.Addin/src/ReportWizard/Dialog/ReportWizard.xaml.cs index 3bc13a9246..448dcceea5 100644 --- a/src/AddIns/Misc/Reporting/ICSharpCode.Reporting.Addin/src/ReportWizard/Dialog/ReportWizard.xaml.cs +++ b/src/AddIns/Misc/Reporting/ICSharpCode.Reporting.Addin/src/ReportWizard/Dialog/ReportWizard.xaml.cs @@ -26,26 +26,12 @@ namespace ICSharpCode.Reporting.Addin.ReportWizard.Dialog public partial class ReportWizard : Window { readonly ReportWizardContext context; - readonly BaseSettingsPage baseSettingsPage; - public ReportWizard(ReportWizardContext context) { InitializeComponent(); 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) { diff --git a/src/AddIns/Misc/Reporting/ICSharpCode.Reporting.Addin/src/ReportWizard/ReportGenerator.cs b/src/AddIns/Misc/Reporting/ICSharpCode.Reporting.Addin/src/ReportWizard/ReportGenerator.cs index 9c89d4d66d..b9787e1cd8 100644 --- a/src/AddIns/Misc/Reporting/ICSharpCode.Reporting.Addin/src/ReportWizard/ReportGenerator.cs +++ b/src/AddIns/Misc/Reporting/ICSharpCode.Reporting.Addin/src/ReportWizard/ReportGenerator.cs @@ -66,7 +66,6 @@ namespace ICSharpCode.Reporting.Addin.ReportWizard dataItem.Location = location; dataItem.Size = GlobalValues.PreferedSize; xLocation = xLocation + GlobalValues.PreferedSize.Width + gap; - Console.WriteLine("Create dataItem with {0} - {1}items",dataItem.Location,dataItem.Size); ReportModel.DetailSection.Items.Add(dataItem); } }