コード例 #1
0
ファイル: Program.cs プロジェクト: Z1ni/ShareX
        private static void CheckPersonalPathConfig()
        {
            string customPersonalPath = ReadPersonalPathConfig();

            if (!string.IsNullOrEmpty(customPersonalPath))
            {
                CustomPersonalPath = Path.GetFullPath(customPersonalPath);

                if (CustomPersonalPath.Equals(PortablePersonalPath, StringComparison.InvariantCultureIgnoreCase))
                {
                    IsPortable = true;
                }
            }
        }
コード例 #2
0
        private static void CheckPersonalPathConfig()
        {
            string customPersonalPath = ReadPersonalPathConfig();

            if (!string.IsNullOrEmpty(customPersonalPath))
            {
                customPersonalPath = Environment.ExpandEnvironmentVariables(customPersonalPath);
                CustomPersonalPath = Helpers.GetAbsolutePath(customPersonalPath);

                if (CustomPersonalPath.Equals(PortablePersonalPath, StringComparison.InvariantCultureIgnoreCase))
                {
                    IsPortable = true;
                }
            }
        }
コード例 #3
0
        private static void CheckPersonalPathConfig()
        {
            if (File.Exists(PersonalPathConfig))
            {
                string customPersonalPath = File.ReadAllText(PersonalPathConfig, Encoding.UTF8).Trim();

                if (!string.IsNullOrEmpty(customPersonalPath))
                {
                    CustomPersonalPath = Path.GetFullPath(customPersonalPath);

                    if (CustomPersonalPath.Equals(PortablePersonalPath, StringComparison.InvariantCultureIgnoreCase))
                    {
                        IsPortable = true;
                    }
                }
            }
        }