OpenTween.MySpecialPath.UserAppDataPath C# (CSharp) Method

UserAppDataPath() public static method

public static UserAppDataPath ( ) : string
return string
        public static string UserAppDataPath()
        {
            return GetFileSystemPath(Environment.SpecialFolder.ApplicationData);
        }

Same methods

MySpecialPath::UserAppDataPath ( string productName ) : string

Usage Example

Esempio n. 1
0
        private static bool SetConfigDirectoryPath()
        {
            string configDir;

            if (StartupOptions.TryGetValue("configDir", out configDir) && !string.IsNullOrEmpty(configDir))
            {
                // 起動オプション /configDir で設定ファイルの参照先を変更できます
                if (!Directory.Exists(configDir))
                {
                    var text = string.Format(Properties.Resources.ConfigDirectoryNotExist, configDir);
                    MessageBox.Show(text, Application.ProductName, MessageBoxButtons.OK, MessageBoxIcon.Error);
                    return(false);
                }

                MyCommon.settingPath = Path.GetFullPath(configDir);
            }
            else
            {
                if (File.Exists(Path.Combine(Application.StartupPath, "roaming")))
                {
                    MyCommon.settingPath = MySpecialPath.UserAppDataPath();
                }
                else
                {
                    MyCommon.settingPath = Application.StartupPath;
                }
            }

            return(true);
        }
All Usage Examples Of OpenTween.MySpecialPath::UserAppDataPath