65 lines
1.6 KiB
C#
65 lines
1.6 KiB
C#
|
|
using SamplePre.UIWpf.BaseWindows;
|
|||
|
|
using SamplePreSystem.UI.BaseControls;
|
|||
|
|
using SamplePreSystem.UI.ViewModel.SampleManager;
|
|||
|
|
using System;
|
|||
|
|
using System.Collections.Generic;
|
|||
|
|
using System.Linq;
|
|||
|
|
using System.Text;
|
|||
|
|
using System.Threading.Tasks;
|
|||
|
|
using System.Windows;
|
|||
|
|
using System.Windows.Controls;
|
|||
|
|
using System.Windows.Data;
|
|||
|
|
using System.Windows.Documents;
|
|||
|
|
using System.Windows.Input;
|
|||
|
|
using System.Windows.Media;
|
|||
|
|
using System.Windows.Media.Animation;
|
|||
|
|
using System.Windows.Media.Imaging;
|
|||
|
|
using System.Windows.Shapes;
|
|||
|
|
using System.Xml.XPath;
|
|||
|
|
|
|||
|
|
namespace SamplePre.UIWpf.SampleManager.chirld
|
|||
|
|
{
|
|||
|
|
/// <summary>
|
|||
|
|
/// NewSampleWindow.xaml 的交互逻辑
|
|||
|
|
/// </summary>
|
|||
|
|
public partial class NewSampleWindow : BaseWindow
|
|||
|
|
{
|
|||
|
|
|
|||
|
|
public NewSampleWindow(SampleExecViewModel viewModel)
|
|||
|
|
{
|
|||
|
|
InitializeComponent();
|
|||
|
|
|
|||
|
|
viewModel.CloseAction = (val) => this.DialogResult = val;
|
|||
|
|
|
|||
|
|
this.DataContext = viewModel;
|
|||
|
|
}
|
|||
|
|
|
|||
|
|
|
|||
|
|
|
|||
|
|
private void btnCancel_Click(object sender, RoutedEventArgs e)
|
|||
|
|
{
|
|||
|
|
this.Close();
|
|||
|
|
}
|
|||
|
|
|
|||
|
|
|
|||
|
|
private void ckbStand_Click(object sender, RoutedEventArgs e)
|
|||
|
|
{
|
|||
|
|
e.Handled = true;
|
|||
|
|
UpdateSelectedText();
|
|||
|
|
}
|
|||
|
|
|
|||
|
|
// 把选中的项显示在文本框中
|
|||
|
|
private void UpdateSelectedText()
|
|||
|
|
{
|
|||
|
|
var selected = cmbDataType.ItemsSource.Cast<dynamic>()
|
|||
|
|
.Where(x => x.IsSelected == true)
|
|||
|
|
.Select(x => x.standard_name);
|
|||
|
|
|
|||
|
|
txtSelectedStandards.Text = string.Join(",", selected);
|
|||
|
|
}
|
|||
|
|
|
|||
|
|
|
|||
|
|
|
|||
|
|
}
|
|||
|
|
}
|