CommunicationSetView.xaml.cs 895 B

123456789101112131415161718192021222324252627282930
  1. using Muchinfo.MTPClient.Data.Enums;
  2. using Muchinfo.MTPClient.Data.Model.Account;
  3. using Muchinfo.MTPClient.UI.ViewModels;
  4. using Muchinfo.WPF.Controls.Windows;
  5. namespace Muchinfo.MTPClient.UI.Views
  6. {
  7. /// <summary>
  8. /// 通讯设置
  9. /// </summary>
  10. public partial class CommunicationSetView : WindowBase
  11. {
  12. public CommunicationSetView(string exchangeid, Services selectServices)
  13. {
  14. InitializeComponent();
  15. this.DataContext = new CommunicationSetViewModel(exchangeid, selectServices);
  16. }
  17. private void grid_MouseDoubleClick(object sender, System.Windows.Input.MouseButtonEventArgs e)
  18. {
  19. if (grid.SelectedIndex >= 0)
  20. {
  21. var item = grid.SelectedItem as TradeServer;
  22. if (item == null) return;
  23. item.IsChecked = true;
  24. }
  25. }
  26. }
  27. }