Notice
Recent Posts
Recent Comments
Link
일 | 월 | 화 | 수 | 목 | 금 | 토 |
---|---|---|---|---|---|---|
1 | 2 | 3 | ||||
4 | 5 | 6 | 7 | 8 | 9 | 10 |
11 | 12 | 13 | 14 | 15 | 16 | 17 |
18 | 19 | 20 | 21 | 22 | 23 | 24 |
25 | 26 | 27 | 28 | 29 | 30 | 31 |
Tags
- DatePicker
- vite
- setInterval 중지
- react
- allow_anonymouse
- datagridview 직접입력
- map이 undefined가 뜰 때
- pm2 시작
- 서버동기화
- setInterval 정지
- pm2 상태 확인
- DataGridView 직접 입력
- c# datagridview 데이터 넣기
- AntDesign
- mosquitto.conf
- tailwind
- 1883
- pm2 설치
- pm2 확인
- listener 1883
- setInterval 외부 정지
- mySQL_Replication
- 데이터테이블 데이터 넣기
- timepicker
- setInterval clear
- 맥 어드레스
- pm2
- html #select #option #multiple
- invalid data
- mosquitto
Archives
- Today
- Total
개발 노트
폼닫을시 설정 저장하고 재실행하면 저장된값 가져오기 본문
폼닫기 이벤트 지정
/// <summary>
/// 폼 닫기 이벤트 핸들러 선언
/// </summary>
/// <param name="sender"></param>
/// <param name="e"></param>
public void Form_Closing(object sender, FormClosedEventArgs e)
{
propertyCloseMethod();
}
닫기이벤트지정
private void propertyCloseMethod()
{
Properties.Settings.Default.host = textBoxHost.Text;
Properties.Settings.Default.port = textBoxPort.Text;
Properties.Settings.Default.qos = comboBoxQos.Text;
Properties.Settings.Default.topicSub = textBoxSubTopic.Text;
Properties.Settings.Default.topicPub1 = textBoxPubTopic.Text;
Properties.Settings.Default.topicPm1 = textBoxMessage.Text;
Properties.Settings.Default.topicPub2 = textBoxPT2.Text;
Properties.Settings.Default.topicPm2 = textBoxM2.Text;
Properties.Settings.Default.topicPub3 = textBoxPT3.Text;
Properties.Settings.Default.topicPm3 = textBoxM3.Text;
Properties.Settings.Default.topicPub4 = textBoxPT4.Text;
Properties.Settings.Default.topicPm4 = textBoxM4.Text;
Properties.Settings.Default.red = textBoxRed.Text;
Properties.Settings.Default.green = textBoxGreen.Text;
Properties.Settings.Default.yellow = textBoxYellow.Text;
Properties.Settings.Default.gray = textBoxGray.Text;
Properties.Settings.Default.navy = textBoxNavy.Text;
Properties.Settings.Default.purple = textBoxPurple.Text;
Properties.Settings.Default.lime = textBoxLime.Text;
Properties.Settings.Default.Save(); ;
}
폼로드시 저장된값 불러오기 지정
private void propertyCloseMethod()
{
Properties.Settings.Default.host = textBoxHost.Text;
Properties.Settings.Default.port = textBoxPort.Text;
Properties.Settings.Default.qos = comboBoxQos.Text;
Properties.Settings.Default.topicSub = textBoxSubTopic.Text;
Properties.Settings.Default.topicPub1 = textBoxPubTopic.Text;
Properties.Settings.Default.topicPm1 = textBoxMessage.Text;
Properties.Settings.Default.topicPub2 = textBoxPT2.Text;
Properties.Settings.Default.topicPm2 = textBoxM2.Text;
Properties.Settings.Default.topicPub3 = textBoxPT3.Text;
Properties.Settings.Default.topicPm3 = textBoxM3.Text;
Properties.Settings.Default.topicPub4 = textBoxPT4.Text;
Properties.Settings.Default.topicPm4 = textBoxM4.Text;
Properties.Settings.Default.red = textBoxRed.Text;
Properties.Settings.Default.green = textBoxGreen.Text;
Properties.Settings.Default.yellow = textBoxYellow.Text;
Properties.Settings.Default.gray = textBoxGray.Text;
Properties.Settings.Default.navy = textBoxNavy.Text;
Properties.Settings.Default.purple = textBoxPurple.Text;
Properties.Settings.Default.lime = textBoxLime.Text;
Properties.Settings.Default.Save(); ;
}
폼로드에
propertyload()추가
참고링크
'프로그래밍 > C#' 카테고리의 다른 글
C# ini 저장해서 재실행시 불러오기 (0) | 2022.03.07 |
---|---|
mosquitto conf (0) | 2022.03.07 |
C# 폴더열기 (0) | 2022.03.04 |
데이터그리드뷰 특정값 열 색상채우기 (0) | 2022.03.04 |
C# 데이터그리드뷰 focus 맞추기 (0) | 2022.03.04 |