| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173 | 
							- using Prism.Regions;
 
- using System.Collections.Generic;
 
- using System.Windows;
 
- using Venus_Themes.CustomControls;
 
- using Venus_UI.Themes.Attach;
 
- using Venus_Unity;
 
- using System.Linq;
 
- using System.Threading;
 
- using System;
 
- using Venus_MainPages.Views;
 
- using System.Windows.Controls;
 
- using Aitex.Core.UI.View.Frame;
 
- using System.Windows.Media;
 
- using Venus_Core;
 
- using System.Reflection;
 
- using Venus_MainPages.Unity;
 
- using MECF.Framework.Common.DataCenter;
 
- using Aitex.Core.RT.SCCore;
 
- using MECF.Framework.Common.OperationCenter;
 
- namespace Venus_UI.Views
 
- {
 
-     /// <summary>
 
-     /// ShellView.xaml 的交互逻辑
 
-     /// </summary>
 
-     public partial class ShellView : Window
 
-     {
 
-         IRegionManager m_regionManager;
 
-         IRegionNavigationService m_regionNavigationService;
 
-         List<VenusMenu> VenusMenu;
 
-         List<TabControl>  centerTabViews=new List<TabControl> ();
 
-         List<Button> buttonList=new List<Button> ();
 
-         public ShellView(IRegionManager regionManager, IRegionNavigationService regionNavigationService)
 
-         {
 
-             InitializeComponent();
 
-             m_regionManager = regionManager;
 
-             m_regionNavigationService = regionNavigationService;
 
-             m_regionManager.RegisterViewWithRegion("TopRegion", typeof(Venus_MainPages.Views.TopView));
 
-             VenusGlobalEvents.SlotRightClickChangedEvent += Instance_SlotRightClickChangedEvent;
 
-             VenusGlobalEvents.SlotWaferTransferEvent += Instance_SlotStartTransferEvent;
 
-         }
 
-         private void Instance_SlotRightClickChangedEvent(OpenSEMI.Ctrlib.Controls.Slot slot)
 
-         {
 
-             if (slot != null)
 
-             {
 
-                 ContextMenu cm = ContextMenuManager.Instance.GetSlotMenus(slot);
 
-                 if (cm != null)
 
-                 {
 
-                     slot.ContextMenu = cm;
 
-                 }
 
-                 return;
 
-             }
 
-         }
 
-         private void Instance_SlotStartTransferEvent(OpenSEMI.Ctrlib.Controls.DragDropEventArgs e)
 
-         {
 
-             InvokeClient.Instance.Service.DoOperation("System.MoveWafer",
 
-                 e.TranferFrom.ModuleID,e.TranferFrom.SlotID, e.TranferTo.ModuleID, e.TranferTo.SlotID,false,1,false,1,"");
 
-             e.TranferFrom.ClearDragDropStatus();
 
-             e.TranferTo.ClearDragDropStatus();
 
-         }
 
-         private void CustomWnd_Loaded(object sender, RoutedEventArgs e)
 
-         {
 
-             VenusMenu = SerializeHelper.Instance.ReadFromJsonFile<List<VenusMenu>>($"Config/UIMenu.json");
 
-             int index = 0;
 
-             for (int i = 0; i < VenusMenu.Count; i++)
 
-             {
 
-                 if (VenusMenu[i].IsShow == false)
 
-                 { 
 
-                     continue;
 
-                 }
 
-                 string[] allModules = QueryDataClient.Instance.Service.GetConfig($"System.InstalledModules").ToString().Split(',');
 
-                 if (VenusMenu[i].Id == "PMA" || VenusMenu[i].Id == "PMB" || VenusMenu[i].Id == "PMC" || VenusMenu[i].Id == "PMD" || VenusMenu[i].Id == "TM")
 
-                 {
 
-                     if (!allModules.Contains(VenusMenu[i].Id))
 
-                     {
 
-                         continue;
 
-                     }
 
-                 }
 
-                     AduRadioButtonIcon aduRadioButtonIcon = new AduRadioButtonIcon();
 
-                 if (i == 0)
 
-                 {
 
-                     aduRadioButtonIcon.IsChecked = true;
 
-                 }
 
-                 IconElement.SetPathData(aduRadioButtonIcon,(Geometry)aduRadioButtonIcon.FindResource($"Icon_{VenusMenu[i].Id}"));
 
-                 aduRadioButtonIcon.Content = VenusMenu[i].Id;
 
-                 aduRadioButtonIcon.Click += AduRadioButtonIcon_Click;
 
-                 aduRadioButtonIcon.SelectBackground = new SolidColorBrush((Color)ColorConverter.ConvertFromString("#6AD7FF"));
 
-                 aduRadioButtonIcon.SelectColor = new SolidColorBrush((Colors.Black));
 
-                 aduRadioButtonIcon.DefaultBackground = new SolidColorBrush((Color)ColorConverter.ConvertFromString("#94BCD7"));
 
-                 //aduRadioButtonIcon.DefaultBackground = new SolidColorBrush(Colors.DarkGray);
 
-                 
 
-                 aduRadioButtonIcon.Width = 180;
 
-                 aduRadioButtonIcon.Height= 40;
 
-                 
 
-                 //aduRadioButtonIcon.Foreground=Brushes.White;
 
-                 aduRadioButtonIcon.Tag = index;
 
-                 index += 1;
 
-                 Bottom_Frame.Children.Add(aduRadioButtonIcon);
 
-                 //if (VenusMenu[i].Id == "PMC")
 
-                 //{
 
-                 //    AduRadioButtonIcon aduRadioButtonIcon2 = new AduRadioButtonIcon();
 
-                    
 
-                 //    IconElement.SetPathData(aduRadioButtonIcon2, (Geometry)aduRadioButtonIcon.FindResource($"Icon_{VenusMenu[i].Id}"));
 
-                 //    aduRadioButtonIcon2.Content = "PMD";
 
-                 //    //aduRadioButtonIcon2.Click += AduRadioButtonIcon_Click;
 
-                 //    aduRadioButtonIcon2.SelectBackground = new SolidColorBrush((Color)ColorConverter.ConvertFromString("#6AD7FF"));
 
-                 //    aduRadioButtonIcon2.SelectColor = new SolidColorBrush((Colors.Black));
 
-                 //    aduRadioButtonIcon2.DefaultBackground = new SolidColorBrush((Color)ColorConverter.ConvertFromString("#94BCD7"));
 
-                 //    //aduRadioButtonIcon.DefaultBackground = new SolidColorBrush(Colors.DarkGray);
 
-                 //    aduRadioButtonIcon2.Width = 180;
 
-                 //    aduRadioButtonIcon2.Height = 40;
 
-                 //    Bottom_Frame.Children.Add(aduRadioButtonIcon2);
 
-                 //}
 
-                 TabControl tabControl = new TabControl();
 
-                 for (int j = 0; j < VenusMenu[i].MenuItem.Count; j++)
 
-                 {
 
-                     if (VenusMenu[i].MenuItem[j].IsShow == false)
 
-                     {
 
-                         continue;
 
-                     }
 
-                     string className;
 
-                     if ((VenusMenu[i].Id == "PMA" || VenusMenu[i].Id == "PMB" || VenusMenu[i].Id == "PMC" || VenusMenu[i].Id == "PMD")&& VenusMenu[i].MenuItem[j].Id== "Operation")
 
-                     {
 
-                         JetChamber jetChamber = (JetChamber)(Convert.ToInt32(QueryDataClient.Instance.Service.GetConfig($"{VenusMenu[i].Id}.ChamberType")));
 
-                         className = $"Venus_MainPages.Views.Over{jetChamber.ToString()}View";
 
-                     }
 
-                     else
 
-                     {
 
-                         className = $"Venus_MainPages.Views.{VenusMenu[i].MenuItem[j].View}";
 
-                     }
 
-                     Type t = Type.GetType($"{className},Venus_MainPages");
 
-                     var obj = System.Activator.CreateInstance(t);
 
-                     
 
-                     if (VenusMenu[i].Id=="PMA" || VenusMenu[i].Id == "PMB" || VenusMenu[i].Id == "PMC" || VenusMenu[i].Id == "PMD" || VenusMenu[i].Id == "TM")
 
-                     {                     
 
-                         MethodInfo methodInfo = t.GetMethod("Init", new Type[] { typeof(string) });
 
-                         methodInfo?.Invoke(obj, new object[] { VenusMenu[i].Id });
 
-                     }
 
-                     tabControl.Items.Add(new TabItem() { Header = VenusMenu[i].MenuItem[j].Name, Content = obj });
 
-                 }
 
-                 centerTabViews.Add(tabControl);
 
-             }
 
-             Main_Frame.Content = centerTabViews[0];
 
-             ModuleManager.Initialize();
 
-         }
 
-         private void AduRadioButtonIcon_Click(object sender, RoutedEventArgs e)
 
-         {
 
-             var currentButton = sender as AduRadioButtonIcon;
 
-             Main_Frame.Content = centerTabViews[Convert.ToInt32(currentButton.Tag)];
 
-         }
 
-         private void CustomWnd_Closed(object sender, EventArgs e)
 
-         {
 
-             System.Diagnostics.Process.GetCurrentProcess().Kill();
 
-         }
 
-     }
 
- }
 
 
  |