/* * 속성 탭 파트 */ //속성 목록 선택 및 로드 private void listBox1_SelectionChanged(object sender, SelectionChangedEventArgs e) { Attr loaded = dm.GetAttrList()[listBox1.SelectedIndex]; if (!grid0.IsEnabled) { grid0.IsEnabled = true; buttonXmlWindow.IsEnabled = true; } textBoxName.Text = loaded.ToString(); //속성 이름 로드 listBox2.DataContext = null; //리스트2에 데이터 정렬해서 출력 listBox2.DataContext = dm.GetCountList(listBox1.SelectedIndex); //비식별화 종류 로드 switch (loaded.type) { case Attr.attrType.qi: radioButtonType0.IsChecked = true; break; case Attr.attrType.sa: radioButtonType1.IsChecked = true; break; case Attr.attrType.attr: radioButtonType2.IsChecked = true; break; } //데이터 타입 종류 로드 radioButtonDataType0.IsChecked = !loaded.numerical; radioButtonDataType1.IsChecked = loaded.numerical; //범위 편집 텍스트 변경 textBlock1.Text = loaded.numerical ? "숫자 범위 편집 (Numeric tree 편집)" : "문자 범위 편집 (Categorical tree 편집)"; //XML 파일 주소 로드 textBoxPath.Text = loaded.path; }
private void writeColumn(XmlWriter writer) { //column 시작 writer.WriteStartElement("column"); for (int i = 0; i < attrList.Count; i++) { Attr a = attrList[i]; writer.WriteStartElement("attr"); writer.WriteAttributeString("name", a.name); writer.WriteAttributeString("index", i.ToString()); writer.WriteAttributeString("type", a.type.ToString()); if (a.type != Attr.attrType.attr) { string pathName = (a.path == "") ? "" : @"./XML/" + a.path; writer.WriteAttributeString("path", pathName); } writer.WriteEndElement(); } //column 끝 writer.WriteEndElement(); }