private void Save_LogPath_Click(object sender, RoutedEventArgs e) { Save_LogPath.IsEnabled = false; ConfigLogSave.Save(); if (Save_LogPath_State != null) { Save_LogPath_State.Visibility = Visibility.Visible; } }
private void InitConfiguration() { //Init ExcelFormat if (!File.Exists(System.IO.Path.Combine(WorkPath.ConfigrationPath, WorkPath.ConfigExcelFormatSaveFilePath))) { ConfigExcelFormat.TitleColumn = 'A'; ConfigExcelFormat.ContentColumn = 'B'; ConfigExcelFormat.Save(); } else { ConfigExcelFormat.Load(); } //Init ContentFormat if (!File.Exists(System.IO.Path.Combine(WorkPath.ConfigrationPath, WorkPath.ConfigContentFormatSaveFilePath))) { ConfigContentFormat.Packaging(); } else { ConfigContentFormat.LoadTitle(); ConfigContentFormat.LoadContent(); ConfigContentFormat.Packaging(); } //Init LogPath if (!File.Exists(System.IO.Path.Combine(WorkPath.ConfigrationPath, WorkPath.ConfigLogSaveFilePath))) { ConfigLogSave.logPaths = new System.Collections.ObjectModel.ObservableCollection <LogPathStruct>(); ConfigLogSave.logPaths.Add(new LogPathStruct() { Name = "Name", SourcePath = "SourcePath", TargetPath = "TargetPath" }); } else { ConfigLogSave.Load(); } }