private void btnCancel_Click(object sender, EventArgs e) { Document = null; LeftSource = RightSource = TreeSide.None; IsLoadCorr = false; Close(); }
private void btnCancel_Click( object sender, EventArgs e ) { Document = null; LeftSource = RightSource = TreeSide.None; IsLoadCorr = false; Close(); }
private void btnOpen_Click( object sender, EventArgs e ) { if( cbIsLoadLeft.Checked ) { LeftSource = (TreeSide)( Enum.Parse( typeof( TreeSide ), comboLeftSource.Text ) ); } if( cbIsLoadRight.Checked ) { RightSource = (TreeSide)( Enum.Parse( typeof( TreeSide ), comboRightSource.Text ) ); } IsLoadCorr = cbIsLoadCorrInfo.Checked; Close(); }
private void btnOpen_Click(object sender, EventArgs e) { if (cbIsLoadLeft.Checked) { LeftSource = (TreeSide)(Enum.Parse(typeof(TreeSide), comboLeftSource.Text)); } if (cbIsLoadRight.Checked) { RightSource = (TreeSide)(Enum.Parse(typeof(TreeSide), comboRightSource.Text)); } IsLoadCorr = cbIsLoadCorrInfo.Checked; Close(); }
public void Load(TreeView tv, XmlDocument doc, TreeSide fromSide) { if (doc.DocumentElement.Name == "PathTree") { if (fromSide == TreeSide.Left) { XmlElement elem = doc.DocumentElement.SelectNodes("PathNode")[0] as XmlElement; LoadNodeRecursive(tv.Nodes[0], elem, false); } else { throw new Exception("使用了不存在的信息!"); } } else if (doc.DocumentElement.Name == "PathTreePair") { XmlElement elem = null; elem = doc.DocumentElement.SelectNodes("descendant::PathNode")[fromSide == TreeSide.Left ? 0 : 1] as XmlElement; LoadNodeRecursive(tv.Nodes[0], elem, false); } }