private void _模板编辑器_Button_Click(object sender, RoutedEventArgs e) { var f = new 模板编辑器(_显示模板_TextBox, false, true) { ParentLayoutRoot = this.LayoutRoot }; f.Closed += new EventHandler(f_Closed); f.ShowDialog(); }
private void _模板编辑器_Button_Click(object sender, RoutedEventArgs e) { if (_当前焦点文本框 == null) { return; } var f = new 模板编辑器(_当前焦点文本框, _当前焦点文本框 == _显示模板_TextBox) { ParentLayoutRoot = this.LayoutRoot }; f.Closed += new EventHandler(f_Closed); f.ShowDialog(); }
private void _下一步_Button_Click(object sender = null, RoutedEventArgs e = null) { // 前置判断 if (!_类型_选择_RadioButton.IsChecked.Value && !_类型_填空_RadioButton.IsChecked.Value && !_类型_判断_RadioButton.IsChecked.Value && !_类型_问答_RadioButton.IsChecked.Value && !_类型_连线_RadioButton.IsChecked.Value ) { MessageBox.Show("请选择 题 类型."); return; } if (_知识面_ComboBox.SelectedIndex < 1) { MessageBox.Show("请选择 题 知识面."); _知识面_ComboBox.Focus(); return; } // 将控件的数据整理成数据对象 var o = new 题.题 { 难度系数 = (int)_难度系数_Slider.Value, 考核意图 = _考核意图_TextBox.Text.Trim(), 知识面编号 = (_知识面_ComboBox.SelectedItem as 题.知识面).知识面编号, 备注 = _备注_TextBox.Text.Trim(), 是否启用 = _是否启用_CheckBox.IsChecked.Value }; if (_类型_选择_RadioButton.IsChecked.Value) { o.类型编号 = 1; var f = new 题_选择_创建(o) { ParentLayoutRoot = this.LayoutRoot }; f.Closed += f_Closed; f.ShowDialog(); } else if (_类型_填空_RadioButton.IsChecked.Value) { o.类型编号 = 2; var f = new 题_填空_创建(o) { ParentLayoutRoot = this.LayoutRoot }; f.Closed += f_Closed; f.ShowDialog(); } else if (_类型_判断_RadioButton.IsChecked.Value) { o.类型编号 = 3; var f = new 题_判断_创建(o) { ParentLayoutRoot = this.LayoutRoot }; f.Closed += f_Closed; f.ShowDialog(); } else if (_类型_问答_RadioButton.IsChecked.Value) { o.类型编号 = 4; var f = new 题_问答_创建(o) { ParentLayoutRoot = this.LayoutRoot }; f.Closed += f_Closed; f.ShowDialog(); } else if (_类型_连线_RadioButton.IsChecked.Value) { o.类型编号 = 5; // for test var f = new 模板编辑器 { ParentLayoutRoot = this.LayoutRoot }; f.ShowDialog(); } }