示例#1
0
        private void OnOpenInFileExplorer(object sender, RoutedEventArgs e)
        {
            try
            {
                var path = (this.DataContext as MacroDataVM).FilePath;

                if (System.IO.Directory.Exists(path))
                {
                    FileSystemUtils.BrowseFolderInExplorer(path);
                }
                else if (System.IO.File.Exists(path))
                {
                    FileSystemUtils.BrowseFileInExplorer(path);
                }
            }
            catch
            {
            }
        }