private void Save_Location_Excel_Click(object sender, RoutedEventArgs e) { Save_Location_Excel.IsEnabled = false; ConfigExcelFormat.TitleColumn = (char)CB_TitleColumn.SelectedItem; ConfigExcelFormat.ContentColumn = (char)CB_DescriptionColumn.SelectedItem; UserControlRecordBinding.TitleToolTip = ConfigExcelFormat.TitleColumn.ToString(); UserControlRecordBinding.ContentToolTip = ConfigExcelFormat.ContentColumn.ToString(); ConfigExcelFormat.Save(); if (Save_Location_Excel_State != null) { Save_Location_Excel_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(); } }