본문 바로가기
728x90
반응형

WPF4

.NetCore 배포 폴더 만들기 C# .netcore3.1 배포 및 게시 방법 한번 알아봄 프로젝트 우클릭 후 게시 클릭 게시에서 폴더 클릭 후 다음 클릭 다음 게시에서도 폴더 클릭 후 다음 클릭 마침 클릭 게시 클릭 하면 프로젝트 빌드되기 시작함 빌드가 끝나면 해당 경로에 publish 폴더가 생성 되고 그 안에 프로젝트 생성됨 2023. 6. 12.
C# WPF Serial 통신 연결 가끔 사용하는 C# Serial 통신 사용할때 마다 잊어버려서 기록해놓으려고 한다. UI는 WPF로 작성 using System; using System.Collections; using System.IO.Ports; using System.Threading; using System.Windows; using System.Windows.Threading; namespace robot_arduino_test { public partial class MainWindow : Window { Queue Data = new Queue(); //데이터 저장 큐 SerialPort sp = new SerialPort(); string T_msg = ""; //WPF Text 저장용 public MainWindow().. 2022. 9. 27.
Vieworks Camera 연결 1PC 2Program 1대의 PC에서 카메라 여러 대를 연결한 후 2개의 프로그램으로 나누어 실행할 경우 1번 프로그램에서는 카메라가 연결되고 2번 프로그램에서는 카메라가 연결되지 않는 경우가 발생 아래의 코드에서 num 부분의 숫자를 차례대로 넣어야 하지만 프로그램을 2개로 나누어 중복되어 들어감 따라서 카메라가 4개인 경우 순서대로 0, 1, 2, 3로 넣어주어여함 Vieworks.VwGigE.VwOpenCameraByIndex(m_pvwGigE, num, ref pCamera, m_imagebuffernumber, 0, 0,0, MainWindow.m_pobjectInfo[num], ptrCallback, IntPtr.Zero); 끝 2022. 9. 21.
C#/WPF MainWindow Dual monitor setup 듀얼모니터 사용시 프로그램 화면 설정 MonitorCount 가 2 이상이면 설정가능 아래의 배열로 설정가능 AllScreens[0] AllScreens[1] if (System.Windows.Forms.SystemInformation.MonitorCount > 1) { System.Drawing.Rectangle secondaryScreenRectangle = System.Windows.Forms.Screen.AllScreens[0].WorkingArea; Window w = sender as Window; w.WindowState = WindowState.Normal; w.WindowStyle = WindowStyle.None; w.WindowStartupLocation = WindowStartupL.. 2022. 9. 16.
728x90
반응형