업무용 소스 예제
-
C# SendKeys.SendWait()로 단축키 전달하는 방법 예제와 문제 해결업무용 소스 예제 2023. 5. 12. 16:06
SendKeys.SendWait() 메서드를 사용하여 'ALT + A'를 전달하는 방법은 다음과 같습니다. // SendKeys 클래스를 사용하기 위해 System.Windows.Forms 어셈블리를 참조해야 합니다. using System.Windows.Forms; // ... // 'ALT + A'를 보낼 대상 창이 활성 상태여야 합니다. // 예를 들어, 메모장 창이 활성 상태인 경우: SendKeys.SendWait("%A"); SendKeys.SendWait() 메서드는 데스크톱 응용 프로그램과 같은 다른 창으로 키를 전송할 수 있습니다. 그러나 몇 가지 이슈가 있을 수 있으며, 이로 인해 입력이 실패할 수 있습니다. 다음은 SendKeys.SendWait() 메서드의 일반적인 문제점과 해결 방..
-
C# 셀레늄 : 사이트 팝업창 접근 과 처리 방법업무용 소스 예제 2023. 5. 12. 15:57
팝업창이 Alert 창인 경우 : try { IAlert alert = Driver.SwitchTo().Alert(); alert.Accept(); } catch (NoAlertPresentException) { // 팝업창이 Alert 창이 아닌 경우에는 NoAlertPresentException 예외가 발생합니다. // 이 경우 아무런 처리를 하지 않습니다. } 팝업창이 Alert 창이 아닌 경우 에는 보통 HTML Dialog 창으로 인식됩니다. 따라서 해당 창을 다루기 위해서는 Selenium의 SwitchTo().Window() 메서드를 사용해야 합니다. 다음은 HTML Dialog 창을 다루는 예제 코드입니다. // 현재 창의 핸들을 저장합니다. string parentHandle = Driv..
-
마우스 포지션의 도플러값 반환 예제업무용 소스 예제 2022. 2. 26. 12:59
private double GetDoppler(Point mp) { try { int xIndex = (int)(mp.X / 16); int aIndex = (int)mp.X % 16; double yIndex = mp.Y; if (yIndex >= 320.0) yIndex = 319; ushort unMode = DataManagerUnit1.BDTSystemInfo.stBDTAOSInfo.unTransmitMode; switch (DataManagerUnit1.BDTSystemInfo.stBDTAOSInfo.unDispMode) { case 0: if (DataManagerUnit1.dic_CWCASPCRInfo.ContainsKey((ushort)(unMode + 1))) { if (this.Tag..
-
공용 Render 함수 예제업무용 소스 예제 2022. 1. 12. 10:48
- 공용 Render 함수 예제 protected override void OnRender(DrawingContext drawingContext) { try { if(_startP != null && _mp != null) { double minX = _startP.Value.X; if (_mp.Value.X maxX) maxX = _mp.Value.X; SolidColorBrush br = new SolidColorBrush(); br.Color = Colors.White; br.Opacity = 0.3; _timeGapWidth = (maxX - minX + 1);..
-
DB로 부터 동영상 리스트 불러오는 예제업무용 소스 예제 2021. 12. 27. 11:15
private void RefreshData() { try { li_Datainfo.Clear(); /* string que = "select * from Tab_Video_Recording_list"; DataTable dt = CMSDataManager.GetQueryData(que); if (dt == null || dt.Rows.Count == 0) return; foreach (DataRow dr in dt.Rows) { DataInfo dinfo = new DataInfo(); dinfo.Mode = Convert.ToInt32(dr["oMode"]); dinfo.date = dr["stdatetime"].ToString().Trim(); dinfo.time = dr["ststrattime"]..
-
SwitchComManager Class업무용 소스 예제 2021. 12. 3. 15:47
public class SKPStateInfo { public double inputVolt {get;set;} public double current {get;set;} public double cpuTemp {get;set;} public int overCurrentVolt {get;set;} public byte skpVersion {get;set;} public SKPStateInfo() { inputVolt = 0; current = 0; cpuTemp = 0; overCurrentVolt = 0; skpVersion = 0x01; } } public class OperControlInfo { public byte soundType { get; set; } public byte sonarComm..
-
시스템 정보 구조체 구성 참조용 예제업무용 소스 예제 2021. 11. 3. 17:23
public static SystemInfo SystemInfo { get { if (_tgdSystemInfo == null) { _tgdSystemInfo = new TGDSystemInfo() { stSonarSensorCASBDTSystemInfo = new SonarSensorCASBDTSystemInfo() { unSonarKind = 1, fTargetBearing = 171.8f, fTargetBearingRate = 12.8f, fTargetSNR = 113.4f, eTargetTrackingMode = new EN_TARGETTRACKINGMODE() { }, stTargetUpdateTime = new ST_DATE_TIME() { oHour = 11, oMin = 11 } }, st..
-
펄스 정보 전시용 함수 예제 소스업무용 소스 예제 2021. 10. 16. 18:17
- 펄스 정보 전시용 함수 예제 소스 public void SetPulseData() { try { ushort unChannel = DataManagerUnit1.BDTSystemInfo.stBDTSelectTargetInfo.unChannel; ST_IPSTGT stIPS = null; ST_IPS_ITA_FULLANAL stFullAnal = null; if (unChannel > 0 && !unChannel.Equals(ushort.MaxValue) && unChannel < 18) { if (DataManagerUnit1.dic_PulseTargetInfos.ContainsKey((byte)unChannel)) stIPS = DataManagerUnit1.dic_PulseTargetInfos[(..