C#(61)
-
[WinForm 07.17] Crystal Report 데이터베이스 없이 데이터베이스 넘기기
먼저 크리스탈 리포트로 넘겨줄 xsd를 추가해서 데이터베이스를 임의로 만들게 됩니다. 그 후 실제 디비처럼 사용이 가능하고 그전에 데이터 삽입같은건 미리 지정해서 해주어야 하는데 삽입은 다음과 같이 하면 됩니다 먼저 xsd를 만들었고 그걸 다시 객체로 생성하게 됩니다. DataSet1 ds1 = new DataSet1(); 다음은 Datarow를 생성해주고 이제 값에 대한 내용을 추가 해주게 됩니다. 저는 필드명이 value와 data라는 필드를 기존에 정의해 두었습니다. DataRow row = ds1.Table1.NewRow(); row["value"] = "asdf"; row["data"] = "tttt"; 그후 이렇게 생성한 값들을 실제 테이블에 추가 시켜줍니다. ds1.Table1.Rows.Ad..
2011.07.17 -
[WinForm 6.22] 03. 폼닫기전에 확인하기
Form Closing Event using(admin ad=new admin()) { if(ad.ShowDialog()==DialogResult.OK) { } else { e.Cancel = true; } } 무조건 닫기 전에 질문하게 된다.
2011.06.22 -
[WinForm 6.20] 02. 데이터 STX-ETX기준으로 데이터 받기
int a = comPort.ReadByte(); real += ((char)a).ToString(); temp = string.Format("{0:x}", a); if (temp.Equals("2")) { temp = ""; while (!temp.Equals("3")) { a = comPort.ReadByte(); temp = string.Format("{0:x}", a); real += ((char)a).ToString(); } if (temp.Equals("3")) { com.ReciveStram(real);//
2011.06.20 -
[Console]using 사용법
일반적인 사용법 Font font=new Font("arral",10.0f) if(font!=null) {((IDisposable)font).dispose();} using(Font font=new Font("arral",10.0f)) { //작업 } IDisposable 요게 되는게 using도 사용할 수 있어요^^ 아직 그렇게 대규모 프로젝트를 안해봐서 있으나 없으나 잘모르겠네요!!
2011.06.10 -
[OpenCvSharp 05.11] 01.설치하기
1. opencv 설치 파일주소 http://sourceforge.net/projects/opencvlibrary/files/opencv-win/ 설치시 "Add OpenCV to the System Path for all users"로 선택후 해주세요^^ 2. opencvsharp 파일 주소 http://code.google.com/p/opencvsharp/ 최대한 최신 버전을 받는게 좋습니다..^^ 3. 설치할때 dll 파일 이동은 필수 !!^^ 이것때문에 애 많이 먹었넹..
2011.05.11 -
[WinForm 04.15] 01.데이터 파일 저장
SaveFileDialog sfD = new SaveFileDialog(); sfD.Filter = "txt(*.txt)|*.txt|All File(*.*)|*.*"; sfD.FilterIndex = 2; sfD.RestoreDirectory = true; if (sfD.ShowDialog() == DialogResult.OK) { string filestr = ""; foreach (string str in sfD.FileNames) { filestr = str; } FileInfo fileinfo = new FileInfo(Application.ExecutablePath); FileStream fs = new FileStream(filestr, FileMode.Create); StreamWriter ..
2011.04.15