private void AddeNB(object sender, EventArgs e) { Log.Debug("添加基站"); Log.Info("添加基站"); Log.Warn("添加基站"); AddNodeB.NewInstance(this).Closed += AddNB_Closed; AddNodeB.NewInstance(this).ShowDialog(); }
public static AddNodeB NewInstance(MainWindow obj) { if (m_AddNB == null) { m_AddNB = new AddNodeB(); m_AddNB.Closed += M_AddNB_Closed; // 注册窗口关闭时得处理; m_AddNB.ShowInTaskbar = false; m_AddNB.IsSubWindowShow = true; m_NBControl = obj.NBControler; } return(m_AddNB); }
private static void M_AddNB_Closed(object sender, EventArgs e) { m_AddNB = null; }
/// <summary> /// 添加基站按钮事件; /// </summary> /// <param name="sender"></param> /// <param name="e"></param> private void AddNodeB_Click(object sender, RoutedEventArgs e) { AddNodeB.NewInstance(this).Closed += AddNB_Closed; AddNodeB.NewInstance(this).ShowDialog(); }