private void LoadSceneOk(Window callingWindow) { FileWindow asFileWindow = callingWindow as FileWindow; string fileName = asFileWindow.Results[0]; EditorData.LoadScene(fileName); }
protected override void ProcessDroppedFile(string fileName) { string extension = FileManager.GetExtension(fileName); switch (extension) { case "scnx": EditorData.LoadScene(fileName); break; } }
internal void LoadScene() { OpenFileDialog fileDialog = new OpenFileDialog(); fileDialog.FileName = "*.scnx"; var dialogResult = fileDialog.ShowDialog(); if (dialogResult == DialogResult.OK) { EditorData.LoadScene(fileDialog.FileName); } }
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; } }
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; } } } } } }
void LoadSceneOk(Window callingWindow) { string fileName = ((FileWindow)callingWindow).Results[0]; EditorData.LoadScene(fileName); }
public static void LoadScnxFileWindowOK(FlatRedBall.Gui.Window callingWindow) { EditorData.LoadScene(((FileWindow)callingWindow).Results[0]); }