示例#1
0
            static object Do()
            {
                RealtimeUpdate.ClearCahces();
                FileIconUtility.DeleteAllThumbnails();

                return(null);
            }
示例#2
0
        private void Application_Startup(object sender, StartupEventArgs e)
        {
            if (DebugSwitch.ThreadCount)
            {
                timer = new Timer(new TimerCallback(p =>
                {
                    Debug.WriteLine("Current Thread Count is " + Process.GetCurrentProcess().Threads.Count);
                }), this, 0, 1000);
            }

#if !DEBUG
            FzLib.Program.Runtime.UnhandledException.RegistAll();
            FzLib.Program.Runtime.UnhandledException.UnhandledExceptionCatched += UnhandledException_UnhandledExceptionCatched;
#endif
            InitializeTheme();
            Current = this;
            SplashWindow.TryShow();

            FileIconUtility.UpdateSettings();

            MainWindow win = new MainWindow();
            MainWindow = win;
            win.Show();
            SplashWindow.TryClose();
        }
示例#3
0
        public object Convert(object value, Type targetType, object parameter, CultureInfo culture)
        {
            if (value == null)
            {
                return(FileIconUtility.FindIconForFilename("test", true));
            }

            var name = (string)value;

            return(FileIconUtility.FindIconForFilename(name, true));
        }
示例#4
0
        private async void ChangeThumbnailPositionButton_Click(object sender, RoutedEventArgs e)
        {
            if (await new ConfirmDialog().ShowAsync("更改缓存目录需要删除所有的缓存,是否继续?", "修改缓存目录"))
            {
                await DoSthNeedToCloseOtherWindowsAsync(Do);

                RefreshCacheText();
                await new MessageDialog().ShowAsync("更改完成。正在浏览的项目可能部分图标会无法显示,建议进行删除缩略图操作", "更改完成");
            }
            ;
            object Do()
            {
                RealtimeUpdate.ClearCahces();
                FileIconUtility.DeleteAllThumbnails();
                Configs.CacheInTempDir = !Configs.CacheInTempDir;
                FileIconUtility.UpdateSettings();

                return(null);
            }
        }