Exemplo n.º 1
0
        //########################################### 构造和初始化 #######################################################
        //private Form_BaseClipsEditor clipsManager = null;
        public Form_MAnimation(Form_Main form_MainT)
        {
            InitializeComponent();
            form_Main = form_MainT;
            Control.CheckForIllegalCrossThreadCalls = false;
            layoutPath = Consts.PATH_EXE_FOLDER + "\\layout_local.xml";

            form_MActorList  = new Form_MActorsList(this);
            form_MFrameEdit  = new Form_MFrameEdit(this);
            form_MFrameLevel = new Form_MFrameLevel(this);
            form_MConfig     = new Form_MConfig(this);
            form_MImgsList   = new Form_MImgsList(this);
            form_MCLib       = new Form_MCLib();
            form_MTimeLine   = new Form_MTimeLine(this);
            form_MAnimPW     = new Form_MAnimPlay(this);

            dockContentes.Add(form_MActorList);
            dockContentes.Add(form_MFrameEdit);
            dockContentes.Add(form_MFrameLevel);
            dockContentes.Add(form_MConfig);
            dockContentes.Add(form_MImgsList);
            dockContentes.Add(form_MCLib);
            dockContentes.Add(form_MTimeLine);
            dockContentes.Add(form_MAnimPW);

            for (int i = 0; i < dockContentes.Count; i++)
            {
                DockContent dockI = ((DockContent)dockContentes[i]);
                dockI.HideOnClose       = true;
                dockI.DockStateChanged += new EventHandler(all_DockStateChanged);
                dockI.SizeChanged      += new EventHandler(all_DockStateChanged);
                dockI.FormClosing      += new FormClosingEventHandler(all_DockContentClosing);
            }
            if (File.Exists(layoutPath))
            {
                DeserializeDockContent dsd = new DeserializeDockContent(IDockContentMe);
                panel_DockPanel.LoadFromXml(layoutPath, dsd);
                refreshDockState();
            }
            else
            {
                resetPanels();
            }
            historyManager = new MA_HistoryManager(this);
        }
        //########################################### 构造和初始化 #######################################################
        //private Form_BaseClipsEditor clipsManager = null;
        public Form_MAnimation(Form_Main form_MainT)
        {
            InitializeComponent();
            form_Main = form_MainT;
            Control.CheckForIllegalCrossThreadCalls = false;
            layoutPath = Consts.PATH_EXE_FOLDER + "\\layout_local.xml";

            form_MActorList = new Form_MActorsList(this);
            form_MFrameEdit = new Form_MFrameEdit(this);
            form_MFrameLevel = new Form_MFrameLevel(this);
            form_MConfig = new Form_MConfig(this);
            form_MImgsList = new Form_MImgsList(this);
            form_MCLib = new Form_MCLib();
            form_MTimeLine = new Form_MTimeLine(this);
            form_MAnimPW = new Form_MAnimPlay(this);

            dockContentes.Add(form_MActorList);
            dockContentes.Add(form_MFrameEdit);
            dockContentes.Add(form_MFrameLevel);
            dockContentes.Add(form_MConfig);
            dockContentes.Add(form_MImgsList);
            dockContentes.Add(form_MCLib);
            dockContentes.Add(form_MTimeLine);
            dockContentes.Add(form_MAnimPW);

            for (int i = 0; i < dockContentes.Count; i++)
            {
                DockContent dockI = ((DockContent)dockContentes[i]);
                dockI.HideOnClose = true;
                dockI.DockStateChanged += new EventHandler(all_DockStateChanged);
                dockI.SizeChanged += new EventHandler(all_DockStateChanged);
                dockI.FormClosing += new FormClosingEventHandler(all_DockContentClosing);
            }
            if (File.Exists(layoutPath))
            {
                DeserializeDockContent dsd = new DeserializeDockContent(IDockContentMe);
                panel_DockPanel.LoadFromXml(layoutPath, dsd);
                refreshDockState();
            }
            else
            {
                resetPanels();
            }
            historyManager = new MA_HistoryManager(this);
        }
Exemplo n.º 3
0
        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();
                }
            }

        }
Exemplo n.º 4
0
 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 = "地图图片管理器";
 }