Browse Source

Cleanup

pull/567/head
Peter Forstmeier 11 years ago
parent
commit
6fc996afc4
  1. 10
      src/AddIns/Misc/Reporting/ICSharpCode.Reporting.Addin/src/DesignableItems/BaseSection.cs
  2. 2
      src/AddIns/Misc/Reporting/ICSharpCode.Reporting.Addin/src/DesignerBinding/DesignerBinding.cs
  3. 4
      src/AddIns/Misc/Reporting/ICSharpCode.Reporting.Addin/src/ReportWizard/Dialog/BaseSettingsPage.xaml
  4. 2
      src/AddIns/Misc/Reporting/ICSharpCode.Reporting.Addin/src/ReportWizard/Dialog/PushDataReport.xaml
  5. 3
      src/AddIns/Misc/Reporting/ICSharpCode.Reporting.Addin/src/ReportWizard/Dialog/PushDataReport.xaml.cs
  6. 1
      src/AddIns/Misc/Reporting/ICSharpCode.Reporting.Addin/src/ReportWizard/Dialog/ReportWizard.xaml
  7. 7
      src/AddIns/Misc/Reporting/ICSharpCode.Reporting.Addin/src/ReportWizard/Dialog/ReportWizard.xaml.cs
  8. 2
      src/AddIns/Misc/Reporting/ICSharpCode.Reporting.Addin/src/ReportWizard/Dialog/WelcomePage.xaml
  9. 7
      src/AddIns/Misc/Reporting/ICSharpCode.Reporting.Addin/src/ReportWizard/ReportGenerator.cs
  10. 7
      src/AddIns/Misc/Reporting/ICSharpCode.Reporting.Addin/src/ReportWizard/ReportWizardCommand.cs
  11. 28
      src/AddIns/Misc/Reporting/ICSharpCode.Reporting.Addin/src/ReportWizard/ViewModels/ReportWizardContext.cs
  12. 7
      src/AddIns/Misc/Reporting/ICSharpCode.Reporting.Addin/src/Services/ToolboxService.cs
  13. 3
      src/AddIns/Misc/Reporting/ICSharpCode.Reporting/Src/Expressions/Irony/Ast/GlobalsNode.cs
  14. 2
      src/AddIns/Misc/Reporting/ICSharpCode.Reporting/Test/ICSharpCode.Reporting.Test/src/Expressions/IntegrationTests/GlobalsFixture.cs

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

@ -25,7 +25,6 @@ namespace ICSharpCode.Reporting.Addin.DesignableItems @@ -25,7 +25,6 @@ namespace ICSharpCode.Reporting.Addin.DesignableItems
{
FrameColor = Color.Black;
TypeDescriptor.AddProvider(new SectionItemTypeProvider(), typeof(BaseSection));
var s = Size;
}
@ -43,15 +42,6 @@ namespace ICSharpCode.Reporting.Addin.DesignableItems @@ -43,15 +42,6 @@ namespace ICSharpCode.Reporting.Addin.DesignableItems
#region Propertys
//
// [Browsable(false)]
// public int SectionOffset {get;set;}
// [Browsable(false)]
// public int SectionMargin {get;set;}
// public bool PageBreakAfter {get;set;}
public bool CanGrow {get;set;}
public bool CanShrink {get;set;}

2
src/AddIns/Misc/Reporting/ICSharpCode.Reporting.Addin/src/DesignerBinding/DesignerBinding.cs

