public void releaseWindowsData() { if (form_TextsManager != null && !form_TextsManager.IsDisposed) { form_TextsManager.Close(); form_TextsManager.Dispose(); form_TextsManager.releaseRes(); form_TextsManager = null; } if (form_MapImagesManager != null && !form_MapImagesManager.IsDisposed) { form_MapImagesManager.Close(); form_MapImagesManager.Dispose(); form_MapImagesManager.releaseRes(); form_MapImagesManager = null; } if (form_VarsManager != null && !form_VarsManager.IsDisposed) { form_VarsManager.Close(); form_VarsManager.Dispose(); form_VarsManager.releaseRes(); form_VarsManager = null; } if (form_ProptiesManager != null && !form_ProptiesManager.IsDisposed) { form_ProptiesManager.Close(); form_ProptiesManager.Dispose(); form_ProptiesManager = null; } if (form_MAnimation != null && !form_MAnimation.IsDisposed) { form_MAnimation.form_MAnimPW.stopPlayPrieviewBox(); form_MAnimation.form_MFrameEdit.Dispose(); form_MAnimation.form_MFrameLevel.Dispose(); form_MAnimation.form_MConfig.Dispose(); form_MAnimation.form_MCLib.Dispose(); form_MAnimation.form_MImgsList.Dispose(); form_MAnimation.form_MTimeLine.Dispose(); form_MAnimation.Close(); form_MAnimation.Dispose(); form_MAnimation = null; } ArrayList arrayList = new ArrayList(); int openCount = Application.OpenForms.Count; for (int i = 0; i < openCount;i++ ) { arrayList.Add(Application.OpenForms[i]); } for (int i = 0; i < arrayList.Count; i++) { Form openForm = (Form)arrayList[i]; if (!openForm.Equals(this)) { openForm.Close(); openForm.Dispose(); } } }
private void 脚本编辑器ToolStripMenuItem_Click(object sender, EventArgs e) { if (form_ProptiesManager == null) { form_ProptiesManager = new Form_ProptiesManager(this); } else { form_ProptiesManager.initParams(false); } form_ProptiesManager.Show(); form_ProptiesManager.Focus(); }
private void initUI() { setStep(80, "主窗口容器刷新"); this.pictureBox_Physics.MouseWheel += new MouseEventHandler(pictureBoxPhy_MouseWheel); this.setEditMode(EDITMOD_PENCIL); this.pictureBox_Gfx.MouseWheel += new MouseEventHandler(pictureBoxGfx_MouseWheel); this.pictureBox_AT.MouseWheel += new MouseEventHandler(pictureBoxAT_MouseWheel); historyDialog = new SmallDialog_History(this); setStep(85, "属性与数值窗口初始化"); if (form_ProptiesManager == null) { form_ProptiesManager = new Form_ProptiesManager(this); } setStep(90, "变量窗口初始化"); if (form_VarsManager == null) { form_VarsManager = new Form_VarsAndFunctions(this); } //初始化窗口 form_MapImagesManager = new Form_MImgsList(mapImagesManager); form_MapImagesManager.Text = "地图图片管理器"; }