using MyWPFControl.Controls; using System.Text; 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 B20UVLog { /// /// Interaction logic for MainWindow.xaml /// public partial class MainWindow : MWindow { public MainWindow() { InitializeComponent(); //FrameContent.Source = new Uri("Pages/AxisData.xaml", UriKind.RelativeOrAbsolute); } private void TreeView_SelectedItemChanged(object sender, RoutedPropertyChangedEventArgs e) { TreeView treeView = sender as TreeView; MTreeViewItem treeViewItem = treeView.SelectedItem as MTreeViewItem; switch (treeViewItem.Header.ToString()) { case "Axis Data": FrameContent.Source = new Uri("Pages/AxisData.xaml", UriKind.RelativeOrAbsolute); break; case "Servo Axis Status": FrameContent.Source = new Uri("Pages/ServoAxisStatus.xaml", UriKind.RelativeOrAbsolute); break; case "Glass Information": FrameContent.Source = new Uri("Pages/GlassInformation.xaml", UriKind.RelativeOrAbsolute); break; case "Lamp Use Time": FrameContent.Source = new Uri("Pages/LampUseTime.xaml", UriKind.RelativeOrAbsolute); break; case "Recipe Body": FrameContent.Source = new Uri("Pages/RecipeBody.xaml", UriKind.RelativeOrAbsolute); break; case "SYS Para": FrameContent.Source = new Uri("Pages/SYSPara.xaml", UriKind.RelativeOrAbsolute); break; case "Robot Interface": FrameContent.Source = new Uri("Pages/RobotInterface.xaml", UriKind.RelativeOrAbsolute); break; case "Y Measure Data": FrameContent.Source = new Uri("Pages/YMeasureData.xaml", UriKind.RelativeOrAbsolute); break; case "EQP Status": FrameContent.Source = new Uri("Pages/EQPStatus.xaml", UriKind.RelativeOrAbsolute); break; case "Recipe Count": FrameContent.Source = new Uri("Pages/RecipeCount.xaml", UriKind.RelativeOrAbsolute); break; case "ANALog Data": FrameContent.Source = new Uri("Pages/ANALogData.xaml", UriKind.RelativeOrAbsolute); break; case "Alarm": FrameContent.Source = new Uri("Pages/Alarm.xaml", UriKind.RelativeOrAbsolute); break; case "IO": FrameContent.Source = new Uri("Pages/IO.xaml", UriKind.RelativeOrAbsolute); break; default: FrameContent.Source = null; break; } } } }