Example #1
0
        public static Clip Create()
        {
            Clip toret;

            System.PlatformID pid = System.Environment.OSVersion.Platform;

            // Sometimes MacOSX is reported as Unix instead of MacOSX.
            // Instead of platform check, check for Mac root folders
            if (pid == System.PlatformID.Unix &&
                Directory.Exists("/Applications") &&
                Directory.Exists("/System") &&
                Directory.Exists("/Users") &&
                Directory.Exists("/Volumes"))
            {
                pid = System.PlatformID.MacOSX;
            }

            if (pid != System.PlatformID.MacOSX)
            {
                toret = new Clippy();
            }
            else
            {
                toret = new Clipmac();
            }

            return(toret);
        }
Example #2
0
    static bool TryInstallFreetype()
    {
        bool ok;

        System.PlatformID platform = System.Environment.OSVersion.Platform;

        switch (platform)
        {
        case System.PlatformID.MacOSX:
        case System.PlatformID.Unix:
            ok = InstallFreetypeOnMac();
            break;

        case System.PlatformID.WinCE:
        case System.PlatformID.Win32Windows:
        case System.PlatformID.Win32S:
        case System.PlatformID.Win32NT:
            ok = InstallFreetypeOnWin();
            break;

        default:
            ok = false;
            break;
        }

        AssetDatabase.Refresh();
        return(ok);
    }
Example #3
0
 // Will not work on Windows, as this relies on Unix system calls
 public SyslogLocalSender()
 {
     System.PlatformID platform = System.Environment.OSVersion.Platform;
     if (!(platform == System.PlatformID.MacOSX || platform == System.PlatformID.Unix))
     {
         throw new SyslogNetException("SyslogLocalSender is only available on Unix-like systems (e.g., Linux, BSD, OS X)");
     }
 }
		public OperatingSystem (PlatformID platform, Version version)
		{
			if (version == null) {
				throw new ArgumentNullException ("version");
			}

			_platform = platform;
			_version = version;
		}
Example #5
0
        public OperatingSystem(PlatformID platform, Version version)
        {
            if (version == null)
            {
                throw new ArgumentNullException("version");
            }

            _platform = platform;
            _version  = version;
        }
Example #6
0
		public OperatingSystem (PlatformID platform, Version version)
		{
			if (version == null) {
				throw new ArgumentNullException ("version");
			}

			_platform = platform;
			_version = version;

			if (platform == PlatformID.Win32NT) {
				// The service pack is encoded in the upper bits of the revision
				if (version.Revision != 0)
					_servicePack = "Service Pack " + (version.Revision >> 16);
			}
		}
Example #7
0
        public OperatingSystem(PlatformID platform, Version version)
        {
            if (version == null)
            {
                throw new ArgumentNullException("version");
            }

            _platform = platform;
            _version  = version;

            if (platform == PlatformID.Win32NT)
            {
                // The service pack is encoded in the upper bits of the revision
                if (version.Revision != 0)
                {
                    _servicePack = "Service Pack " + (version.Revision >> 16);
                }
            }
        }
Example #8
0
 private OperatingSystem(SerializationInfo information, StreamingContext context)
 {
     _platform    = (System.PlatformID)information.GetValue("_platform", typeof(System.PlatformID));
     _version     = (Version)information.GetValue("_version", typeof(Version));
     _servicePack = information.GetString("_servicePack");
 }
Example #9
0
		private OperatingSystem (SerializationInfo information, StreamingContext context)
		{
			_platform = (System.PlatformID)information.GetValue("_platform", typeof(System.PlatformID));
			_version = (Version)information.GetValue("_version", typeof(Version));
			_servicePack = information.GetString("_servicePack");
		}