기본 콘텐츠로 건너뛰기

10월, 2019의 게시물 표시

C# - Full Screen

1. this .FormBorderStyle = System.Windows.Forms.FormBorderStyle.None; this .WindowState = FormWindowState.Maximized; 출처:  https://outshine90.tistory.com/entry/폼-FullScreen  [처음] 2. fullScrenn_bounds = Rectangle.Empty;   foreach   (var screen  in   Screen.AllScreens) {       fullScrenn_bounds = Rectangle.Union(fullScrenn_bounds, screen.Bounds); } this .ClientSize =  new   Size(fullScrenn_bounds.Width, fullScrenn_bounds.Height); this .Location =  new   Point(fullScrenn_bounds.Left, fullScrenn_bounds.Top) 출처:  https://outshine90.tistory.com/entry/폼-FullScreen  [처음] 3. this .StartPosition = FormStartPosition.Manual;   fullScrenn_bounds = Rectangle.Empty;   foreach   (var screen  in   Screen.AllScreens) {         fullScrenn_bounds = Rectangle.Union(fullScrenn_bounds, screen.Bounds); } this .ClientSize =...

정규표현식 - 특정 단어로 시작하거나 끝나는 줄 전체 찾기

^.*<SYNC.*KRCC>$\r\n .* -> . 이 0번 이상 나오는 것. => 다른 정규식을 추가 하기 위해 사용. ^<SYNC -> <SYNC로 시작하는 단어 찾기 KRCC>$ -> KRCC>로 끝나는 단어 찾기. ** ^<SYNC KRCC>$ 이렇게 이어서 쓰면 에러 남. 그래서 사이에 .*를 추가 ** KRCC>$ 만 사용해도 KRCC> 로 끝나는 줄을 찾음.

C# - Serial Port ASCII/HEX Format

using System; using System.Collections.Generic; using System.ComponentModel; using System.Data; using System.Drawing; using System.Linq; using System.Text; using System.Windows.Forms; using System.IO.Ports; namespace SerialTest1 {     public partial class Form1 : Form     {         delegate void MyDelegate();      //델리게이트 선언(크로스 쓰레드 해결하기 위한 용도)         bool SendForamt = true;          // true : ASCII   false : HEX         bool ReceiveFormat = true;       // true : ASCII   false : HEX         public Form1()         {             InitializeComponent();          ...