Load() 공개 메소드

public Load ( string file, FileLoaders loader ) : void
file string
loader FileLoaders
리턴 void
예제 #1
0
        private void LoadEditor(string file, FileLoaders.IFileLoader loader)
        {
            Editors.IEditor editor = null;

            if (loader is FileLoaders.LayeredSurface || loader is FileLoaders.BasicSurface)
            {
                editor = new Editors.LayeredConsoleEditor();
                AddEditor(editor, false);
                editor.Load(file, loader);
            }
            else if (loader is FileLoaders.GameObject)
            {
                editor = new Editors.GameObjectEditor();
                AddEditor(editor, false);
                editor.Load(file, loader);
            }
            else if (loader is FileLoaders.Scene)
            {
                editor = new Editors.SceneEditor();
                AddEditor(editor, false);
                editor.Load(file, loader);
            }
            if (editor != null)
            {
                //editor.RenderedConsole.TextSurface.RenderArea = new Rectangle(0, 0, InnerEmptyBounds.Width, InnerEmptyBounds.Height);
                ChangeActiveEditor(editor);
            }

            topBarPane.IsVisible = true;
            ToolsPane.IsVisible  = true;
        }
        private static void LoadEditor(string file, FileLoaders.IFileLoader loader)
        {
            Editors.IEditor editor = null;

            if (loader is FileLoaders.LayeredTextSurface || loader is FileLoaders.TextSurface)
            {
                editor = new Editors.LayeredConsoleEditor();
                AddEditor(editor, false);
                editor.Load(file, loader);
            }
            else if (loader is FileLoaders.GameObject)
            {
                editor = new Editors.GameObjectEditor();
                AddEditor(editor, false);
                editor.Load(file, loader);
            }
            else if (loader is FileLoaders.Scene)
            {
                editor = new Editors.SceneEditor();
                AddEditor(editor, false);
                editor.Load(file, loader);
            }
            if (editor != null)
            {
                editor.RenderedConsole.TextSurface.RenderArea = new Rectangle(0, 0, InnerEmptyBounds.Width, InnerEmptyBounds.Height);
                ChangeActiveEditor(editor);
            }

            topBarPane.IsVisible = true;
            ToolsPane.IsVisible = true;
            scrollerContainer.IsVisible = true;
        }