Microsoft .NET
-
[ASP.Net Core / Blazor] Swagger 연동Microsoft .NET/ASP.Net & ASP.Net Core 2020. 3. 16. 11:01
ASP.Net Core에서 Swagger 사용하기 - nuget에서 Swashbuckle.AspNetCore 설치 더보기 프로젝트 속성 - 빌드 - XML 문서 파일 항목 체크(summary값 xml로 출력) Startup.cs의 ConfigureServices 함수에 "#region Create Swagger Document" 붙여넣기 public void ConfigureServices(IServiceCollection services) { services.AddMvc().SetCompatibilityVersion(CompatibilityVersion.Version_2_1); //////////////////////////////////////////////////////////////////////..
-
[C#] OpenFileDialog, SaveFileDialog, CommonOpenFileDialog, ColorDialogMicrosoft .NET/C# 2020. 3. 10. 18:50
//폴더 경로 불러오기 - CommonOpenFileDialog var cofd = new Microsoft.WindowsAPICodePack.Dialogs.CommonOpenFileDialog() { IsFolderPicker = true }; if (cofd.ShowDialog() == Microsoft.WindowsAPICodePack.Dialogs.CommonFileDialogResult.Ok) { } //파일 경로 불러오기 - OpenFileDialog Microsoft.Win32.OpenFileDialog ofd = new Microsoft.Win32.OpenFileDialog() { Filter = "Png Files (*.png)|*.png| All Files(*.*)| *.*", //필터..
-
[ASP.Net Core] Synology Nas Docker에 ASP.Net Core 게시하기Microsoft .NET/ASP.Net & ASP.Net Core 2020. 1. 29. 19:02
준비물 : SynologyNas, putty, VisualStudio 1. ASP.Net Core 프로젝트 생성 [설정값 : ASP.NetCore 2.0, MVC, docker:Linux] 2. Dockerfile 값 변경 3. 프로젝트 게시 4. Synology Nas에 게시된 파일 업로드 및 Docker 설치 5. putty를 사용하여 SynologyNas에 설치 1. ASP.Net Core 프로젝트 생성 [설정값 : ASP.NetCore 2.0, MVC, docker:Linux] 2. Dockerfile 값 변경 FROM microsoft/aspnetcore:2.0.0 COPY . /app WORKDIR /app #7552 = 포트번호!! ENV ASPNETCORE_URLS http://*:7552..
-
[WPF] LiveCharts.WPF를 이용한 차트 그리기 (In xaml / In code)Microsoft .NET/WPF 2020. 1. 7. 18:07
NuGet : LiveCharts.Wpf https://lvcharts.net/ Xaml Code using System.Collections.Generic; using System.Windows; using System.Windows.Media; namespace WPF_Chart { /// /// MainWindow.xaml에 대한 상호 작용 논리 /// public partial class MainWindow : Window { public MainWindow() { InitializeComponent(); //범례 위치 설정 chart.LegendLocation = LiveCharts.LegendLocation.Top; //세로 눈금 값 설정 chart.AxisY.Add(new LiveCharts..
-
[C#] 폴더 압축 / 다중 파일 압축 / 압축 해제Microsoft .NET/C# 2020. 1. 6. 15:57
1. 폴더 압축 //폴더 압축 string folderPath = folderSelectorDialog.FileName; string savePath = folderSelectorDialog.FileName + ".zip"; System.IO.Compression.ZipFile.CreateFromDirectory(folderPath, savePath); 2. 다중 파일 압축 private void btnCompress_Multiple_Click(object sender, RoutedEventArgs e) { Microsoft.Win32.OpenFileDialog ofd = new Microsoft.Win32.OpenFileDialog() { Multiselect = true}; if (ofd.ShowDi..
-
[C#] 16진수(hex) 문자열<-> Byte[] 변환Microsoft .NET/C# 2020. 1. 3. 20:02
1. 16진수 문자열 -> Byte[] /// /// 16진수 문자를 16진수 Byte[]로 변환 /// /// /// /// public byte[] HexStringToByteHex(string strHex) { if (strHex.Length % 2 != 0) MessageBox.Show("HexString는 홀수일 수 없습니다. - " + strHex); byte[] bytes = new byte[strHex.Length / 2]; for (int count = 0; count < strHex.Length; count += 2) { bytes[count / 2] = System.Convert.ToByte(strHex.Substring(count, 2), 16); } return bytes; } 2..
-
[C#] 어셈블리 정보를 이용한 버전 관리, 자동 증가, 빌드 시간 변환Microsoft .NET/C# 2019. 10. 31. 17:53
어셈블리의 버전 정보는 다음 네 가지 값으로 구성됨. 예 ) 1.0.0.15 주 버전 1 부 버전 0 빌드 번호 0 수정 버전 15 어셈블리에 저장된 버전 정보를 불러오는 방법은 아래와 같습니다. System.Reflection.Assembly.GetExecutingAssembly().GetName().Version.ToString(); 어셈블리 버전은 기본적으로 수동으로 변경하여 사용이 가능하지만 자동으로 증가하도록 설정이 가능. 어셈블리 정보 자동 변경 설정 .Net Framework의 경우 더보기 1. AssemblyInfo.cs 파일의 제일 하단으로 이동 2. "[assembly: AssemblyVersion("1.0.0.0")]", "[assembly: AssemblyFileVersion("1...