| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960 | using CyberX8_MainPages.ViewModels;using System;using System.Collections.Generic;using System.Diagnostics;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;namespace CyberX8_MainPages.Views{    /// <summary>    /// ProcessChamberView.xaml 的交互逻辑    /// </summary>    public partial class ProcessChamberView : UserControl    {        public ProcessChamberView()        {            InitializeComponent();        }        private void UserControl_IsVisibleChanged(object sender, DependencyPropertyChangedEventArgs e)        {            if (e.NewValue != null)            {                bool isShow = (bool)e.NewValue;                if (isShow)                {                    if (this.DataContext != null)                    {                        (this.DataContext as ProcessChamberViewModel).LoadData(this.Tag);                    }                }                else                {                    if (this.DataContext != null)                    {                        (this.DataContext as ProcessChamberViewModel).Hide();                    }                }            }            else            {                if (this.DataContext != null)                {                    (this.DataContext as ProcessChamberViewModel).Hide();                }            }        }    }}
 |