private void InitializeSystemKindInfo() { this.cmbboxSystemKind.Items.Clear(); // "시스템 전체" this.cmbboxSystemKind.Items.Add(entireSystemKind); this.cmbboxSystemKind.SelectedIndex = 0; // 각 종류 추가 if (BasisData.SASKindInfo == null || BasisData.SASKindInfo.Values == null) { return; } foreach (SASKind kind in BasisData.SASKindInfo.Values) { if (kind == null) { continue; } SASKind copy = new SASKind(); copy.DeepCopyFrom(kind); int itemIndex = this.cmbboxSystemKind.Items.Add(copy); } }
private void InitializeSystemKindInfo() { // 각 종류 추가 if (BasisData.SASKindInfo == null || BasisData.SASKindInfo.Values == null) { return; } foreach (SASKind kind in BasisData.SASKindInfo.Values) { if (kind == null) { continue; } SASKind copy = new SASKind(); copy.DeepCopyFrom(kind); int itemIndex = this.chkListBoxSASKind.Items.Add(copy); if (itemIndex >= 0) { this.chkListBoxSASKind.SetItemChecked(itemIndex, true); } } }
private void LoadForm(object sender, EventArgs e) { if (BasisData.SASKindInfo == null || BasisData.SASKindInfo.Values == null) { return; } foreach (SASKind kind in BasisData.SASKindInfo.Values) { SASKind copy = new SASKind(); copy.DeepCopyFrom(kind); int itemIndex = this.chkListBoxStdAlertSystemKind.Items.Add(copy); if (this.originalSelList.Count == 0) { this.chkListBoxStdAlertSystemKind.SetItemCheckState(itemIndex, CheckState.Checked); } } for (int i = 0; i < this.originalSelList.Count; i++) { for (int index = 0; index < this.chkListBoxStdAlertSystemKind.Items.Count; index++) { SASKind ctrlKind = this.chkListBoxStdAlertSystemKind.Items[index] as SASKind; if (ctrlKind == null) { System.Console.WriteLine("[SelectionStdAlertSystemKind] 체크 리스트 => 오브젝트 변환 실패"); continue; } if (this.originalSelList[i].Code == ctrlKind.Code) { this.chkListBoxStdAlertSystemKind.SetItemChecked(index, true); break; } } } }
/// <summary> /// 표준경보시스템 종류 선택 변경 통지 이벤트 핸들러 /// </summary> /// <param name="sender"></param> /// <param name="e"></param> private void orderModeForm_OnNotifySASKindChanged(object sender, SASKindEventArgs e) { if (e.IsAllSelected || e.SelectedSystemKinds == null) { // 전체선택 this.currentOrderInfo.TargetSystemsKinds = null; this.currentOrderInfo.Scope = CAPLib.ScopeType.Public; } else { this.currentOrderInfo.Scope = CAPLib.ScopeType.Restricted; this.currentOrderInfo.TargetSystemsKinds.Clear(); foreach (SASKind kind in e.SelectedSystemKinds) { SASKind copy = new SASKind(); copy.DeepCopyFrom(kind); this.currentOrderInfo.TargetSystemsKinds.Add(copy); } } }