/// <summary> /// 将默认的构造函数私有化 /// 实现单例模式 /// </summary> /// <returns></returns> public static STK3D createform() { if ((defSTK3D == null) || (defSTK3D.IsDisposed == true)) { defSTK3D = new STK3D(); } return defSTK3D; }
/// <summary> /// 3D窗口 /// </summary> /// <param name="sender"></param> /// <param name="e"></param> private void dToolStripMenuItem1_Click(object sender, EventArgs e) { STK3Dform = STK3D.createform(); STK3Dform.Show(); STK3Dform.Focus(); }