반응형 프로그래밍˙알고리즘16 [C# Windows] C#으로 픽셀서치 가장쉽게 하기 픽셀(pixel)은 디지털 화상을 구성하는 기본적인 단위이다. 어떠한 이미지를 그림판으로 실행하고 최대로 확대를 하면 작은점들이 여러개 보인다.이것들이 모두 픽셀이다. 이 글의 내용에서는 픽셀서치와 픽셀서치를 이용하여 이미지서치를 담았다. Visual Studio를 키고 C# 빈프로젝트(.Net) Project에 Class를 두개 생성해준다. 구분을 위해 Class1은 MainClass, Class2는 ImgCapture로 변경해준다. [ImgCaputre.cs] using System.Drawing; public class ImgCapture { private int _refX = 0; private int _refY = 0; private int _imgW = 0; private int _imgH =.. 2021. 10. 24. [C# Windows] 절대경로에 있는 문서 모두 가져와서 처리하기 string[] txts = { "", }; try { txts = Directory.GetFiles(@"C:\Users\1234\source\repos\WindowsFormsApp1\WindowsFormsApp1\bin\Debug", "*.txt", SearchOption.AllDirectories); } catch (Exception) { } for (int i = 0; i < txts.Length; i++) { string value = File.ReadAllText(txts[i]); if(value.Contains("Right")) { value = value.Replace("Right", "Down"); MessageBox.Show(value); File.WriteAllText(txts[i], .. 2021. 10. 24. [C# Windows] 문자의 아스키코드값 바꿔서 표기 (간이 Encryptor) static void Main(string[] args) { string Read = Console.ReadLine(); int[] code = new int[Read.Length]; StringBuilder stringBuilder = new StringBuilder(); for (int i=0; i = .. 2020. 11. 5. [C# Windows 프로그래밍] C# dll파일을 제작/사용하는 방법 (How to make C# dll) DLL : Dynamic Link Library 라이브러리를 사용하는 이유는 개발에 있어 자주쓰고 중복적인 내용을 다룰 때 편리하고, 개발속도가 빨라지기 때문이다. DLL파일 생성을 위해 C# 클래스 라이브러리를 생성한다. using System; namespace ClassLibrary1 { public class Class1 { public static int test (int a, int b) { return a + b; } } } 위와 같이 간단하게 int타입 a, b를 불러와서 더하는 함수를 작성한 후에 F5를 눌러서 빌드한다. 이런 문구가 뜨면 빌드에 성공한 것이다. 이제 소스폴더에 들어가서 ClassLibrary1.dll을 찾는다. dll파일이 생성된 것을 확인할 수 있다. 이제 솔루션 - .. 2020. 5. 30. 이전 1 2 3 4 다음 반응형