@ -45,7 +45,7 @@ namespace ICSharpCode.Reporting.Addin.DesignerBinding { @@ -45,7 +45,7 @@ namespace ICSharpCode.Reporting.Addin.DesignerBinding {
public IViewContent CreateContentForFile(OpenedFile file)
{
if (file.IsDirty) {
var cmd = new ReportWizardCommand(file);
var cmd = new ReportWizardCommand();
cmd.Run();
if (!cmd.Canceled) {
LoggingService.Info("reportWizard canceled");

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

@ -10,10 +10,6 @@ @@ -10,10 +10,6 @@
CanFinish="true"
CanSelectNextPage="false">
<!--<xctk:WizardPage.ExteriorPanelContent >
<Image Name="_image" Stretch="Fill" HorizontalAlignment="Center" VerticalAlignment="Center"></Image>
</xctk:WizardPage.ExteriorPanelContent>-->
<xctk:WizardPage.Resources>
<ObjectDataProvider x:Key="pushpullEnum" MethodName="GetValues"
ObjectType="{x:Type System:Enum}">

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

@ -4,9 +4,7 @@ @@ -4,9 +4,7 @@
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="PushData"
Title="SharpDevelop Reporting"
PageType="Interior"
CanFinish="true"
CancelButtonVisibility="Visible"

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

@ -23,15 +23,12 @@ namespace ICSharpCode.Reporting.Addin.ReportWizard.Dialog @@ -23,15 +23,12 @@ namespace ICSharpCode.Reporting.Addin.ReportWizard.Dialog
public partial class PushDataReport : WizardPage,IHasContext
{
List<AbstractColumn> items;
List<IUnresolvedTypeDefinition> types;
PushModelContext context;
public PushDataReport()
{
InitializeComponent();
items = new List<AbstractColumn>();
types = new List<IUnresolvedTypeDefinition>();
_DataGrid.ItemsSource = items;
this.context = new PushModelContext();
var data = new AbstractColumn("MyColumn",typeof(string));

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

@ -11,7 +11,6 @@ @@ -11,7 +11,6 @@
CancelButtonVisibility="Visible"
Finish="_wizard_Finish"
CanHelp="False"
PageChanged="_wizard_PageChanged"
Next="_wizard_Next">
<local:WelcomePage x:Name="WelcomePage"></local:WelcomePage>

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

@ -22,6 +22,7 @@ namespace ICSharpCode.Reporting.Addin.ReportWizard.Dialog @@ -22,6 +22,7 @@ namespace ICSharpCode.Reporting.Addin.ReportWizard.Dialog
public partial class ReportWizard : Window
{
readonly ReportWizardContext context;
public ReportWizard(ReportWizardContext context)
{
InitializeComponent();
@ -81,11 +82,5 @@ namespace ICSharpCode.Reporting.Addin.ReportWizard.Dialog @@ -81,11 +82,5 @@ namespace ICSharpCode.Reporting.Addin.ReportWizard.Dialog
}
}
}
void _wizard_PageChanged(object sender, RoutedEventArgs e)
{
var x = _wizard.CurrentPage;
}
}
}

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

@ -3,9 +3,7 @@ @@ -3,9 +3,7 @@
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
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="Welcome"
Title="SharpDevelop Reporting"
PageType="Exterior"
NextButtonVisibility="Visible"

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

@ -56,7 +56,7 @@ namespace ICSharpCode.Reporting.Addin.ReportWizard @@ -56,7 +56,7 @@ namespace ICSharpCode.Reporting.Addin.ReportWizard
CreateReportHeader(context);
CreatePageHeader(context);
CreateDetailsSection(context);
CreatePageFooter (context);
CreatePageFooter ();
}
void GenerateBaseSettings (ReportWizardContext context) {
@ -131,10 +131,9 @@ namespace ICSharpCode.Reporting.Addin.ReportWizard @@ -131,10 +131,9 @@ namespace ICSharpCode.Reporting.Addin.ReportWizard
ReportModel.PageHeader.Items.Add(line);
}
//
void CreatePageFooter(ReportWizardContext context)
void CreatePageFooter()
{
var pageOneContext = (PageOneContext)context.PageOneContext;
var lineNrField = new BaseTextItem() {
Text = "='Page : ' + Globals!PageNumber + ' of ' + Globals!Pages + ' Page(s)'",
Name = "LineNumber",

7
src/AddIns/Misc/Reporting/ICSharpCode.Reporting.Addin/src/ReportWizard/ReportWizardCommand.cs

@ -20,13 +20,6 @@ namespace ICSharpCode.Reporting.Addin.ReportWizard @@ -20,13 +20,6 @@ namespace ICSharpCode.Reporting.Addin.ReportWizard
/// </summary>
class ReportWizardCommand: AbstractMenuCommand
{
readonly OpenedFile file;
public ReportWizardCommand (OpenedFile file) {
if (file == null)
throw new ArgumentNullException("file");
this.file = file;
}
public override void Run()
{

28
src/AddIns/Misc/Reporting/ICSharpCode.Reporting.Addin/src/ReportWizard/ViewModels/ReportWizardContext.cs

@ -19,32 +19,10 @@ namespace ICSharpCode.Reporting.Addin.ReportWizard.ViewModels @@ -19,32 +19,10 @@ namespace ICSharpCode.Reporting.Addin.ReportWizard.ViewModels
/// </summary>
public class ReportWizardContext:IWizardContext
{
public string Title {
get{ return "das ist der Title";}
}
IWizardContext pageOneContext;
public IWizardContext PageOneContext {
get {
return pageOneContext;
}
set {
pageOneContext = value;
}
}
public IWizardContext PageOneContext {get;set;}
public IWizardContext PushModelContext {get;set;}
IWizardContext pushModelContext;
public IWizardContext PushModelContext {
get {
return pushModelContext;
}
set {
pushModelContext = value;
}
}
}
}

7
src/AddIns/Misc/Reporting/ICSharpCode.Reporting.Addin/src/Services/ToolboxService.cs

@ -189,13 +189,6 @@ namespace ICSharpCode.Reporting.Addin.Services @@ -189,13 +189,6 @@ namespace ICSharpCode.Reporting.Addin.Services
if (serializedObject is System.Windows.Forms.IDataObject) {
if (((System.Windows.Forms.IDataObject)serializedObject).GetDataPresent(typeof(ToolboxItem))) {
var item = (ToolboxItem) ((System.Windows.Forms.IDataObject)serializedObject).GetData(typeof(ToolboxItem));
// if (host != null) {
// ArrayList list = (ArrayList)toolboxByHost[host];
// if (list != null && list.Contains(item)) {
// return true;
// }
// list = (ArrayList)toolboxByHost[ALL_HOSTS];
// if (list != null && list.Contains(item)) {
return true;
// }
// }

3
src/AddIns/Misc/Reporting/ICSharpCode.Reporting/Src/Expressions/Irony/Ast/GlobalsNode.cs

@ -17,6 +17,7 @@ @@ -17,6 +17,7 @@
// DEALINGS IN THE SOFTWARE.
using System;
using System.Globalization;
using System.Linq;
using ICSharpCode.Reporting.PageBuilder.ExportColumns;
using Irony.Ast;
@ -63,7 +64,7 @@ namespace ICSharpCode.Reporting.Expressions.Irony.Ast @@ -63,7 +64,7 @@ namespace ICSharpCode.Reporting.Expressions.Irony.Ast
}
else {
return String.Format("Syntaxerror in Globals <{0}>",globalNode.AsString);
return String.Format(CultureInfo.CurrentCulture,"Syntaxerror in Globals <{0}>",globalNode.AsString);
}
}
}

2
src/AddIns/Misc/Reporting/ICSharpCode.Reporting/Test/ICSharpCode.Reporting.Test/src/Expressions/IntegrationTests/GlobalsFixture.cs

@ -45,6 +45,7 @@ namespace ICSharpCode.Reporting.Test.Expressions.InterationTests @@ -45,6 +45,7 @@ namespace ICSharpCode.Reporting.Test.Expressions.InterationTests
Assert.That(s.Text.Contains("Page"));
}
[Test]
public void CanEvaluateComplexStatement () {
reportCreator.BuildExportList();
@ -53,6 +54,7 @@ namespace ICSharpCode.Reporting.Test.Expressions.InterationTests @@ -53,6 +54,7 @@ namespace ICSharpCode.Reporting.Test.Expressions.InterationTests
var s = (ExportText)sec.ExportedItems[0];
Assert.That (s.Text.Contains("1"));
Assert.That(s.Text.Contains("Page"));
Assert.That(s.Text.Contains("Pages"));
}
[Test]

Loading…
Cancel
Save