Skip to content
This repository was archived by the owner on Oct 16, 2020. It is now read-only.

Commit aa90e22

Browse files
Add missing Files
1 parent 4760307 commit aa90e22

2 files changed

Lines changed: 100 additions & 0 deletions

File tree

Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
/*
2+
* Created by SharpDevelop.
3+
* User: Peter Forstmeier
4+
* Date: 17.02.2014
5+
* Time: 20:07
6+
*
7+
* To change this template use Tools | Options | Coding | Edit Standard Headers.
8+
*/
9+
using System;
10+
using ICSharpCode.Core;
11+
using ICSharpCode.SharpDevelop.Workbench;
12+
13+
namespace ICSharpCode.Reporting.Addin.Commands
14+
{
15+
/// <summary>
16+
/// Description of ViewCommands.
17+
/// </summary>
18+
public class CreateDesignerCommand : AbstractMenuCommand
19+
{
20+
readonly OpenedFile openedFile;
21+
22+
public CreateDesignerCommand (OpenedFile openedFile) {
23+
if (openedFile == null)
24+
throw new ArgumentNullException("openedFile");
25+
this.openedFile = openedFile;
26+
}
27+
28+
public override void Run(){
29+
// var generator = new ReportDesignerGenerator();
30+
// DesignerView = new ReportDesignerView(openedFile, generator);
31+
MessageService.ShowMessage("ReportDesigner not available at the Moment","New ReportDesigner");
32+
}
33+
34+
// public ReportDesignerView DesignerView {get; private set;}
35+
}
36+
}
Lines changed: 64 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,64 @@
1+
/*
2+
* Created by SharpDevelop.
3+
* User: Peter Forstmeier
4+
* Date: 11.02.2014
5+
* Time: 20:19
6+
*
7+
* To change this template use Tools | Options | Coding | Edit Standard Headers.
8+
*/
9+
10+
using System;
11+
using System.IO;
12+
using ICSharpCode.Core;
13+
using ICSharpCode.SharpDevelop;
14+
using ICSharpCode.SharpDevelop.Workbench;
15+
using ICSharpCode.Reporting.Addin.Commands;
16+
17+
namespace ICSharpCode.Reporting.Addin.DesignerBinding {
18+
19+
20+
public class ReportDesignerBinding:IDisplayBinding {
21+
22+
23+
public bool IsPreferredBindingForFile(FileName fileName)
24+
{
25+
return true;
26+
}
27+
28+
29+
public bool CanCreateContentForFile(FileName fileName)
30+
{
31+
return Path.GetExtension(fileName).Equals(".srd", StringComparison.OrdinalIgnoreCase);
32+
}
33+
34+
35+
public double AutoDetectFileContent(FileName fileName, System.IO.Stream fileContent, string detectedMimeType)
36+
{
37+
throw new System.NotImplementedException();
38+
}
39+
40+
41+
public IViewContent CreateContentForFile(OpenedFile file)
42+
{
43+
// MessageService.ShowMessage("ReportDesigner not available at the Moment","New ReportDesigner");
44+
// return null;
45+
46+
if (file.IsDirty) {
47+
MessageService.ShowMessage("ReportWizard not available at the Moment","New ReportDesigner");
48+
return null;
49+
// var cmd = new ReportWizardCommand(file);
50+
// cmd.Run();
51+
// if (cmd.Canceled) {
52+
// return null;
53+
// }
54+
// file.SetData(cmd.GeneratedReport.ToArray());
55+
}
56+
57+
var viewCmd = new CreateDesignerCommand(file);
58+
viewCmd.Run();
59+
// return viewCmd.DesignerView;
60+
return null;
61+
62+
}
63+
}
64+
}

0 commit comments

Comments
 (0)