C# WPF
41. Custom Vision, Azure 가입
41. Custom Vision, Azure 가입
2025.03.1701. Custom Vision 가입하기더보기1. Custom Vision - Home 접속 Custom Vision - HomeUpload Images Bring your own labeled images, or use Custom Vision to quickly add tags to any unlabeled images. Train Use your labeled images to teach Custom Vision the concepts you care about. Evaluate Use simple REST API calls to quickly tag images with ywww.customvision.ai 2. 02. Azure 가입하기 더보기1. 2. 결재 정보 등록(무료 사용) 3..
37. UserControl
37. UserControl
2024.12.1101.더보기1. 2. d:DesignHeight="80" d:DesignWidth="380"> 3.private Contact contact;public Contact Contact{ get { return contact; } set { contact = value; }} 4. nameTextBlock.Text = contact.Name;emailTextBlock.Text = contact.Email;phoneTextBlock.Text = contact.Phone; 02.더보기1.xmlns:uc="clr-namespace:ContactApp..
36. SQLite Update, Delete
36. SQLite Update, Delete
2024.12.1101.더보기1. Title="ContactDetailsWindow" Height="300" Width="260"> 2. 3. 4.// EditContactWindow 를 출력하고,// 생성자로 contactListView 컨트롤에서 선택한 Contact 객체를 전달합니다.EditContactWindow newContactWindow = new EditContactWindow(selectCo..
35. Linq
35. Linq
2024.12.1101.더보기1.contacts = (connection.Table().ToList().OrderBy(contact => contact.Name)).ToList(); 2. 02.더보기1.// Linq 경우var searchResultList = (from contact in contacts where contact.Name.ToLower().Contains(searchTextBox.Text.ToLower()) orderby contact.Name select contact).ToList(); 03.더보기
34. ListView - 2
34. ListView - 2
2024.12.1101.더보기1. Title="MainWindow" Height="400" Width="400"> 2. 3.public partial class MainWindow : Window{ List contacts; public Mai..
33. ListView - 1
33. ListView - 1
2024.12.1001.더보기1. 2.// Contact 객체 형태를 리스트로 선언하여 준비하고List contacts;// SQLite에서 테이블을 읽어와 Contact 리스트에 담고using (SQLiteConnection connection = new SQLiteConnection(App.databasePath)){ connection.CreateTable(); contacts = connection.Table().ToList();}if (contacts != null){ //Contact 모델의 리스트 요소를 하나씩 가져와 foreach (var item in contacts) { // contactListView 컨트롤에 읽어들인 객체를 추가합니다. conta..
32. SQLite Create, Read
32. SQLite Create, Read
2024.12.1001.더보기1. 02.더보기1. 2. 3.public class Contact{ public int Id { get; set; } public string Name { get; set; } public string Email { get; set; } public string Phone { get; set; }} 03.더보기1. 2. 3.// AddNewContactWindow 윈도우의 입력 TextBox 컨트롤에서 값을 가져와// Contact 데이터 모델 객체의 필드에 각각 값을 할당한다.Contact contact = new Contact(){ // 모델에서 Id 필드는 [PrimaryKey, AutoIncrement] 이기 때문에 // 값을 지정..
31. ContractApp
31. ContractApp
2024.12.091.더보기1. 2. Title="NewContractWindow" Height="300" Width="260" > 3. 2.더보기1. Title="MainWindow" Height="400" Width="400"> ..
6.6 WeatherApp - MVVM(2)
6.6 WeatherApp - MVVM(2)
2024.11.2901. ICommand더보기01.1 ICommand 용도: 컨트롤 이벤트 핸들러 대체합니다.예) 코드 비하인드 버튼 클릭 이벤트 핸들러를, ViewModel 클래스 로직에서 구현 합니다. 01.2 동작구조CanExecuteChanged 이벤트가 발생하면 CanExecute( )를 통해 컨트롤이 사용가능한지 체크하고UI 사용자 명령이 발생하면 IsEnable이 true로 활성화된 컨트롤은Execute( ) 에 정의된 동작이 실행됩니다. 01.3 ICommand 구현 및 사용방법ICommand 구현체를 MyCommand라고 가정하면아래와 같이, '메서드'를 이벤트 핸들러 처럼 사용합니다.MyCommand cmd = new MyCommand(메서드); 02.더보기02.1 02.2public ..
6.5 WeatherApp - MVVM(1)
6.5 WeatherApp - MVVM(1)
2024.11.2701. 적용 개념더보기01. MVVM 패턴의 전제 조건[유형1] View 컨트롤의 변경 >> ViewModel 의 프로퍼티 변경 >> 바인딩 된 다른 View의 컨트롤 반영 [유형2] API, TCP, DB >> ViewModel 의 프로퍼티 변경 >> 바인딩 된 View의 컨트롤 반영 두 유형 모두, ViewModel의 프로퍼티 변경되는 시점을 기준으로 View 컨트롤에 반영된다. ViewModel의 프로퍼티 변경을 View에 알려주고 연동시키는 기술을 배우는 것이 MVVM 패턴을 구현하는 핵심이다. 01.2 DataBinding OneWay: ViewModel > View TwoWay: ViewModel > View View ..
6.4 WeatherApp - View
6.4 WeatherApp - View
2024.11.2701.더보기01.1 02.더보기02.1 View 폴더 생성 02.2 기본 생성된 Mainwindow 제거 02.3 WeatherWindow 생성 02.4 WeatherWindow XAML 구현 Title="WeatherWindow" Height="600" Width="400"> ..
6.3 WeatherApp - ViewModel
6.3 WeatherApp - ViewModel
2024.11.271. ViewModel더보기프로그램은, 데이터와 로직으로 이루어집니다. C언어에서 기본 자료형들과, 간단한 로직으로 프로그램을 만들었습니다.Model은 자료형입니다. ViewModel은 로직입니다. 복잡한 로직, 프로그램 외부와 데이터(DB, TCP/IP, Serial 등)를 주고받는 로직 모두 ViewModel에서 처리됩니다. 2. ViewModel 폴더 생성더보기학습 과정에서 ViewModel을 확실하게 구분하기 위해 ViewModel 폴더를 만듭니다.ViewModel 폴더와 ViewModel.Helpers 폴더를 만듭니다. 3. ViewModel.Helpers 더보기ViewModel.Helpers 폴더의 AccuWeatherHelpers.cs 에서는, 외부 API 데이터를 Request (요청)..