본문 바로가기 메뉴 바로가기

Only I Can

프로필사진
  • 글쓰기
  • 관리
  • 태그
  • 방명록
  • RSS

Only I Can

검색하기 폼
  • 분류 전체보기 (181)
    • C reative (26)
      • Writing (20)
      • 1Day 1Ted (5)
    • Game (6)
      • Poly Bridge (6)
    • Hobby (9)
      • B ook (2)
      • M ovie (5)
      • M usical (0)
      • H ave It (1)
      • U sefull Program (1)
    • P rogramming (135)
      • V studio (6)
      • C # (13.05~) (79)
      • E ncryption (5)
      • C conf (8)
      • L inux (7)
      • D B (15)
      • E tc (8)
      • M ade by iswoo (7)
  • 방명록

P rogramming (135)
Sqlite] table 존재 유무 확인

Sqlite 역시 다른 DB 와 마찬가지로 master table 이 존재한다는 것을 알게 되었습니다. string sQuery = "select count(*) from sqlite_master Where Name = 'table_name'; result - 0 : 존재하지 않음 - 1 : 존재 출처 : http://bloodguy.tistory.com/entry/SQLite3-%ED%85%8C%EC%9D%B4%EB%B8%94-%EC%A1%B4%EC%9E%AC-%EC%97%AC%EB%B6%80-%EC%B2%B4%ED%81%AC-check-table-exists

P rogramming/D B 2014. 3. 27. 15:09
C# ListView 체크된 항목만 골라내기.

ListView 에는 check box 를 추가하는 기능이 있습니다. 그중 check 된 것만 골라내야 하는 경우가 생기는데 전체 리스트를 돌면서 check box 가 true 인 것을 찾는 것이 아닌 체크된 항목만 끄집어 내는 방법이 있습니다. 방법은 listView1 의 checkeditems 를 찾고, ListviewItem 에 하나씩 넣은 다음 처리하는 것입니다. foreach (ListViewItem item in listView1.CheckedItems) { textBox1.AppendText( item.SubItems[0].Text + "\n" ); item.BackColor = Color.Aquamarine; } 추가 : item.BackColor 는 해당 라인 색 변경에 사용됩니다. 출처..

P rogramming/C # (13.05~) 2014. 3. 19. 11:13
C# Form Load 완료 시점 찾기

C# 같은 경우 해당 폼이 완전 load 가 완료된 시점을 찾기가 어렵다. 그런 메써드가 있는 것도 아니고.. 그래서 검색하다가 나온 것은 임시 방편으로 사용할만한 것인데, Application 의 상태가 idle -> 놀고 있다는 것은, 로딩이 완료됐다는 시점을 찾고 그 시점이 됐을 때, 원하는 것을 실행 시키는 것이다. 필자의 경우, 메시지 박스를 통해서 버전체크를 하고, 버전이 다르다면 업데이트를 하겠냐는 메시지 박스를 띄우려고 했는데 Form load 가 다 완료 되기도 전에 메시지 창이 뜨는 오류가 있었다. 그래서 아래와 같은 코드를 사용하게 되었다. public Mainform() { InitializeComponet(); Application.Idle += Check_Version; } pr..

P rogramming/C # (13.05~) 2014. 3. 17. 15:57
해당 운영체제의 bit 수 확인 법 두가지 - 닷넷 or 공용

