示例#1
0
 uint GetUInt(org.freedesktop.DBus.Properties dbusobj, string path, string propname)
 {
     try {
         return(UInt32.Parse(dbusobj.Get(path, propname).ToString()));
     } catch {
         return(0);
     }
 }
示例#2
0
 double GetDouble(org.freedesktop.DBus.Properties dbusobj, string path, string propname)
 {
     try {
         return(Double.Parse(dbusobj.Get(path, propname).ToString()));
     } catch {
         return(0);
     }
 }
示例#3
0
 private DkDisk (string obj_path)
 {
     if (udisks_finder != null) {
         udisks_disk = Bus.System.GetObject<UDisksDisk> (udisks_bus_name, new ObjectPath (obj_path));
         props = Bus.System.GetObject<org.freedesktop.DBus.Properties> (udisks_bus_name, new ObjectPath (obj_path));
     } else {
         dk_disk = Bus.System.GetObject<IDkDisk> (dk_bus_name, new ObjectPath(obj_path));
         props = Bus.System.GetObject<org.freedesktop.DBus.Properties> (dk_bus_name, new ObjectPath(obj_path));
     }
 }
示例#4
0
 public UDiskDevice(string deviceName)
 {
     DeviceName  = deviceName;
     _device     = Bus.System.GetObject <IUDiskDevice>("org.freedesktop.UDisks", new ObjectPath(deviceName));
     _properties = Bus.System.GetObject <DBusProperties>("org.freedesktop.UDisks", new ObjectPath(deviceName));
 }
示例#5
0
		public UDiskDevice(string deviceName)
		{
			DeviceName = deviceName;
			_device = Bus.System.GetObject<IUDiskDevice>("org.freedesktop.UDisks", new ObjectPath(deviceName));
			_properties = Bus.System.GetObject<DBusProperties>("org.freedesktop.UDisks", new ObjectPath(deviceName));
		}