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); }
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); }
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; }