public void UserControl_Unloaded(object sender, RoutedEventArgs e) { ZSPCt.UserControl_Unloaded(this, null); try { queryThread.Abort(); } catch (Exception e1) { //这里处理queryThread为空的异常 } Thread.Sleep(100); }
public bool HomeZsp() { ZSPCt.SetZSP(0, 0); return(false); }
void System.Windows.Markup.IComponentConnector.Connect(int connectionId, object target) { switch (connectionId) { case 1: #line 8 "..\..\ArmCtrl.xaml" ((PMAC_Communicate.UserControl1)(target)).Unloaded += new System.Windows.RoutedEventHandler(this.UserControl_Unloaded); #line default #line hidden return; case 2: this.BT_Conn = ((System.Windows.Controls.Button)(target)); #line 15 "..\..\ArmCtrl.xaml" this.BT_Conn.Click += new System.Windows.RoutedEventHandler(this.BT_CNT_Click); #line default #line hidden return; case 3: this.BT_SrvOn = ((System.Windows.Controls.Button)(target)); #line 24 "..\..\ArmCtrl.xaml" this.BT_SrvOn.Click += new System.Windows.RoutedEventHandler(this.BT_SrvOn_Click); #line default #line hidden return; case 4: this.BT_Run = ((System.Windows.Controls.Button)(target)); #line 32 "..\..\ArmCtrl.xaml" this.BT_Run.Click += new System.Windows.RoutedEventHandler(this.BT_RunPro_Click); #line default #line hidden return; case 5: this.BT_HitOne = ((System.Windows.Controls.Button)(target)); #line 40 "..\..\ArmCtrl.xaml" this.BT_HitOne.Click += new System.Windows.RoutedEventHandler(this.BT_HitOne_Click); #line default #line hidden return; case 6: this.BT_Stop = ((System.Windows.Controls.Button)(target)); #line 48 "..\..\ArmCtrl.xaml" this.BT_Stop.Click += new System.Windows.RoutedEventHandler(this.BT_Stop_Click); #line default #line hidden return; case 7: this.BT_HOME = ((System.Windows.Controls.Button)(target)); #line 58 "..\..\ArmCtrl.xaml" this.BT_HOME.Click += new System.Windows.RoutedEventHandler(this.BT_HOME_Click); #line default #line hidden return; case 8: this.ZSPCt = ((PMAC_Communicate.ZSPCt)(target)); return; case 9: this.TBK_VisionMsg = ((System.Windows.Controls.TextBlock)(target)); return; case 10: this.TBK_Statue = ((System.Windows.Controls.TextBlock)(target)); return; case 11: this.TBX_inputMsg = ((System.Windows.Controls.TextBox)(target)); return; case 12: this.TBK_outMsg = ((System.Windows.Controls.TextBlock)(target)); return; case 13: #line 72 "..\..\ArmCtrl.xaml" ((System.Windows.Controls.Button)(target)).Click += new System.Windows.RoutedEventHandler(this.BT_Send_Click); #line default #line hidden return; case 14: this.CB_SAVETRACE = ((System.Windows.Controls.CheckBox)(target)); return; case 15: this.TB_Delay = ((System.Windows.Controls.TextBox)(target)); return; case 16: #line 75 "..\..\ArmCtrl.xaml" ((System.Windows.Controls.Button)(target)).Click += new System.Windows.RoutedEventHandler(this.Button_Click); #line default #line hidden return; case 17: this.BT_ReInit = ((System.Windows.Controls.Button)(target)); #line 81 "..\..\ArmCtrl.xaml" this.BT_ReInit.Click += new System.Windows.RoutedEventHandler(this.BT_ReInit_Click); #line default #line hidden return; case 18: this.TB_Statue = ((System.Windows.Controls.TextBlock)(target)); return; } this._contentLoaded = true; }