using strong typing for setting

This commit is contained in:
Perfare 2020-03-25 11:18:12 +08:00
parent 14f47c6d30
commit 5c193c761a
6 changed files with 78 additions and 84 deletions

View File

@ -183,21 +183,21 @@
<ItemGroup Condition="'$(Platform)' == 'x86'"> <ItemGroup Condition="'$(Platform)' == 'x86'">
<ContentWithTargetPath Include="Libraries\x86\fmod.dll"> <ContentWithTargetPath Include="Libraries\x86\fmod.dll">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
<TargetPath>fmod.dll</TargetPath> <TargetPath>fmod.dll</TargetPath>
</ContentWithTargetPath> </ContentWithTargetPath>
<ContentWithTargetPath Include="Libraries\x86\libfbxsdk.dll"> <ContentWithTargetPath Include="Libraries\x86\libfbxsdk.dll">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
<TargetPath>libfbxsdk.dll</TargetPath> <TargetPath>libfbxsdk.dll</TargetPath>
</ContentWithTargetPath> </ContentWithTargetPath>
</ItemGroup> </ItemGroup>
<ItemGroup Condition="'$(Platform)' == 'x64'"> <ItemGroup Condition="'$(Platform)' == 'x64'">
<ContentWithTargetPath Include="Libraries\x64\fmod.dll"> <ContentWithTargetPath Include="Libraries\x64\fmod.dll">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
<TargetPath>fmod.dll</TargetPath> <TargetPath>fmod.dll</TargetPath>
</ContentWithTargetPath> </ContentWithTargetPath>
<ContentWithTargetPath Include="Libraries\x64\libfbxsdk.dll"> <ContentWithTargetPath Include="Libraries\x64\libfbxsdk.dll">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
<TargetPath>libfbxsdk.dll</TargetPath> <TargetPath>libfbxsdk.dll</TargetPath>
</ContentWithTargetPath> </ContentWithTargetPath>
</ItemGroup> </ItemGroup>
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" /> <Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />

View File

