전체 글 88

C# Regex (Regular Expression) Class

[정규표현식(Regular Expression)] 정해진 패턴을 사용해서 패턴에 일치하는 데이터 검색을 지원하는 표현식 정규 표현식에 사용되는 특수 문자 '.' => 점 임의의 한 문자를 의미합니다. a.c -> abc, aec, avc, … .us -> bus, cus, dus, … '*' 바로 앞의 문자가 없거나 하나 이상인 경우 s*e -> e, se, see, ssse, … abc* -> ab, abc, abcc, abccc, … h*im -> im, him, hhim, hhhim, … '+' 바로 앞의 문자가 하나 이상 s+e -> se, sse, ssse, … '?' 바로 앞의 문자가 없거나 하나뿐인 경우 th?e -> e, the 두가지 표현이 유일함 '^' 바로 뒤의 문자열로 시작 ^The..

프로그래밍/C# 2014.05.14

C# Multi tiff Image Convert to PDF

기존에 포스트에 등록했던 BitMiracle.Tiff2Pdf 라이브러리를 이용한 변환 중 심각한 문제 발견 Multi Image 중 한건만 유독 사이즈가 크다던가할 경우 파일은 정상적으로 생성되는것처럼 보이지만 열어보면 메모리 오류를 발생 시킴. 오류를 위해 구글링하던 중 아래로직 발견. 아래 로직은 iTextSharp 라이브러리를 이용한 변환 작업. public static void AddTiff(Document pdfDocument, Rectangle pdfPageSize, String tiffPath) { RandomAccessFileOrArray ra = new RandomAccessFileOrArray(tiffPath); int pageCount = TiffImage.GetNumberOfPage..

프로그래밍/C# 2014.03.31

C# gridview row를 이동 할 경우 이동한 row가 화면 중앙으로 되게 하기

gridview에서 row를 이동할 경우 해당 row가 맨위나 맨 아래로 갈 경우가 많은데 이럴 경우 아래 코드로 적용해주면 이동한 row가 화면 중앙에 위치하여 보기 편해짐 ----------------------------------------------------------------------------- if (nRow > OutlookGrid_main.DisplayedRowCount(false) / 2) OutlookGrid_main.FirstDisplayedScrollingRowIndex = nRow - OutlookGrid_main.DisplayedRowCount(false) / 2; OutlookGrid_main.Refresh(); -------------------------------..

프로그래밍/C# 2013.09.27

C# Disable Buttons in a Button Column in the Windows Forms DataGridView Control

using System; using System.Drawing; using System.Windows.Forms; using System.Windows.Forms.VisualStyles; class Form1 : Form { private DataGridView dataGridView1 = new DataGridView(); [STAThread] public static void Main() { Application.EnableVisualStyles(); Application.Run(new Form1()); } public Form1() { this.AutoSize = true; this.Load += new EventHandler(Form1_Load); } public void Form1_Load(ob..

프로그래밍/C# 2013.09.27