| 12345678910111213141516171819202122232425262728293031323334 |
- using System.Linq;
- using System.Windows;
- using SHJX.Service.Model.Dao;
- using System.Windows.Controls;
- using System.Collections.Generic;
- using System.Collections.ObjectModel;
- namespace SHJX.Service.CustomControl
- {
- /// <summary>
- /// OptionWindows.xaml 的交互逻辑
- /// </summary>
- public partial class OptionWindows : Window
- {
- public string WaveKey { get; set; }
- public ObservableCollection<string> Wavekeys { get; set; }
- public OptionWindows(List<Wavekey> waves)
- {
- Owner = Application.Current.MainWindow;
- DataContext = this;
- if (waves.Any())
- {
- Wavekeys = new ObservableCollection<string>((from wave in waves select wave.WaveKey).ToList());
- }
- InitializeComponent();
- }
- private void Button_Click(object sender, RoutedEventArgs e)
- {
- WaveKey = cmb_wave.SelectedItem?.ToString();
- DialogResult = true;
- }
- }
- }
|