|
|
|
@ -19,48 +19,25 @@ namespace ICSharpCode.Reports.Addin.Commands |
|
|
|
/// <summary>
|
|
|
|
/// <summary>
|
|
|
|
/// Description of StartView
|
|
|
|
/// Description of StartView
|
|
|
|
/// </summary>
|
|
|
|
/// </summary>
|
|
|
|
public class StartViewCommand : AbstractMenuCommand |
|
|
|
public class CreateDesignViewCommand : AbstractMenuCommand |
|
|
|
{ |
|
|
|
{ |
|
|
|
|
|
|
|
readonly OpenedFile openedFile; |
|
|
|
|
|
|
|
|
|
|
|
public override void Run() |
|
|
|
public CreateDesignViewCommand (OpenedFile openedFile) { |
|
|
|
{ |
|
|
|
if (openedFile == null) |
|
|
|
throw new NotImplementedException("StartViewCommand-Run"); |
|
|
|
throw new ArgumentNullException("openedFile"); |
|
|
|
// SD.Workbench.ShowView(SetupDesigner());
|
|
|
|
this.openedFile = openedFile; |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
/* |
|
|
|
public override void Run(){ |
|
|
|
public static ReportDesignerView SetupDesigner () |
|
|
|
var generator = new ReportDesignerGenerator(); |
|
|
|
{ |
|
|
|
DesignerView = new ReportDesignerView(openedFile, generator); |
|
|
|
throw new NotImplementedException("SetupDesigner"); |
|
|
|
|
|
|
|
ReportModel model = ReportModel.Create(); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
var reportStructure = new ReportStructure() |
|
|
|
|
|
|
|
{ |
|
|
|
|
|
|
|
ReportLayout = GlobalEnums.ReportLayout.ListLayout; |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
IReportGenerator generator = new GeneratePlainReport(model,reportStructure); |
|
|
|
|
|
|
|
generator.GenerateReport(); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
// OpenedFile file = FileService.CreateUntitledOpenedFile(GlobalValues.PlainFileName,new byte[0]);
|
|
|
|
|
|
|
|
// file.SetData(generator.Generated.ToArray());
|
|
|
|
|
|
|
|
// return SetupDesigner(file);
|
|
|
|
|
|
|
|
return SetupDesigner(null); |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
*/ |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
public static ReportDesignerView SetupDesigner (OpenedFile file) |
|
|
|
|
|
|
|
{ |
|
|
|
|
|
|
|
if (file == null) { |
|
|
|
|
|
|
|
throw new ArgumentNullException("file"); |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
IDesignerGenerator generator = new ReportDesignerGenerator(); |
|
|
|
|
|
|
|
return new ReportDesignerView(file, generator); |
|
|
|
|
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
public ReportDesignerView DesignerView {get; private set;} |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
public class CollectParametersCommand :AbstractCommand |
|
|
|
public class CollectParametersCommand :AbstractCommand |
|
|
|
{ |
|
|
|
{ |
|
|
|
ReportSettings reportSettings; |
|
|
|
ReportSettings reportSettings; |
|
|
|
|