예제 #1
0
        private void LoadSceneOk(Window callingWindow)
        {
            FileWindow asFileWindow = callingWindow as FileWindow;

            string fileName = asFileWindow.Results[0];

            EditorData.LoadScene(fileName);
        }
예제 #2
0
        protected override void ProcessDroppedFile(string fileName)
        {
            string extension = FileManager.GetExtension(fileName);

            switch (extension)
            {
            case "scnx":
                EditorData.LoadScene(fileName);
                break;
            }
        }
예제 #3
0
        internal void LoadScene()
        {
            OpenFileDialog fileDialog = new OpenFileDialog();

            fileDialog.FileName = "*.scnx";

            var dialogResult = fileDialog.ShowDialog();

            if (dialogResult == DialogResult.OK)
            {
                EditorData.LoadScene(fileDialog.FileName);
            }
        }
예제 #4
0
        public override void ProcessCommandLineArgument(string argument)
        {
            string extension = FileManager.GetExtension(argument);

            switch (extension)
            {
            case "scnx":
                EditorData.LoadScene(argument);

                break;

            case "plylstx":

                EditorData.LoadPolygonList(argument);
                break;

            case "shcx":
                EditorData.LoadShapeCollection(argument);
                break;
            }
        }
예제 #5
0
        public static void AutoSearchScn(Window callingWindow)
        {
            callingWindow.Parent.CloseWindow();
            List <string> allFiles = FileManager.GetAllFilesInDirectory(System.IO.Directory.GetCurrentDirectory());

            for (int i = allFiles.Count - 1; i > -1; i--)
            {
                if (FlatRedBall.IO.FileManager.GetExtension(allFiles[i]) != "scnx")
                {
                    allFiles.RemoveAt(i);
                }
            }


            //throw new NotImplementedException("Feature not implemented.  Complain on FlatRedBall forums");



            foreach (string scnFile in allFiles)
            {
                SpriteEditorScene ses = SpriteEditorScene.FromFile(scnFile);

                foreach (SpriteSave ss in ses.SpriteList)
                {
                    for (int i = EditorData.lastLoadedFile.emitters.Count - 1; i > -1; i--)
                    {
                        if (EditorData.lastLoadedFile.emitters[i].ParentSpriteName != null)
                        {
                            if (ss.Name == EditorData.lastLoadedFile.emitters[i].ParentSpriteName)
                            {
                                EditorData.LoadScene(scnFile);

                                return;
                            }
                        }
                    }
                }
            }
        }
예제 #6
0
        void LoadSceneOk(Window callingWindow)
        {
            string fileName = ((FileWindow)callingWindow).Results[0];

            EditorData.LoadScene(fileName);
        }
예제 #7
0
 public static void LoadScnxFileWindowOK(FlatRedBall.Gui.Window callingWindow)
 {
     EditorData.LoadScene(((FileWindow)callingWindow).Results[0]);
 }