@ -147,7 +147,7 @@ namespace AssetStudioGUI
var tempDic = new Dictionary<Object, AssetItem>(); var tempDic = new Dictionary<Object, AssetItem>();
if (!dontBuildAssetListMenuItem.Checked) if (!dontBuildAssetListMenuItem.Checked)
{ {
BuildAssetList(tempDic, displayAll.Checked, displayOriginalName.Checked, out productName); BuildAssetList(tempDic, out productName);
} }
List<TreeNode> treeNodeCollection = null; List<TreeNode> treeNodeCollection = null;
@ -412,7 +412,7 @@ namespace AssetStudioGUI
PreviewAsset(lastLoadedAsset); PreviewAsset(lastLoadedAsset);
} }
Properties.Settings.Default["enablePreview"] = enablePreview.Checked; Properties.Settings.Default.enablePreview = enablePreview.Checked;
Properties.Settings.Default.Save(); Properties.Settings.Default.Save();
} }
@ -427,7 +427,7 @@ namespace AssetStudioGUI
assetInfoLabel.Visible = false; assetInfoLabel.Visible = false;
} }
Properties.Settings.Default["displayInfo"] = displayInfo.Checked; Properties.Settings.Default.displayInfo = displayInfo.Checked;
Properties.Settings.Default.Save(); Properties.Settings.Default.Save();
} }
@ -439,7 +439,7 @@ namespace AssetStudioGUI
private void assetGroupOptions_SelectedIndexChanged(object sender, EventArgs e) private void assetGroupOptions_SelectedIndexChanged(object sender, EventArgs e)
{ {
Properties.Settings.Default["assetGroupOption"] = ((ToolStripComboBox)sender).SelectedIndex; Properties.Settings.Default.assetGroupOption = ((ToolStripComboBox)sender).SelectedIndex;
Properties.Settings.Default.Save(); Properties.Settings.Default.Save();
} }
@ -1489,12 +1489,12 @@ namespace AssetStudioGUI
{ {
Thread.CurrentThread.CurrentCulture = new CultureInfo("en-US"); Thread.CurrentThread.CurrentCulture = new CultureInfo("en-US");
InitializeComponent(); InitializeComponent();
displayOriginalName.Checked = (bool)Properties.Settings.Default["displayOriginalName"]; displayOriginalName.Checked = Properties.Settings.Default.displayOriginalName;
displayAll.Checked = (bool)Properties.Settings.Default["displayAll"]; displayAll.Checked = Properties.Settings.Default.displayAll;
displayInfo.Checked = (bool)Properties.Settings.Default["displayInfo"]; displayInfo.Checked = Properties.Settings.Default.displayInfo;
enablePreview.Checked = (bool)Properties.Settings.Default["enablePreview"]; enablePreview.Checked = Properties.Settings.Default.enablePreview;
openAfterExport.Checked = (bool)Properties.Settings.Default["openAfterExport"]; openAfterExport.Checked = Properties.Settings.Default.openAfterExport;
assetGroupOptions.SelectedIndex = (int)Properties.Settings.Default["assetGroupOption"]; assetGroupOptions.SelectedIndex = Properties.Settings.Default.assetGroupOption;
FMODinit(); FMODinit();
Logger.Default = new GUILogger(StatusStripUpdate); Logger.Default = new GUILogger(StatusStripUpdate);
@ -1832,7 +1832,7 @@ namespace AssetStudioGUI
if (saveFolderDialog1.ShowDialog(this) == DialogResult.OK) if (saveFolderDialog1.ShowDialog(this) == DialogResult.OK)
{ {
var exportPath = saveFolderDialog1.Folder + "\\Animator\\"; var exportPath = saveFolderDialog1.Folder + "\\Animator\\";
ExportAnimatorWithAnimationClip(animator, animationList, exportPath, openAfterExport.Checked); ExportAnimatorWithAnimationClip(animator, animationList, exportPath);
} }
} }
} }
@ -1864,7 +1864,7 @@ namespace AssetStudioGUI
animationList = null; animationList = null;
} }
} }
ExportObjectsWithAnimationClip(exportPath, sceneTreeView.Nodes, openAfterExport.Checked, animationList); ExportObjectsWithAnimationClip(exportPath, sceneTreeView.Nodes, animationList);
} }
} }
else else
@ -1905,7 +1905,7 @@ namespace AssetStudioGUI
animationList = null; animationList = null;
} }
} }
ExportObjectsMergeWithAnimationClip(exportPath, openAfterExport.Checked, gameObjects, animationList); ExportObjectsMergeWithAnimationClip(exportPath, gameObjects, animationList);
} }
} }
} }
@ -1973,7 +1973,7 @@ namespace AssetStudioGUI
if (saveFolderDialog1.ShowDialog(this) == DialogResult.OK) if (saveFolderDialog1.ShowDialog(this) == DialogResult.OK)
{ {
var savePath = saveFolderDialog1.Folder + "\\"; var savePath = saveFolderDialog1.Folder + "\\";
ExportSplitObjects(savePath, sceneTreeView.Nodes, openAfterExport.Checked); ExportSplitObjects(savePath, sceneTreeView.Nodes);
} }
} }
else else
@ -2044,7 +2044,7 @@ namespace AssetStudioGUI
toExportAssets = visibleAssets; toExportAssets = visibleAssets;
break; break;
} }
Studio.ExportAssets(saveFolderDialog1.Folder, toExportAssets, assetGroupOptions.SelectedIndex, openAfterExport.Checked, exportType); Studio.ExportAssets(saveFolderDialog1.Folder, toExportAssets, exportType);
} }
} }
else else

View File

