본문 바로가기

분류 전체보기

C# IPv4, IPv6 string strAddress = "10.10.10.10"; IPAddress adress = IPAddress.Parse(strAddress); if(adress.AddressFamily == AddressFamily.InterNetworkV6) // Check IPv6 { if(adress.IsIPv4MappedToIPv6) //Convert IPv6 to IPv4 adress = adress.MapToIPv4(); } string strMyIP = string.Empty; if (adress.AddressFamily == AddressFamily.InterNetwork) // Check IPv4 { strMyIP = adress.ToString(); if (string.IsNullOrEmpty(s.. 더보기
[MFC]CListCtrl > Selection change There are a few notifications based on what's happening. If you are selecting an item and nothing is selected yet, you will get one LVIF_STATE change notification: uNewState & LVIS_SELECTED. The newly selected item will be found at: pNMListView->iItem If an item is selected before you select a new object, you'll get three state changes: First you will be informed that the previous item in focus .. 더보기
SendMessage C++ to C# using WM_COPYDATA 1. C++ (Sender) typedef struct tagCOPYDATASTRUCT { ULONG_PTR dwData; DWORD cbData; CHAR* lpData; } COPYDATASTRUCT; char strChar[] = "20150601130012.xml"; //전송 할 STRING HWND hWnd = ::FindWindow(NULL, _T("XXXX")); //전송 할 Application Handle COPYDATASTRUCT cpd; cpd.dwData = 0; cpd.cbData = strlen(strChar); cpd.lpData = strChar; ::SendMessage(hWnd, WM_COPYDATA, NULL, (LPARAM)&cpd); 2. C# (Receiver) p.. 더보기
KOSTRA 재직자 교육 과정 http://edu.kosta.or.kr/clazzregister/clazzRegister_findClazzForClazzRegister?page=1&courseType=Incumbent 더보기
Virtualbox 다운로드 http://download.virtualbox.org/virtualbox/ 더보기
DCMTK modules & dependencies The DCMTK is functionally structured into so-called modules. For each module there is a directory in DCMTK's main directory. These are the modules of the public DCMTK toolkit (version 3.6.0): config: Module for configuring compilation of DCMTK ofstd: General purpose library including string class, etc. oflog: A logging library based on log4cplus dcmdata: Module for reading, modifying and writing.. 더보기
WPF MSDN 참고 목록 ■데이터 바인딩 개요 - http://msdn.microsoft.com/ko-kr/library/ms752347(v=vs.110).aspx □방법:TextBox 텍스트의 소스를 업데이트하는 시점 제어 - http://msdn.microsoft.com/ko-kr/library/ms754356(v=vs.110).aspx - UpdateSourceTrigger 속성을 사용하여 바인딩 소스 업데이트의 타이밍을 제어하는 방법을 설명. -PropertyChanged, Explicit, .. LostFocus는 미설명 ■MultiBinding 클래스 - http://msdn.microsoft.com/ko-kr/library/system.windows.data.multibinding(v=vs.110).aspx ■IVa.. 더보기
C# Delay 함수 public static DateTime Delay(int ms) { DateTime ThisMoment = DateTime.Now; TimeSpan duration = new TimeSpan(0, 0, 0, 0, ms); DateTime AfterWards = ThisMoment.Add(duration); while (AfterWards >= ThisMoment) { System.Windows.Forms.Application.DoEvents(); ThisMoment = DateTime.Now; } return DateTime.Now; } 단위는 밀리초 1000 = 1초 더보기
WPF에서 Window Message 다루기 You can do this via the System.Windows.Interop namespace which contains a class named HwndSource. using System; using System.Windows; using System.Windows.Interop; namespace WpfApplication1 { public partial class Window1 : Window { public Window1() { InitializeComponent(); } protected override void OnSourceInitialized(EventArgs e) { base.OnSourceInitialized(e); HwndSource source = PresentationSo.. 더보기
[MVVM-Light]Implementing Progress bar using WPF with MVVM pattern(using BackgroundWorker) ProgressbarSampleView.xaml ProgressarSampleViewModel.cs namespace MyProject { public class ProggressbarSampleViewModel: ViewModelBase { private readonly BackgroundWorker worker; private readonly ICommand instigateWorkCommand; public ProggressbarSampleViewModel() { this.instigateWorkCommand = new RelayCommand(o => this.worker.RunWorkerAsync(), o => !this.worker.IsBusy); this.worker = new Backgrou.. 더보기