~ubuntu-branches/ubuntu/wily/monodevelop/wily

« back to all changes in this revision

Viewing changes to external/monomac/samples/macdoc/MonodocDocumentController.cs

  • Committer: Package Import Robot
  • Author(s): Jo Shields
  • Date: 2012-05-27 18:08:20 UTC
  • mfrom: (19.1.8 experimental)
  • Revision ID: package-import@ubuntu.com-20120527180820-fydl21qnbnfr8w2t
Tags: 3.0.2+dfsg-3
* [fcecfe7] Fix monodevelop-core-addins.pc.in to point to actual 
  installed location of assemblies.
* [26e1a07] DebSrc 3.0 does not support Quilt's -p parameter, so 
  manually adjust the path in the patch file.

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
using System;
 
2
using System.Linq;
 
3
using MonoMac.Foundation;
 
4
using MonoMac.AppKit;
 
5
using MonoMac.ObjCRuntime;
 
6
 
 
7
namespace macdoc
 
8
{
 
9
        public class MonodocDocumentController : NSDocumentController
 
10
        {
 
11
                public MonodocDocumentController () : base ()
 
12
                {
 
13
                }
 
14
                
 
15
                // We only have one type of document so force every request to use it
 
16
                public override Class DocumentClassForType (string typeName)
 
17
                {
 
18
                        return new Class (typeof (MyDocument));
 
19
                }
 
20
                
 
21
                public override string TypeForUrl (NSUrl inAbsoluteUrl, out NSError outError)
 
22
                {
 
23
                        outError = null;
 
24
                        return "MyDocument";
 
25
                }
 
26
                
 
27
                public MyDocument CurrentMyDocument {
 
28
                        get {
 
29
                                return (MyDocument)CurrentDocument;
 
30
                        }
 
31
                }
 
32
        }
 
33
}
 
34