분류 전체보기
-
[WPF] hexColor to (Color or SolidColorBrush)Microsoft .NET/WPF 2021. 11. 24. 10:46
// Color Color color_1 = (Color)new BrushConverter().ConvertFrom("#CA5100"); //SolidColorBrush SolidColorBrush brush_1 = (SolidColorBrush)new BrushConverter().ConvertFrom("#CA5100"); //xamarin Xamarin.Essentials.ColorConverters.FromHex("#CA5100")
-
[C#] string 타입 형식지정Microsoft .NET/C# 2021. 10. 15. 14:31
public class Member { public string Id { get; set; } // 암호 형식 지정 [DataType(DataType.Password)] public string Pw { get; set; } // 이메일 형식 지정 [DataType(DataType.EmailAddress)] public string Email { get; set; } // 날짜 형식 지정 [DataType(DataType.Date)] public DateTime Birthday { get; set; } // Custom - 사용자 지정 데이터 유형을 나타냅니다. // DateTime - 시간의 순간을 나타내며, 날짜와 시간으로 표현됩니다. // Date - 날짜 값을 나타냅니다. // Time - 시간 ..
-
[ASP.Net Core] (작성중) 리눅스(centOS) Docker 에 ASP.Net Core 배포Microsoft .NET/ASP.Net & ASP.Net Core 2021. 8. 18. 18:44
1. 환경 설치 리눅스(centOS)에 Docker 설치 - https://docs.docker.com/engine/install/centos/ 리눅스(centOS)에 ASP.Net Core 설치 - https://docs.microsoft.com/ko-kr/dotnet/core/install/linux-centos 2. 로그인 및 배포파일 경로로 이동 ex) cd /[폴더경로1]/[폴더경로2].............. 3.1 스크립트 제작으로 일괄 진행 ① 스크립트 파일 생성 : vi [스크립트 파일명].sh ex) vi sample.sh ② 스크립트 내용 작성 (작성 후 esc -> :wq 입력) #!/bin/bash #기존 서비스 정지 docker stop online-api #기존 서비스 제거 d..
-
[ASP.Net Core] 접속자 IP 받기Microsoft .NET/ASP.Net & ASP.Net Core 2021. 7. 16. 14:35
"Startup.cs" 클래스의 "ConfigureServices 함수"에 아래 코드 추가 public void ConfigureServices(IServiceCollection services) { #region IP services.AddSingleton(); #endregion services.AddMvc().SetCompatibilityVersion(CompatibilityVersion.Version_2_1); } IP를 받을 Controller에 아래 코드를 추가하고 생성자 명을 본인 코드에 맞게 변경합니다. /// /// 생성자 /// /// public UserController(Microsoft.AspNetCore.Http.IHttpContextAccessor _acc) { HttpCont..
-
[C#] Thread, Thread 인자 전달, BeginInvoke, Invoke 복붙용Microsoft .NET/C# 2021. 3. 17. 11:05
Thread Thread th = new Thread(new ThreadStart(functionSample)); th.Start(); private void functionSample() { } Thread 인자 전달 // Type - 1 Thread th = new Thread(() => functionSample("전자기린", 29)); th.Start(); private void functionSample(string name, int age) { } // Type - 2 Thread th = new Thread(new ParameterizedThreadStart(functionSample)); th.Start("전자기린"); private void functionSample(object _nam..
-
[ASP.Net Core API] File Upload API / 파일 업로드 APIMicrosoft .NET/ASP.Net & ASP.Net Core 2021. 2. 3. 11:23
파일 저장 경로, 저장 파일 명, 파일을 필수값으로 받아서 서버에 저장하는 API API that receives file storage path, save file name, and file as required values and saves them to the server #region Upload /// /// 파일 업로드 /// /// 파일 저장 경로(서버) /// 파일 저장 이름(서버) /// 파일(클라이언트) /// //[EnableCors("CORS")] [HttpPost("upload")] public string Upload( [Required][FromForm(Name = "path")]string path, [Required][FromForm(Name = "filename")]str..
-
[WPF] 지역화 (다중 언어)Microsoft .NET/WPF 2020. 12. 7. 18:43
본 예제는 resource에 국가별 언어를 미리 등록해두고 설정(Language Culture)에 따라 표출되는 언어가 변경되도록 하는 예제입니다. Git - https://github.com/jeseok-Mun/WPF_Example_MultiLanguage 참고 PC 언어 코드 System.Globalization.CultureInfo.CurrentCulture 국가별 언어 코드(Language Culture) 더보기 Code Name af Afrikaans af-ZA Afrikaans (South Africa) ar Arabic ar-AE Arabic (U.A.E.) ar-BH Arabic (Bahrain) ar-DZ Arabic (Algeria) ar-EG Arabic (Egypt) ar-IQ Ar..