Beispiel #1
0
 void editor_Disposed(object sender, EventArgs e)
 {
     if (sender == this.CamControl)
     {
         this.CamControl = null;
     }
     else if (sender == this.m_sceneGraphViewer)
     {
         this.m_sceneGraphViewer = null;
     }
     else if (sender == m_msgWnd)
     {
         m_msgWnd = null;
     }
 }
Beispiel #2
0
        public IEditorForm OpenEditor(string editorType) //System.Type editorType)
        {
            IEditorForm editor = null;

            if (editorType == "CamControl")
            {
                if (this.CamControl == null)
                {
                    this.CamControl                    = (ILocScaleRotEdit)EditorFactory.CreateEditor("LocScaleRotEdit");
                    this.CamControl.EditSprite         = Stage.Camera;
                    this.CamControl.AutoswitchToSprite = false;
                    this.CamControl.Disposed          += new EventHandler(editor_Disposed);
                }
                editor = this.CamControl;
            }
            else
            {
                editor           = EditorFactory.CreateEditor(editorType);
                editor.Disposed += new EventHandler(editor_Disposed);
            }

            this.ShowEditor(editor);
            return(editor);
        }
Beispiel #3
0
 void editor_Disposed(object sender, EventArgs e)
 {
     if (sender == this.CamControl)
         this.CamControl = null;
     else if (sender == this.m_sceneGraphViewer)
         this.m_sceneGraphViewer = null;
     else if (sender == m_msgWnd)
         m_msgWnd = null;
 }
Beispiel #4
0
        //System.Type editorType)
        public IEditorForm OpenEditor(string editorType)
        {
            IEditorForm editor = null;

            if (editorType == "CamControl")
            {
                if (this.CamControl == null)
                {
                    this.CamControl = (ILocScaleRotEdit)EditorFactory.CreateEditor("LocScaleRotEdit");
                    this.CamControl.EditSprite = Stage.Camera;
                    this.CamControl.AutoswitchToSprite = false;
                    this.CamControl.Disposed += new EventHandler(editor_Disposed);
                }
                editor = this.CamControl;
            }
            else
            {
                editor = EditorFactory.CreateEditor(editorType);
                editor.Disposed += new EventHandler(editor_Disposed);
            }

            this.ShowEditor(editor);
            return editor;
        }