private void InitializeConfigDirectory(string configDirectory) { if (!String.IsNullOrEmpty(configDirectory)) { this.configDirectory = configDirectory; } else if (String.IsNullOrEmpty(this.configDirectory)) { this.configDirectory = ApplicationPaths.AppDataPath(); } }
private void ClearDefaultValues() { if (workingApplicationConfiguration.LogFilePath.Equals(ApplicationPaths.AppDataPath())) { workingApplicationConfiguration.LogFilePath = String.Empty; } if (workingPathConfiguration.SharedConfigPath.Equals(ApplicationPaths.AppDataPath())) { workingPathConfiguration.SharedConfigPath = String.Empty; } }
private void CopyLogFilesIfChanged() { string originalPath = applicationConfiguration.LogFilePath; if (string.IsNullOrEmpty(originalPath)) { originalPath = ApplicationPaths.AppDataPath(); } if (!originalPath.Equals(workingApplicationConfiguration.LogFilePath, StringComparison.OrdinalIgnoreCase)) { FileCopier.CopyFilesToFolder(originalPath, workingApplicationConfiguration.LogFilePath, "*.json"); } }
public AdvancedSettingsForm(Application applicationConfiguration, Paths pathConfiguration) { InitializeComponent(); this.applicationConfiguration = applicationConfiguration; workingApplicationConfiguration = ObjectCopier.CloneObject <Application, Application>(applicationConfiguration); this.pathConfiguration = pathConfiguration; workingPathConfiguration = ObjectCopier.CloneObject <Paths, Paths>(pathConfiguration); if (String.IsNullOrEmpty(workingApplicationConfiguration.LogFilePath)) { workingApplicationConfiguration.LogFilePath = ApplicationPaths.AppDataPath(); } if (String.IsNullOrEmpty(workingPathConfiguration.SharedConfigPath)) { workingPathConfiguration.SharedConfigPath = ApplicationPaths.AppDataPath(); } }
private static string DeviceConfigurationsFileName() { return(Path.Combine(ApplicationPaths.AppDataPath(), "DeviceConfigurations.xml")); }
private static string PathConfigurationFileName() { return(Path.Combine(ApplicationPaths.AppDataPath(), "PathConfiguration.xml")); }
private static string NetworkDevicesConfigurationFileName() { return(Path.Combine(ApplicationPaths.AppDataPath(), "NetworkDevicesConfiguration.xml")); }