본문 바로가기

Development

(103)
반응형
[Visual Studio 2015] 솔루션 / 프로젝트 생성 Visual Studio 로 개발시 처음 시작 하는 것이 바로 프로젝트 생성이다. 그런데 이때 습관적으로 솔루션 이름을 변경하지 않아서, 나중에 눈에 거슬리는 경우가 많다. 그걸 놓치지 않기 위해.. 프로젝트 생성 Visual Studio 를 실행하면 기본 화면으로 뉴스 들이 나오고 프로젝트를 만들수 있다 프로젝트 이름을 기입하면, 자동으로 솔루션 이름 또한 동기화가 된다. 이렇게 되면 솔루션 명이 프로젝트 명과 동일하게 되는데 위와 같이 생성하게 되면, 솔루션 명이 다르게 생성 된다. 이것으로 개발의 시작은 되었다. ㅎㅎ
「C#」Clickonce 설치 시 "응용프로그램 설치 - 보안 경로" 로 인해 설치가 안될때 환경 : Visual Stuido 2015 이때는 당황하지 말고 메뉴 > regedit 경로 : \HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\.NETFramework\Security\TrustManager\PromptingLevel 설치가 가능해 졌습니다.
[c#] DateTime 차이 계산 환경 : Visual Studio 2015 DateTime 차이 (시작 일시 ~ 종료 일시) 의 계산 public void DiffTime() { string format = "yyyyMMddHHmmss.fff"; string strStartDateTime = "19771001080000.000"; DateTime startDateTime = DateTime.ParseExact(strStartDateTime, format, CultureInfo.InvariantCulture); DateTime endDateTime = DateTime.Now; TimeSpan tsDiff = endDateTime - startDateTime; DateTime diffDateTime = DateTime.MinValue + ..
「c#」Microsoft.CSharp.RuntimeBinder.CSharpArugmentIfo.Create 멤버가 필요한 컴파일러가 없습니다 . 오류 환경 : Visual Studio 2015 Unit Test 프로젝트에서 단위 테스트 Class를 만들어 컴파일중 위와 같은 오류가 발생했다. ㅡ.ㅡ 검색해 보니 다음과 같이 간다하게 해결 된다.
[WPF] DataGrid 에서 Rows Count 환경 : Visual Studio 2015 소스 정말 간단하다. 이걸 몰랐을때는 원본 ItemsSource 를 형변환해서 count 를 확인 했는데.. 아래 구문으로 간단히... // Rows Count int rowsCnt = dataGrid.ItemsSource.OfType().Count();
[C#] 키보드 후킹시 키보드 키값 enum 환경 : Visual Studio 2015 키보드 후킹시 키보드 키값ㅇ을 사용하는데 찾기가 불편해서 등록 해 보았다. public enum VKeys : int { VK_LBUTTON = 0x01, //Left mouse button VK_RBUTTON = 0x02, //Right mouse button VK_CANCEL = 0x03, //Control-break processing VK_MBUTTON = 0x04, //Middle mouse button (three-button mouse) VK_BACK = 0x08, //BACKSPACE key VK_TAB = 0x09, //TAB key VK_CLEAR = 0x0C, //CLEAR key VK_RETURN = 0x0D, //ENTER key VK_S..
[WPF] NotifyTrayIcon 환경 : Visual Studio 2015 private void SetNotifyTrayIcon() { try { System.Windows.Forms.ContextMenu menu = new System.Windows.Forms.ContextMenu(); // 아이콘 설정부분 notify = new System.Windows.Forms.NotifyIcon(); notify.Icon = new System.Drawing.Icon(@"icon.ico"); // 외부아이콘 사용 시 //notify.Icon = Properties.Resources.icon; // Resources 아이콘 사용 시 notify.Visible = true; notify.ContextMenu = menu; notify.Text ..
[WPF] TextBox 가운데 정렬 환경 : Visaul Studio 2015 알면 별거 아닌데 이놈의 Property ... TextBox를 Grid 안에 넣고 Build 를 해서 실행 했더니 내가 생각한 느낌이 아니다. ㅋㅋ 확실히 Winform과는 다른 Perperty 들이 너무 많아 졌다. 이번에는 Layout Grid 안에 Textbox를 이쁘게(?) 넣는, 즉 가로 세로 가운데 정렬 Property 를 설정 하려 한다. HorizontalAlignment : 가로 정렬 [Center, Left, Rigth, Stretch] VerticalAlignment : 세로 정렬 [Center, Top, Bottom, Stretch] VerticalContentAlignment : Textbox의 Text 세로 정렬 [Center, Top..
[WPF] Combobox Object Binding 환경 : Visual Studio 2015 테스트용으로 임의 데이터 (Object) 을 Combo Box에 넣어 보것다. 최종 결과는 ▷ xmal ▷ cs private void SetComboBox() { List list = new List(); list.Add(new { DisplayMemeber = "ALL", ValueMember = "ALL"}); list.Add(new { DisplayMemeber = "홍길동", ValueMember = "Hong" }); list.Add(new { DisplayMemeber = "이순신", ValueMember = "Lee" }); list.Add(new { DisplayMemeber = "김유신", ValueMember = "Kim" }); cboBox..
[WPF] Application 종료 시 Show Popup 종료 환경 : Visual Studio 2015 Main Window에서 Show() 를 이용해 Modaless Popup을 생성 후 Main Window를 종료 시켰는데 Popup은 없어지지 않는다. (Winform도 그랬는지 생각이 안난다.) private void btnShowWind_Click(object sender, RoutedEventArgs e) { PopWin pWin = new PopWin(); pWin.PageName = PageNames.ShowWin; pWin.Show(); } 이때는 당황하지 말고. App.xaml 로 찾아가서 옵션으로 ShutdownMode 를 넣어 준다. 아래는 참고 MSDN Application.ShutdownMode Property (MSDN) Applicati..