본문 바로가기

Programing (프로그래밍)/WPF & C# (C Sharp)

[ WPF & C# (C Sharp)] - 실행프로그램 폴더주소+파일명 【 WPF & C# (C Sharp) 】 - 실행프로그램 폴더주소+파일명# 현재 실행되고 있는 프로그램 폴더주소 + 파일명 @ 현재 실행되고 있는 프로그램 위치 ( 폴더 위치 / Path ) 1Environment.CurrentDirectorycs @ 현재 실행되고 있는 프로그램 파일명 ( APP ) 1AppDomain.CurrentDomain.FriendlyName;cs @ 프로그램 위치 + 파일명 ( path + APP ) 1string path = Environment.CurrentDirectory + "\\" + AppDomain.CurrentDomain.FriendlyName;cs @ 이거참...정말 상식이긴하지만... 이게 생각이 안나서 찾을때가 있다...물론 계속 생각을 해내야 머릿속에 남는.. 더보기
WPF & C# (C Sharp) - 메세지박스 종류 및 비동기식 띄우기 ( MessageBox.Show / 메시지 / 띄우기 / 나타내기 ) WPF & C# (C Sharp) - 메세지박스 종류 ( MessageBox.Show / 메시지 / 띄우기 / 나타내기 ) @ Messagebox.Show() 1 2 string msg = "메세지 추가"; MessageBox.Show(msg); cs 가장많이 쓰이는 가장 단순한 코드다. @ Messagebox.Show() 1 2 MessageBox.Show(msg, title); MessageBox.Show("MessageBoxButton.OK", title, MessageBoxButton.OK); cs 이것 역시나 많이 쓰이는 코드, 요즘엔 타이틀 추가 안하고 메세지만 넣는게 추세이기는 하지만, 간혹 타이틀명으로 컨트롤 하기 편한경우가 있어서 간간이 써주고 있다. @ Messagebox.Show("".. 더보기
[ WPF & C# (C Sharp)] - REG ( regstry / 레지스트리 / 레지 ) [ WPF & C# (C Sharp) ] - REG에 읽기 / 쓰기 / 지우기 ( 삭제하기 ) @ REG에 읽기 / 쓰기 / 지우기 ( 삭제하기 )레지스트리에 값을 입력하기 편하도록 조금 수정해 보았다. @ cs 12345678910111213141516171819202122232425262728293031323334353637383940 #region // 펑션 레지스트리 가져오기 및 쓰기 // Reg_Read private string Reg_Read(string rPath, string rKey) { RegistryKey reg = Reg_Category(rPath); reg = reg.OpenSubKey(rPath.Substring((rPath.IndexOf("\\") + 1), rPath.Len.. 더보기
WPF & C# (C Sharp) - 마우스 드래그로 윈도우 창 이동하기 ( window / drag move 드래그 무브 ) WPF & C# (C Sharp) - 마우스 드래그로 윈도우 창 이동하기 ( window / drag move 드래그 무브 ) @ MainWindow.xaml.cs ( 마우스다운 ) 1234private void Window_MouseDown(object sender, MouseButtonEventArgs e){ if (e.RightButton != MouseButtonState.Pressed) DragMove(); // 마우스 우클릭 시 에러나서 제한}Colored by Color Scriptercs @ MainWindow.xaml.cs ( 터치다운 ) 1234private void Window_PreviewTouchDown(object sender, TouchEventArgs e){ this.Capt.. 더보기
컨트롤 접두사 명명 규칙 C# 컨트롤 접두사 명명규칙 기준 컨트롤1 btn Button2 chk CheckBox3 ckl CheckedListBox4 cmb ComboBox5 dtp DateTimePicker6 lbl Label7 llb LinkLabel8 lst ListBox9 lvw ListView10 mtx MaskedTextBox11 cdr MonthCalendar12 icn NotifyIcon13 nud NumeircUpDown14 pic PictureBox15 prg ProgressBar16 rdo RadioButton17 rtx RichTextBox18 txt TextBox19 tip ToolTip20 tvw TreeView21 wbs WebBrowser 컨테이너 컨트롤1 flp FlowLayoutPanel2 grp.. 더보기
Splashimage 스플래시 이미지 사용하기 [WPF & C# (C Sharp)] -Splash image 스플래시 이미지 사용하기 [ Splash - 자동으로 사라짐] - 나타났다가 사라지는 간단한 스플래쉬 [소스코드] SplashScreen Splash_img = new SplashScreen("133147504770905.png");Splash_img.Show(false);Splash_img.Close(new TimeSpan(0, 0, 5)); [ Splash 처럼... - 패스워드 PW 입력 시 사라짐 ] - 패스워드 입력 시 사라지는 스플래쉬 처럼... [소스코드] [MainWindow.xaml]using System;using System.Collections.Generic;using System.Linq;using System.Text.. 더보기
WPF & C# (C Sharp) - Environment 로 부터 추출되는 data 각종 정보 【 WPF & C# (C Sharp) 】# Environment 로 부터 추출되는 data 각종 정보 @ Environment 로 부터 추출되는 data그냥 정리자료 @ MainWindow.xaml.cs 123456789101112 Colored by Color Scriptercs @ MainWindow.xaml 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110.. 더보기
WPF & C# (C Sharp) - XML 파일 저장하기 ( 쓰기 ) / 읽어오기 ( 읽기 ) / LINQ 【 WPF & C# (C Sharp) 】# XML 파일 저장하기 ( 쓰기 ) / 읽어오기 ( 읽기 ) / LINQ @ MainWindow.xaml 123456789101112131415 Colored by Color Scriptercs @ MainWindow.xaml.cs 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596using System;using System.Collections.Generic;using System.Lin.. 더보기