public static void Initialize()
        {
            SetProcessDPIAware();

            NetFrameworkShim.SetShimImpl(new Shim.FullNetFrameworkShim());
            new WindowsRuntimePlatformInfo();

            //Make sure the paths are setup correctly on windows to find 32/64 bit binaries.
            try
            {
                //Check bitness and determine path
                String executionPath = Path.GetDirectoryName(Assembly.GetEntryAssembly().Location);
                String nativeLibPath;
                if (Environment.Is64BitProcess)
                {
                    nativeLibPath = Path.Combine(executionPath, "x64");
                }
                else
                {
                    nativeLibPath = Path.Combine(executionPath, "x86");
                }
                if (Directory.Exists(nativeLibPath))
                {
                    RuntimePlatformInfo.addPath(nativeLibPath);
                }
            }
            catch (Exception) { }

            //Find tabtip, this has a lot of combos since we have to run the 64 bit version on 64 bit oses even if the current process is 32 bit
            String tabTipLoc = null;

            if (Environment.Is64BitOperatingSystem)
            {
                tabTipLoc = Path.Combine(Environment.GetFolderPath(Environment.SpecialFolder.CommonProgramFiles), "Microsoft Shared\\ink\\TabTip.exe");
                if (!Environment.Is64BitProcess)
                {
                    //Hacky, but should help find the 64 bit tabtip when running as 32 bit on a 64 bit os
                    tabTipLoc = tabTipLoc.Replace(" (x86)", "");
                }
            }
            else
            {
                tabTipLoc = Path.Combine(Environment.GetFolderPath(Environment.SpecialFolder.CommonProgramFiles), "Microsoft Shared\\ink\\TabTip32.exe");
            }

            if (File.Exists(tabTipLoc))
            {
                Win32Window_setKeyboardPathAndWindow(tabTipLoc, "IPTip_Main_Window");
            }
        }
Beispiel #2
0
 static AndroidActivity()
 {
     NetFrameworkShim.SetShimImpl(new FullNetFrameworkShim());
 }