public
Last active

I get this error: Unhandled Exception: System.TypeLoadException: Could not load type 'NDesk.DBus.Bus' from assembly 'NDesk.DBus, Version=1.0.0.0, Culture=neutral, PublicKeyToken=f6716e4f9b2ed099'

  • Download Gist
gtg.cs
C#
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49
using System;
using System.IO;
using System.Net;
using System.Text;
using System.Collections;
using System.Collections.Generic;
using System.Runtime.InteropServices;
 
using Gtk;
using Evolution;
using Camel;
 
using NDesk.DBus;
using org.freedesktop;
using org.freedesktop.DBus;
 
namespace org.freedesktop
{
[Interface ("org.GTG")]
public interface GTG : Introspectable, Properties
{
void open_task_editor(string tid);
}
}
 
public class hello {
 
public static IntPtr hello_handle (IntPtr plugin_ptr)
{
Evolution.Mail.MenuTargetSelect menu_target_message = (Evolution.Mail.MenuTargetSelect)Marshal.PtrToStructure(plugin_ptr, typeof(Evolution.Mail.MenuTargetSelect));
 
Camel.MimeMessage message;
Camel.Folder folder;
 
folder = menu_target_message.folder;
String [] uids = menu_target_message.uids;
message = folder.getMessage(uids[0]);
 
String subject = message.subject;
Console.WriteLine("Subject: " + subject);
Console.WriteLine("URI: " + menu_target_message.uri + " " + uids[0]);
 
Bus bus = Bus.Session;
GTG gtg = bus.GetObject<GTG> ("org.GTG", new ObjectPath ("/org/GTG"));
gtg.open_task_editor("0@1");
 
return (IntPtr) 0;
}
}

Please sign in to comment on this gist.

Something went wrong with that request. Please try again.