| 1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495 | using OpenSEMI.ClientBase;using OpenSEMI.Ctrlib.Controls;using PunkHPX8_Core;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 PunkHPX8_Themes.UserControls{    /// <summary>    /// AlignerFrontView.xaml 的交互逻辑    /// </summary>    public partial class AlignerFrontView : UserControl    {        public AlignerFrontView()        {            InitializeComponent();        }        #region UnitData11 (DependencyProperty)        public ModuleInfo UnitData        {            get { return (ModuleInfo)GetValue(UnitDataProperty); }            set { SetValue(UnitDataProperty, value); }        }        public static readonly DependencyProperty UnitDataProperty =            DependencyProperty.Register("UnitData", typeof(ModuleInfo), typeof(AlignerFrontView), new UIPropertyMetadata(null));        public bool ShowTitle1        {            get { return (bool)GetValue(ShowTitle1Property); }            set { SetValue(ShowTitle1Property, value); }        }        public static readonly DependencyProperty ShowTitle1Property =            DependencyProperty.Register("ShowTitle1", typeof(bool), typeof(AlignerFrontView), new UIPropertyMetadata(true));        public string Title1        {            get { return (string)GetValue(Title1Property); }            set { SetValue(Title1Property, value); }        }        public static readonly DependencyProperty Title1Property =            DependencyProperty.Register("Title1", typeof(string), typeof(AlignerFrontView));        private void Slot_SlotMouseButtonDown(object sender, MouseButtonEventArgs e)        {            GlobalEvents.OnSlotRightClickChanged(sender as Slot);        }        private void Canvas_Drop(object sender, DragEventArgs e)        {            var data = e.Data.GetData(typeof(string));            Button btn = new Button();            btn.Content = data;            canvas.Children.Add(btn);            var point = e.GetPosition(canvas);            Canvas.SetLeft(btn, point.X);            Canvas.SetTop(btn, point.Y);            Debug.WriteLine("Canvas_Drop");        }        #endregion        private void EFEMUpper_MouseLeftButtonDown(object sender, MouseButtonEventArgs e)        {            var test = sender as Slot;            DragDrop.DoDragDrop(test, "test", DragDropEffects.Copy);        }        private void Slot_WaferTransferStarted(object sender, DragDropEventArgs e)        {            try            {                GlobalEvents.OnSlotWaferTransfer(e);            }            catch (Exception ex)            {                Trace.WriteLine(ex);            }        }    }}
 |