| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566 | using System;using System.Collections.Generic;using System.Collections.ObjectModel;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.Imaging;using System.Windows.Navigation;using System.Windows.Shapes;using Venus_MainPages.Sequence;namespace Venus_MainPages.Views{    /// <summary>    /// UserControl1.xaml 的交互逻辑    /// </summary>    public partial class RecipeSequenceSelectView : Window    {        private FileNode currentFileNode;        public string FullPath { get; private set; }        public RecipeSequenceSelectView()        {            InitializeComponent();            this.buttonOK.IsEnabled = false;        }        private void buttonCancel_Click(object sender, RoutedEventArgs e)        {            this.DialogResult = false;        }        private void buttonOK_Click(object sender, RoutedEventArgs e)        {            this.DialogResult = true;            if (this.currentFileNode != null)            {                if (this.currentFileNode.IsFile)                {                    this.FullPath = this.currentFileNode.FullPath.Trim();                }            }        }        private void PART_TREE_SelectedItemChanged(object sender, RoutedPropertyChangedEventArgs<object> e)        {            currentFileNode = (FileNode)PART_TREE.SelectedItem;            if (currentFileNode != null)            {                this.buttonOK.IsEnabled = true;            }        }        private void PART_TREE_MouseDoubleClick(object sender, MouseButtonEventArgs e)        {            buttonOK_Click(null, null);        }    }}
 |