~tangerine-developers/tangerine/trunk

« back to all changes in this revision

Viewing changes to plugins/Session/src/SessionPlugin.cs

  • Committer: Alex Launi
  • Date: 2009-08-08 05:13:47 UTC
  • mto: This revision was merged to the branch mainline in revision 6.
  • Revision ID: alex.launi@gmail.com-20090808051347-p636tknaac50mtk2
fix tangerine launch script

Show diffs side-by-side

added added

removed removed

Lines of Context:
7
7
 
8
8
[assembly: Tangerine.Plugin ("session", typeof (Tangerine.Plugins.SessionPlugin))]
9
9
 
10
 
namespace Tangerine.Plugins {
11
 
 
12
 
    public class SessionPlugin : IDisposable {
13
 
 
 
10
namespace Tangerine.Plugins 
 
11
{
 
12
    public class SessionPlugin : IDisposable 
 
13
        {
14
14
        [DllImport ("libsessionglue")]
15
15
        private static extern void run_session ();
16
16
 
17
17
        [DllImport ("libsessionglue")]
18
18
        private static extern void close_session ();
19
19
        
20
 
        public SessionPlugin () {
21
 
            Thread thread = new Thread (run_session);
22
 
            thread.IsBackground = true;
23
 
            thread.Start ();
 
20
        public SessionPlugin () 
 
21
                {
 
22
                        try {
 
23
                Thread thread = new Thread (run_session);
 
24
                thread.IsBackground = true;
 
25
                thread.Start ();
 
26
                        } catch (DllNotFoundException e) {
 
27
                                Console.Error.WriteLine ("{0} \n {1} \n\n {2}", e.Message, e.StackTrace, e);
 
28
                        }
24
29
        }
25
30
 
26
 
        public void Dispose () {
 
31
        public void Dispose () 
 
32
                {
27
33
            close_session ();
28
34
        }
29
35
    }