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 @@ -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);

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

@ -61,7 +61,7 @@ namespace ICSharpCode.Reporting.Addin.DesignerBinding @@ -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 @@ -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;
}
}

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

@ -32,7 +32,7 @@ @@ -32,7 +32,7 @@
</ObjectDataProvider>
</xctk:WizardPage.Resources>
<Grid ShowGridLines="True" >
<Grid>
<Grid.RowDefinitions>
<RowDefinition Height="Auto"> </RowDefinition>
<RowDefinition Height="Auto"></RowDefinition>
@ -74,7 +74,8 @@ @@ -74,7 +74,8 @@
<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>
</Grid>

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

@ -7,14 +7,9 @@ @@ -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{ @@ -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{ @@ -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;

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

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

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

@ -26,26 +26,12 @@ namespace ICSharpCode.Reporting.Addin.ReportWizard.Dialog @@ -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)
{

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

@ -66,7 +66,6 @@ namespace ICSharpCode.Reporting.Addin.ReportWizard @@ -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);
}
}

Loading…
Cancel
Save