This repository was archived by the owner on Oct 16, 2020. It is now read-only.
File tree Expand file tree Collapse file tree
src/AddIns/Misc/Reporting/ICSharpCode.Reporting.Addin Expand file tree Collapse file tree Original file line number Diff line number Diff line change 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+ }
Original file line number Diff line number Diff line change 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+ }
You can’t perform that action at this time.
0 commit comments