예제 #1
0
파일: Main.cs 프로젝트: xiaoqz/Wox
 private static void preloadPrograms()
 {
     Logger.StopWatchNormal("Preload programs cost", () =>
     {
         _win32Storage = new BinaryStorage <Win32[]>("Win32");
         _win32s       = _win32Storage.TryLoad(new Win32[] { });
         _uwpStorage   = new BinaryStorage <UWP.Application[]>("UWP");
         _uwps         = _uwpStorage.TryLoad(new UWP.Application[] { });
     });
     Logger.WoxInfo($"Number of preload win32 programs <{_win32s.Length}>");
     Logger.WoxInfo($"Number of preload uwps <{_uwps.Length}>");
 }
예제 #2
0
파일: Alphabet.cs 프로젝트: z356925429/Wox
        private void InitializePinyinHelpers()
        {
            Format.setToneType(HanyuPinyinToneType.WITHOUT_TONE);

            Logger.StopWatchNormal("Preload pinyin cache", () =>
            {
                _pinyinStorage = new BinaryStorage <ConcurrentDictionary <string, string[][]> >("Pinyin");
                PinyinCache    = _pinyinStorage.TryLoad(new ConcurrentDictionary <string, string[][]>());

                // force pinyin library static constructor initialize
                PinyinHelper.toHanyuPinyinStringArray('T', Format);
            });
            Logger.WoxInfo($"Number of preload pinyin combination<{PinyinCache.Count}>");
        }