private void ContextMenu_ShowEquipInfo(object sender, RoutedEventArgs e) { if (equip == null) { return; } Thread t = new Thread(new ThreadStart(() => { ShowEquipInfo sei = new ShowEquipInfo(equip); sei.ShowDialog(); })); t.SetApartmentState(ApartmentState.STA); t.Name = equip.Name + "属性修改线程"; t.Start(); }
void Start() { //单例模式注册 _instance = this; }