원래 닷넷을 이용하는 사용자라면 굉장히 쉽게 할 수 있습니다. 그것은 바로 is64bitOperatingSystem입니다. 반환 형태가 bool 이고 운영체제가 64 이면 true, 32 이면 false 를 반환해 줍니다. 위에를 보면 닷넷 환경 4.5 또는 4 에서 지원해주는 것을 알 수 있습니다. 그러나 필자는 좀 부득이하게 3.5 환경에서 개발하게 되어서 다른 방법을 찾을 수 밖에 없었는데 그것은 바로 windows 아래에 있는 syswow64 폴더 입니다. 기본적인 32 bit os 라면 존재하지 않지만 64 bit 이상의 운영체제에서는 syswow64 라는 폴더가 존재 합니다. if (Directory.Exists(@"C:\windows\syswow64")) { // 64 bit } else {..

P rogramming/E tc 2013. 11. 13. 17:28
C# 폴더 전체 복사( copyFolder ) 두 가지 방법- 소스 및 설명

// 원본과, 목적지를 같이 대입 public void CopyFolder (string sourceFolder, string destFolder ) { if (!Directory.Exists(destFolder)) Directory.CreateDirectory(destFolder); string[] files = Directory.GetFiles(sourceFolder); string[] folders = Directory.GetDirectories(sourceFolder); foreach (string file in files) { string name = Path.GetFileName(file); string dest = Path.Combine(destFolder, name); File.Copy(f..

P rogramming/C # (13.05~) 2013. 11. 13. 10:25
C# Timer 예제 및 설명( msdn )

static Timer myTimer = new Timer(); static int alarmCounter = 1; static bool exitFlag = false; private static void timerEventProcessor( object myObject, EventArgs myEventArgs ) { // event 발생시 timer stop myTimer.Stop(); // messageBox 를 이용해서 Yes No 를 판단하고 flag 또는 counter 를 변화 시킵니다. if (MessageBox.Show("Conuinue?", "Count :" + alarmCounter, MessageBoxButtons.YesNo) == DialogResult.Yes) { alarmCount..

P rogramming/C # (13.05~) 2013. 11. 6. 19:48
C# AES 256 복호화 및 암호화 코드 및 설명( encryption, decryption )

using System.Security.Cryptography; private void button1_Click(object sender, EventArgs e) { textBox3.Text = AESEncrypt256(textBox2.Text ); } private void button2_Click(object sender, EventArgs e) { textBox4.Text = AESDecrypt256(textBox3.Text); } public String AESEncrypt256(String InputText ) { string Password = textBox1.Text; RijndaelManaged RijndaelCipher = new RijndaelManaged(); // 입력받은 문자열을 ..

P rogramming/C # (13.05~) 2013. 10. 25. 14:06
C# ini 파일을 이용한 version 확인

using System.Runtime.InteropServices; namespace test_ini { class Program { // get [DllImport("kernel32")] private static extern int GetPrivateProfileString( string section, string key, string def, StringBuilder retVal, int size, string filePath); // write [DllImport("kernel32")] private static extern long WritePrivateProfileString( string section, string key, string val, string filePath); static..

P rogramming/C # (13.05~) 2013. 10. 24. 18:09
C# assembly version check( 버전 확인 )

using System.Reflection; namespace test_versionCheck { public partial class Form1 : Form { public Form1() { InitializeComponent(); } private void button1_Click(object sender, EventArgs e) { Assembly asm = Assembly.LoadFrom(@"C:\YPM\YPM2013.exe"); AssemblyName name = asm.GetName(); MessageBox.Show( name.Version.ToString() ); } } } using 구문을 보면 reflection( 한 : 반영 ) 이란 namespace를 이용한 것입니다. Assembly..

P rogramming/C # (13.05~) 2013. 10. 24. 10:09
C# try - catch - finally 예시 구문과 설명

using System; using System.Collections.Generic; using System.ComponentModel; using System.Data; using System.Drawing; using System.Text; using System.Windows.Forms; namespace Test { public partial class Form1 : Form { public Form1() { InitializeComponent(); } private void button1_Click(object sender, EventArgs e) { bool isSuccess = false; // 1 try { Console.WriteLine("정상적인 실행"); //throw new Null..

P rogramming/C # (13.05~) 2013. 10. 23. 10:43
이전 1 2 3 4 5 6 ··· 14 다음
이전 다음
공지사항
최근에 올라온 글
  • Only I Can:: What about Z..
  • Only I Can Ted:: How comp..
  • Only i Can TED) What six..
  • Only i Can TED) Meet Spot..
최근에 달린 댓글
  • CheckForIllegalCrossThreadCa..
  • 크로스쓰레드가없이 돌아가나요?
  • 별말씀을
  • 덕분에 좋은거 알아갑니다.
Total
331,919
Today
0
Yesterday
89
링크
  • 리나루카스 시선
  • 다크 프로그래머
  • 개뼈다귀
  • alice
  • 찌혀니의 Another world 별천지
  • 세상의나라
  • 행복결말 자막
  • Funny Candies
  • winner
  • 네가 몰랐던 공부법
TAG
  • 알프스목초지1-4
  • Joseph Redmon
  • 리눅스
  • C# 패널
  • 자신만의향
  • PolyBridge1-4
  • DaleEvans
  • C# 패널 예제
  • PolyBridge1-3
  • 믿는다는것
  • 알프스목초지1-3
  • PolyBridge1-5
  • PolyBridge하는법
  • 인생의시간
  • 알프스목초지1-2
  • PolyBridge1-1
  • OnlyICan
  • 분할작업
  • Nina Fedoroff
  • 1Day1Sentence
  • c#
  • 알프스목초지1-1
  • 사람의인생
  • ted
  • PolyBridge
  • 좋은글귀
  • 알프스목초지1-5
  • PolyBridge1-2
  • 폴리브릿지
  • C# 판넬 예제
more
«   2020/06   »
일 월 화 수 목 금 토
  1 2 3 4 5 6
7 8 9 10 11 12 13
14 15 16 17 18 19 20
21 22 23 24 25 26 27
28 29 30        
글 보관함
  • 2017/08 (4)

Blog is powered by Tistory / Designed by Tistory