1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586 |
- using System;
- using System.IO;
- using System.Reflection;
- using System.Windows.Forms;
- using Update.Util;
- namespace Update.Config
- {
-
-
-
- public static class AppConfig
- {
- private static string m_Temp;
-
-
-
- public static string Temp
- {
- get
- {
- return m_Temp ?? (m_Temp = Path.GetTempPath());
- }
- }
- private static string m_AssemblyPath;
-
-
-
- public static string AssemblyPath
- {
- get
- {
- return m_AssemblyPath ?? (m_AssemblyPath = Assembly.GetExecutingAssembly().Location);
- }
- }
- private static string m_ExecutablePath;
-
-
-
- public static string ExecutablePath
- {
- get
- {
- return m_ExecutablePath ?? (m_ExecutablePath = Application.ExecutablePath);
- }
- }
- private static string m_ExecutableDirectory;
-
-
-
- public static string ExecutableDirectory
- {
- get
- {
- return m_ExecutableDirectory ?? (m_ExecutableDirectory = AppDomain.CurrentDomain.BaseDirectory);
- }
- }
- private static string m_FileName;
-
-
-
- public static string FileName
- {
- get
- {
- return m_FileName ?? (m_FileName = Path.GetFileName(ExecutablePath));
- }
- }
- private static string m_ExpectExecutablePath;
-
-
-
- public static string ExpectExecutablePath
- {
- get
- {
- return m_ExpectExecutablePath ?? (m_ExpectExecutablePath = FilePathUtil.GetAbsolutePath(FileName, Temp));
- }
- }
- }
- }
|