コード例 #1
0
        internal static GitSccOptions LoadFromConfig()
        {
            var options = new GitSccOptions();

            options.GitBashPath      = LoadStringFromConfig("GitBashPath");
            options.GitExtensionPath = LoadStringFromConfig("GitExtensionPath");
            options.DifftoolPath     = LoadStringFromConfig("DifftoolPath");
            options.TortoiseGitPath  = LoadStringFromConfig("TortoiseGitPath");

            //get bools
            options.NotExpandTortoiseGit   = LoadBoolFromConfig("NotExpandTortoiseGit");
            options.NotExpandGitExtensions = LoadBoolFromConfig("NotExpandGitExtensions");
            options.UseTGitIconSet         = LoadBoolFromConfig("UseTGitIconSet");
            options.DisableAutoRefresh     = LoadBoolFromConfig("DisableAutoRefresh", true);
            options.DisableAutoLoad        = LoadBoolFromConfig("DisableAutoLoad", true);
            options.NotUseUTF8FileNames    = LoadBoolFromConfig("NotUseUTF8FileNames");
            options.DisableDiffMargin      = LoadBoolFromConfig("DisableDiffMargin", true);
            options.UseVsDiff       = LoadBoolFromConfig("UseVsDiff");
            options.AutoAddFiles    = LoadBoolFromConfig("AutoAddFiles");
            options.AutoAddProjects = LoadBoolFromConfig("AutoAddProjects");

            options.DiffTool = (DiffTools)LoadIntFromConfig("DiffTool");
            options.Init();

            return(options);
        }
コード例 #2
0
        internal static GitSccOptions LoadFromConfig()
        {
            GitSccOptions options = null;


            if (File.Exists(configFileName))
            {
                try
                {
                    XmlSerializer serializer = new XmlSerializer(typeof(GitSccOptions));
                    using (TextReader tr = new StreamReader(configFileName))
                    {
                        options = (GitSccOptions)serializer.Deserialize(tr);
                    }
                }
                catch
                {
                }
            }

            if (options == null)
            {
                options = new GitSccOptions();
            }

            options.Init();

            return(options);
        }
コード例 #3
0
ファイル: GitSccOptions.cs プロジェクト: Rwing/git-tools
        public static GitSccOptions LoadFromConfig()
        {
            GitSccOptions options = null;


            if (File.Exists(configFileName))
            {
                try
                {
                    XmlSerializer serializer = new XmlSerializer(typeof(GitSccOptions));
                    using (TextReader tr = new StreamReader(configFileName))
                    {
                        options = (GitSccOptions)serializer.Deserialize(tr);
                    }
                }
                catch
                {
                }
            }

            if (options == null) options = new GitSccOptions();

            options.Init();

            return options;
        }