@ -15,9 +15,9 @@ namespace AssetStudioGUI
public ExportOptions() public ExportOptions()
{ {
InitializeComponent(); InitializeComponent();
converttexture.Checked = (bool)Properties.Settings.Default["convertTexture"]; converttexture.Checked = Properties.Settings.Default.convertTexture;
convertAudio.Checked = (bool)Properties.Settings.Default["convertAudio"]; convertAudio.Checked = Properties.Settings.Default.convertAudio;
var str = (string)Properties.Settings.Default["convertType"]; var str = Properties.Settings.Default.convertType;
foreach (Control c in panel1.Controls) foreach (Control c in panel1.Controls)
{ {
if (c.Text == str) if (c.Text == str)
@ -26,42 +26,42 @@ namespace AssetStudioGUI
break; break;
} }
} }
eulerFilter.Checked = (bool)Properties.Settings.Default["eulerFilter"]; eulerFilter.Checked = Properties.Settings.Default.eulerFilter;
filterPrecision.Value = (decimal)Properties.Settings.Default["filterPrecision"]; filterPrecision.Value = Properties.Settings.Default.filterPrecision;
exportAllNodes.Checked = (bool)Properties.Settings.Default["exportAllNodes"]; exportAllNodes.Checked = Properties.Settings.Default.exportAllNodes;
exportSkins.Checked = (bool)Properties.Settings.Default["exportSkins"]; exportSkins.Checked = Properties.Settings.Default.exportSkins;
exportAnimations.Checked = (bool)Properties.Settings.Default["exportAnimations"]; exportAnimations.Checked = Properties.Settings.Default.exportAnimations;
exportBlendShape.Checked = (bool)Properties.Settings.Default["exportBlendShape"]; exportBlendShape.Checked = Properties.Settings.Default.exportBlendShape;
castToBone.Checked = (bool)Properties.Settings.Default["castToBone"]; castToBone.Checked = Properties.Settings.Default.castToBone;
boneSize.Value = (decimal)Properties.Settings.Default["boneSize"]; boneSize.Value = Properties.Settings.Default.boneSize;
scaleFactor.Value = (decimal)Properties.Settings.Default["scaleFactor"]; scaleFactor.Value = Properties.Settings.Default.scaleFactor;
fbxVersion.SelectedIndex = (int)Properties.Settings.Default["fbxVersion"]; fbxVersion.SelectedIndex = Properties.Settings.Default.fbxVersion;
fbxFormat.SelectedIndex = (int)Properties.Settings.Default["fbxFormat"]; fbxFormat.SelectedIndex = Properties.Settings.Default.fbxFormat;
} }
private void OKbutton_Click(object sender, EventArgs e) private void OKbutton_Click(object sender, EventArgs e)
{ {
Properties.Settings.Default["convertTexture"] = converttexture.Checked; Properties.Settings.Default.convertTexture = converttexture.Checked;
Properties.Settings.Default["convertAudio"] = convertAudio.Checked; Properties.Settings.Default.convertAudio = convertAudio.Checked;
foreach (Control c in panel1.Controls) foreach (Control c in panel1.Controls)
{ {
if (((RadioButton)c).Checked) if (((RadioButton)c).Checked)
{ {
Properties.Settings.Default["convertType"] = c.Text; Properties.Settings.Default.convertType = c.Text;
break; break;
} }
} }
Properties.Settings.Default["eulerFilter"] = eulerFilter.Checked; Properties.Settings.Default.eulerFilter = eulerFilter.Checked;
Properties.Settings.Default["filterPrecision"] = filterPrecision.Value; Properties.Settings.Default.filterPrecision = filterPrecision.Value;
Properties.Settings.Default["exportAllNodes"] = exportAllNodes.Checked; Properties.Settings.Default.exportAllNodes = exportAllNodes.Checked;
Properties.Settings.Default["exportSkins"] = exportSkins.Checked; Properties.Settings.Default.exportSkins = exportSkins.Checked;
Properties.Settings.Default["exportAnimations"] = exportAnimations.Checked; Properties.Settings.Default.exportAnimations = exportAnimations.Checked;
Properties.Settings.Default["exportBlendShape"] = exportBlendShape.Checked; Properties.Settings.Default.exportBlendShape = exportBlendShape.Checked;
Properties.Settings.Default["castToBone"] = castToBone.Checked; Properties.Settings.Default.castToBone = castToBone.Checked;
Properties.Settings.Default["boneSize"] = boneSize.Value; Properties.Settings.Default.boneSize = boneSize.Value;
Properties.Settings.Default["scaleFactor"] = scaleFactor.Value; Properties.Settings.Default.scaleFactor = scaleFactor.Value;
Properties.Settings.Default["fbxVersion"] = fbxVersion.SelectedIndex; Properties.Settings.Default.fbxVersion = fbxVersion.SelectedIndex;
Properties.Settings.Default["fbxFormat"] = fbxFormat.SelectedIndex; Properties.Settings.Default.fbxFormat = fbxFormat.SelectedIndex;
Properties.Settings.Default.Save(); Properties.Settings.Default.Save();
DialogResult = DialogResult.OK; DialogResult = DialogResult.OK;
Close(); Close();

View File

@ -13,14 +13,13 @@ namespace AssetStudioGUI
public static bool ExportTexture2D(AssetItem item, string exportPathName) public static bool ExportTexture2D(AssetItem item, string exportPathName)
{ {
var m_Texture2D = (Texture2D)item.Asset; var m_Texture2D = (Texture2D)item.Asset;
var convertTexture = (bool)Properties.Settings.Default["convertTexture"]; if (Properties.Settings.Default.convertTexture)
if (convertTexture)
{ {
var bitmap = m_Texture2D.ConvertToBitmap(true); var bitmap = m_Texture2D.ConvertToBitmap(true);
if (bitmap == null) if (bitmap == null)
return false; return false;
ImageFormat format = null; ImageFormat format = null;
var ext = (string)Properties.Settings.Default["convertType"]; var ext = Properties.Settings.Default.convertType;
bool tga = false; bool tga = false;
switch (ext) switch (ext)
{ {
@ -66,9 +65,8 @@ namespace AssetStudioGUI
var m_AudioData = m_AudioClip.m_AudioData.Value; var m_AudioData = m_AudioClip.m_AudioData.Value;
if (m_AudioData == null || m_AudioData.Length == 0) if (m_AudioData == null || m_AudioData.Length == 0)
return false; return false;
var convertAudio = (bool)Properties.Settings.Default["convertAudio"];
var converter = new AudioClipConverter(m_AudioClip); var converter = new AudioClipConverter(m_AudioClip);
if (convertAudio && converter.IsFMODSupport) if (Properties.Settings.Default.convertAudio && converter.IsFMODSupport)
{ {
var exportFullName = exportPath + item.Text + ".wav"; var exportFullName = exportPath + item.Text + ".wav";
if (ExportFileExists(exportFullName)) if (ExportFileExists(exportFullName))
@ -261,7 +259,7 @@ namespace AssetStudioGUI
public static bool ExportSprite(AssetItem item, string exportPath) public static bool ExportSprite(AssetItem item, string exportPath)
{ {
ImageFormat format = null; ImageFormat format = null;
var type = (string)Properties.Settings.Default["convertType"]; var type = Properties.Settings.Default.convertType;
bool tga = false; bool tga = false;
switch (type) switch (type)
{ {
@ -341,17 +339,17 @@ namespace AssetStudioGUI
private static void ExportFbx(IImported convert, string exportPath) private static void ExportFbx(IImported convert, string exportPath)
{ {
var eulerFilter = (bool)Properties.Settings.Default["eulerFilter"]; var eulerFilter = Properties.Settings.Default.eulerFilter;
var filterPrecision = (float)(decimal)Properties.Settings.Default["filterPrecision"]; var filterPrecision = (float)Properties.Settings.Default.filterPrecision;
var exportAllNodes = (bool)Properties.Settings.Default["exportAllNodes"]; var exportAllNodes = Properties.Settings.Default.exportAllNodes;
var exportSkins = (bool)Properties.Settings.Default["exportSkins"]; var exportSkins = Properties.Settings.Default.exportSkins;
var exportAnimations = (bool)Properties.Settings.Default["exportAnimations"]; var exportAnimations = Properties.Settings.Default.exportAnimations;
var exportBlendShape = (bool)Properties.Settings.Default["exportBlendShape"]; var exportBlendShape = Properties.Settings.Default.exportBlendShape;
var castToBone = (bool)Properties.Settings.Default["castToBone"]; var castToBone = Properties.Settings.Default.castToBone;
var boneSize = (int)(decimal)Properties.Settings.Default["boneSize"]; var boneSize = (int)Properties.Settings.Default.boneSize;
var scaleFactor = (float)(decimal)Properties.Settings.Default["scaleFactor"]; var scaleFactor = (float)Properties.Settings.Default.scaleFactor;
var fbxVersion = (int)Properties.Settings.Default["fbxVersion"]; var fbxVersion = Properties.Settings.Default.fbxVersion;
var fbxFormat = (int)Properties.Settings.Default["fbxFormat"]; var fbxFormat = Properties.Settings.Default.fbxFormat;
ModelExporter.ExportFbx(exportPath, convert, eulerFilter, filterPrecision, ModelExporter.ExportFbx(exportPath, convert, eulerFilter, filterPrecision,
exportAllNodes, exportSkins, exportAnimations, exportBlendShape, castToBone, boneSize, scaleFactor, fbxVersion, fbxFormat == 1); exportAllNodes, exportSkins, exportAnimations, exportBlendShape, castToBone, boneSize, scaleFactor, fbxVersion, fbxFormat == 1);
} }

View File

@ -12,7 +12,7 @@ namespace AssetStudioGUI.Properties {
[global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()] [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.VisualStudio.Editors.SettingsDesigner.SettingsSingleFileGenerator", "15.9.0.0")] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.VisualStudio.Editors.SettingsDesigner.SettingsSingleFileGenerator", "16.5.0.0")]
internal sealed partial class Settings : global::System.Configuration.ApplicationSettingsBase { internal sealed partial class Settings : global::System.Configuration.ApplicationSettingsBase {
private static Settings defaultInstance = ((Settings)(global::System.Configuration.ApplicationSettingsBase.Synchronized(new Settings()))); private static Settings defaultInstance = ((Settings)(global::System.Configuration.ApplicationSettingsBase.Synchronized(new Settings())));

View File

@ -96,7 +96,7 @@ namespace AssetStudioGUI
return extractedCount; return extractedCount;
} }
public static void BuildAssetList(Dictionary<Object, AssetItem> tempDic, bool displayAll, bool displayOriginalName, out string productName) public static void BuildAssetList(Dictionary<Object, AssetItem> tempDic, out string productName)
{ {
StatusStripUpdate("Building asset list..."); StatusStripUpdate("Building asset list...");
@ -192,18 +192,14 @@ namespace AssetStudioGUI
} }
//处理非法文件名 //处理非法文件名
assetItem.Text = FixFileName(assetItem.Text); assetItem.Text = FixFileName(assetItem.Text);
if (displayAll) if (Properties.Settings.Default.displayAll || exportable)
{
exportable = true;
}
if (exportable)
{ {
tempExportableAssets.Add(assetItem); tempExportableAssets.Add(assetItem);
} }
Progress.Report(++j, progressCount); Progress.Report(++j, progressCount);
} }
if (displayOriginalName && ab != null) if (Properties.Settings.Default.displayOriginalName && ab != null)
{ {
foreach (var item in tempExportableAssets) foreach (var item in tempExportableAssets)
{ {
@ -351,7 +347,7 @@ namespace AssetStudioGUI
return Path.GetInvalidFileNameChars().Aggregate(str, (current, c) => current.Replace(c, '_')); return Path.GetInvalidFileNameChars().Aggregate(str, (current, c) => current.Replace(c, '_'));
} }
public static void ExportAssets(string savePath, List<AssetItem> toExportAssets, int assetGroupSelectedIndex, bool openAfterExport, ExportType exportType) public static void ExportAssets(string savePath, List<AssetItem> toExportAssets, ExportType exportType)
{ {
ThreadPool.QueueUserWorkItem(state => ThreadPool.QueueUserWorkItem(state =>
{ {
@ -364,11 +360,11 @@ namespace AssetStudioGUI
foreach (var asset in toExportAssets) foreach (var asset in toExportAssets)
{ {
var exportpath = savePath + "\\"; var exportpath = savePath + "\\";
if (assetGroupSelectedIndex == 1) if (Properties.Settings.Default.assetGroupOption == 1)
{ {
exportpath += Path.GetFileNameWithoutExtension(asset.SourceFile.fullName) + "_export\\"; exportpath += Path.GetFileNameWithoutExtension(asset.SourceFile.fullName) + "_export\\";
} }
else if (assetGroupSelectedIndex == 0) else if (Properties.Settings.Default.assetGroupOption == 0)
{ {
exportpath = savePath + "\\" + asset.TypeString + "\\"; exportpath = savePath + "\\" + asset.TypeString + "\\";
} }
@ -487,14 +483,14 @@ namespace AssetStudioGUI
StatusStripUpdate(statusText); StatusStripUpdate(statusText);
if (openAfterExport && exportedCount > 0) if (Properties.Settings.Default.openAfterExport && exportedCount > 0)
{ {
Process.Start(savePath); Process.Start(savePath);
} }
}); });
} }
public static void ExportSplitObjects(string savePath, TreeNodeCollection nodes, bool openAfterExport) public static void ExportSplitObjects(string savePath, TreeNodeCollection nodes)
{ {
ThreadPool.QueueUserWorkItem(state => ThreadPool.QueueUserWorkItem(state =>
{ {
@ -547,7 +543,7 @@ namespace AssetStudioGUI
StatusStripUpdate($"Finished exporting {filename}.fbx"); StatusStripUpdate($"Finished exporting {filename}.fbx");
} }
} }
if (openAfterExport) if (Properties.Settings.Default.openAfterExport)
{ {
Process.Start(savePath); Process.Start(savePath);
} }
@ -564,7 +560,7 @@ namespace AssetStudioGUI
} }
} }
public static void ExportAnimatorWithAnimationClip(AssetItem animator, List<AssetItem> animationList, string exportPath, bool openAfterExport) public static void ExportAnimatorWithAnimationClip(AssetItem animator, List<AssetItem> animationList, string exportPath)
{ {
ThreadPool.QueueUserWorkItem(state => ThreadPool.QueueUserWorkItem(state =>
{ {
@ -573,7 +569,7 @@ namespace AssetStudioGUI
try try
{ {
ExportAnimator(animator, exportPath, animationList); ExportAnimator(animator, exportPath, animationList);
if (openAfterExport) if (Properties.Settings.Default.openAfterExport)
{ {
Process.Start(exportPath); Process.Start(exportPath);
} }
@ -588,7 +584,7 @@ namespace AssetStudioGUI
}); });
} }
public static void ExportObjectsWithAnimationClip(string exportPath, TreeNodeCollection nodes, bool openAfterExport, List<AssetItem> animationList = null) public static void ExportObjectsWithAnimationClip(string exportPath, TreeNodeCollection nodes, List<AssetItem> animationList = null)
{ {
ThreadPool.QueueUserWorkItem(state => ThreadPool.QueueUserWorkItem(state =>
{ {
@ -615,7 +611,7 @@ namespace AssetStudioGUI
Progress.Report(++i, count); Progress.Report(++i, count);
} }
if (openAfterExport) if (Properties.Settings.Default.openAfterExport)
{ {
Process.Start(exportPath); Process.Start(exportPath);
} }
@ -627,7 +623,7 @@ namespace AssetStudioGUI
}); });
} }
public static void ExportObjectsMergeWithAnimationClip(string exportPath, bool openAfterExport, List<GameObject> gameObjects, List<AssetItem> animationList = null) public static void ExportObjectsMergeWithAnimationClip(string exportPath, List<GameObject> gameObjects, List<AssetItem> animationList = null)
{ {
ThreadPool.QueueUserWorkItem(state => ThreadPool.QueueUserWorkItem(state =>
{ {
@ -645,7 +641,7 @@ namespace AssetStudioGUI
MessageBox.Show($"Export Model:{name} error\r\n{ex.Message}\r\n{ex.StackTrace}"); MessageBox.Show($"Export Model:{name} error\r\n{ex.Message}\r\n{ex.StackTrace}");
StatusStripUpdate("Error in export"); StatusStripUpdate("Error in export");
} }
if (openAfterExport) if (Properties.Settings.Default.openAfterExport)
{ {
Process.Start(Path.GetDirectoryName(exportPath)); Process.Start(Path.GetDirectoryName(exportPath));
} }