You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
29 lines
714 B
29 lines
714 B
3 years ago
|
using System;
|
||
|
using System.Collections.Generic;
|
||
|
using System.Text;
|
||
|
using System.IO;
|
||
|
using System.Reflection;
|
||
|
using System.Windows.Forms;
|
||
|
|
||
|
namespace PDAForm.Comm
|
||
|
{
|
||
|
public class MyFileManager
|
||
|
{
|
||
|
/// <summary>
|
||
|
/// 读取当前应用程序的路径
|
||
|
/// </summary>
|
||
|
/// <returns></returns>
|
||
|
public static string GetApplicationPath()
|
||
|
{
|
||
|
string path;
|
||
|
path = Path.GetDirectoryName(Assembly.GetExecutingAssembly().GetName().CodeBase);
|
||
|
path = path.Replace(@"file:\", "");
|
||
|
if (path.Substring(path.Length - 1, 1) != @"\")
|
||
|
{
|
||
|
path += @"\";
|
||
|
}
|
||
|
return path;
|
||
|
}
|
||
|
}
|
||
|
}
|