C# -- 파일 유무 확인하기

C# 2019. 11. 23. 11:15
반응형

C# -- 파일 유무 확인하기




참고 : https://stackoverflow.com/questions/7385251/how-to-check-if-a-file-exists-in-a-folder/7385282





반응형
Posted by 자유프로그램
,
반응형

sqlite --- upsert



참고 : https://stackoverflow.com/questions/418898/sqlite-upsert-not-insert-or-replace?noredirect=1&lq=1


        https://www.sqlite.org/lang_UPSERT.html  ==> upsert

        https://www.sqlite.org/lang_conflict.html    ==> ON CONFLICT


        https://www.sqlitetutorial.net/sqlite-replace-statement/   ==> INSERT OR REPLACE





반응형
Posted by 자유프로그램
,
반응형

C# -- Invalidate(), Update(), Refresh() 차이점



참고 : https://code-examples.net/en/q/e8a4a




this.Invalidate();  // request a delayed Repaint by the normal MessageLoop system    

this.Update();      // forces Repaint of invalidated area 

this.Refresh();     // Combines Invalidate() and Update()













반응형
Posted by 자유프로그램
,
반응형


C# -- Form 크기 변경시, 다시 그리기 (redraw) ; paint event 호출됨.



참고 : http://www.csharp-examples.net/redraw-control-on-resize/





** 아래 2가지 방법중 하나를 사용하면 됨.



< 방법 1. >


해당하는 Control 의 ResizeRedraw 속성을 true 로 하면됨.

 --> 해당 Control size 변경시마다, paint event 호출되어 다시 그린다.




ex) Form 크기 변경시, 다시 그리기 


            this.SetStyle(ControlStyles.ResizeRedraw, true);


            또는


            this.ResizeRedraw = true;







< 방법 2.>


해당 Control 의 Resize event 에서, invalidate() 메소드 실해하면 됨.









<< 실행 화면 예 >>








반응형
Posted by 자유프로그램
,

C# -- MultiThread Singleton

C# 2019. 8. 13. 13:35
반응형

C# -- MultiThread 용 Singleton



참고 ; https://docs.microsoft.com/en-us/previous-versions/msp-n-p/ff650316(v=pandp.10)#multithreaded-singleton









반응형
Posted by 자유프로그램
,