public DefaultScene(Crosswalk.Message message) : base("DefaultScene") { this.message = message; try { Type[] extraTypes = new Type[] { typeof(ObjectListing), typeof(FrameworkCreation) }; ProjectFile project = SerializationHelper.Deserialize <ProjectFile>( message.Messages[2], false, "", extraTypes); materials = project.CreatableObjects.Shaders; } catch { materials = new EonDictionary <string, string>(); materials.Add("Eon.Rendering3D.Framework.Shaders.AnimatedTextureMaterial", "Eon.Rendering3D.dll"); materials.Add("Eon.Rendering3D.Framework.Shaders.BasicLPPMaterial", "Eon.Rendering3D.dll"); materials.Add("Eon.Rendering3D.Framework.Shaders.BasicMaterial", "Eon.Rendering3D.dll"); materials.Add("Eon.Rendering3D.Framework.Shaders.DTLPPMaterial", "Eon.Rendering3D.dll"); } }
void StartLibraryReader() { Crosswalk.Message message = new Crosswalk.Message() { Messages = new string[] { InterOperations.RootFilepath + InterOperations.ContentFilepathExtention + "\\", "Models\\Planets\\Exterior\\Planet_Shader", InterOperations.RootFilepath + InterOperations.ProjectName + ".EPROJ" } }; SerializationHelper.Serialize <Crosswalk.Message>(message, "Temp", ".temp"); Thread.Sleep(500); ProcessStartInfo start = new ProcessStartInfo("EEDK.ModelViewer.exe"); Process reader = new Process(); reader.StartInfo = start; reader.Start(); reader.WaitForExit(); }
void TestProcess(string processName) { Crosswalk.Message message = new Crosswalk.Message() { Messages = new string[] { InterOperations.RootFilepath + InterOperations.ProjectName + ".EPROJ", InterOperations.RootFilepath } }; SerializationHelper.Serialize <Crosswalk.Message>(message, "Temp", ".temp"); Thread.Sleep(500); ProcessStartInfo start = new ProcessStartInfo(processName + ".exe"); Process reader = new Process(); reader.StartInfo = start; reader.Start(); reader.WaitForExit(); Type[] extraTypes = new Type[] { typeof(ObjectListing), typeof(FrameworkCreation) }; InterOperations.Project = SerializationHelper.Deserialize <ProjectFile>( InterOperations.RootFilepath + InterOperations.ProjectName + ".EPROJ", false, "", extraTypes); }
protected override void Initialize() { InputManager.CreateKeyboard(); try { message = SerializationHelper.Deserialize <Crosswalk.Message>("Temp.temp", false, ""); } catch { } base.Initialize(); new DefaultScene(message); }
public Form1() { InitializeComponent(); cboStatic.SelectedIndex = 1; string filter = ".FBX File (*.FBX)|*.FBX"; openDia.InitialDirectory = @"C:\"; openDia.Filter = filter; saveDia.InitialDirectory = @"C:\"; saveDia.Filter = "Model Shader File (*.Shader)|*.Shader"; try { temp = SerializationHelper.Deserialize <Crosswalk.Message>("Temp", false, ".temp"); Type[] extraTypes = new Type[] { typeof(ObjectListing), typeof(FrameworkCreation) }; ProjectFile project = SerializationHelper.Deserialize <ProjectFile>( temp.Messages[0], false, "", extraTypes); materials = project.CreatableObjects.Shaders; for (int i = 0; i < materials.Count; i++) { if (!materials[i].Value.Contains("Eon.")) { if (!coppiedDlls.Contains(materials[i].Value)) { coppiedDlls.Add(materials[i].Value); string path = temp.Messages[1] + "Libraries\\" + materials[i].Value; File.Copy(path, materials[i].Value); } } } } catch { } SetDefaults(); }
static void Main(string[] args) { Crosswalk.Message m = SerializationHelper.Deserialize <Crosswalk.Message>("Temp.temp", false, ""); searchPath = m.Messages[0]; SerializationHelper.DeleteFile("Temp.temp"); if (SerializationHelper.FolderExists(m.Messages[0])) { IEnumerable <string> files = SerializationHelper.GetFiles(m.Messages[0], ".dll"); if (files.Count() > 0) { Console.WriteLine(files.Count() + " Libraries Found."); Console.WriteLine(); SearchFiles(files); Console.WriteLine(); Console.WriteLine(objects.Objects.Count + " Viable Createable Objects Found."); if (objects.Shaders.Count > 0) { Console.WriteLine(objects.Shaders.Count + " Materials Found."); } Console.WriteLine("< End Search >"); } else { Console.WriteLine("No createable objects found in any available directories."); } Type[] types = new Type[] { typeof(EonDictionary <string, string>) }; SerializationHelper.Serialize <ObjectListing>(objects, savePath, types); Console.ReadKey(); } else { SerializationHelper.CreateFolder(searchPath); Main(null); } }
public Form1() { InitializeComponent(); saveDia.Filter = "Language Dictionary File (*.Dict)|*.Dict"; openDia.Filter = "Language Dictionary File (*.Dict)|*.Dict"; try { Crosswalk.Message temp = SerializationHelper.Deserialize <Crosswalk.Message>("Temp", false, ".temp"); projectFilepath = temp.Messages[0]; rootPath = temp.Messages[1]; saveDia.InitialDirectory = rootPath + "Content\\"; openDia.InitialDirectory = rootPath + "Content\\"; } catch { } }
public Form1() { InitializeComponent(); saveDia.InitialDirectory = @"C:\"; saveDia.Title = "Save File"; saveDia.Filter = "3D Paritcle System File (*.Part3D)|*.Part3D"; openDia.InitialDirectory = @"C:\"; openDia.Title = "Browze Files"; openDia.Filter = "3D Paritcle System File (*.Part3D)|*.Part3D"; AssemblyManager.AddAssemblyRef("Eon.Particles"); info = new ParticleSystem3DInfo(); info.Emitters = new EonDictionary <string, ParticleEmitterInfo>(); try { temp = SerializationHelper.Deserialize <Crosswalk.Message>("Temp", false, ".temp"); Type[] extraTypes = new Type[] { typeof(ObjectListing), typeof(FrameworkCreation) }; ProjectFile project = SerializationHelper.Deserialize <ProjectFile>( temp.Messages[0], false, "", extraTypes); FileSource.Attachments = project.CreatableObjects.ParticleAttachments; FileSource.Cycles = project.CreatableObjects.ParticleCycles; FileSource.EmittionTypes = project.CreatableObjects.ParticleEmitters3D; FileSource.RenderTypes = project.CreatableObjects.ParticleRenderMethods3D; FileSource.LoadAssemblies(temp.Messages[1]); } catch { } }
public Form1() { InitializeComponent(); ClearCueInfo(); string filter = "J-Jax File (*.JJAX)|*.JJAX"; saveDia.InitialDirectory = @"C:\"; saveDia.Filter = filter; openDia.InitialDirectory = @"C:\"; openDia.Filter = filter; openSndDia.InitialDirectory = @"C:\"; openSndDia.Filter = "Built Content File (*.xnb)|*.xnb"; jjaxFile = new JJax(); jjaxFile.SoundCategories = new List <string>() { "Background" }; lstCate.Items.Add("Background"); try { Crosswalk.Message temp = SerializationHelper.Deserialize <Crosswalk.Message>("Temp", false, ".temp"); projectFilepath = temp.Messages[0]; rootPath = temp.Messages[1]; saveDia.InitialDirectory = rootPath + "Content\\"; openDia.InitialDirectory = rootPath + "Content\\"; openSndDia.InitialDirectory = rootPath + "Content\\"; } catch { } }
void BtnClicked(string controlID) { if (controlID.Contains("Recent_")) { string filepath = ((TextButton)CurrentControl).Text; bool found = false; if (SerializationHelper.FileExists(filepath)) { recent.Add(filepath); string text = filepath; string[] split = text.Split(new char[] { '\\', '/' }); int len = split[split.Length - 1].Length; len++; text = text.Remove(text.Length - len, len); text += InterOperations.LibraryFilepathExtention; Crosswalk.Message message = new Crosswalk.Message() { Messages = new string[] { text } }; SerializationHelper.Serialize <EEDK.Crosswalk.Message>(message, "Temp.temp", ""); LoadProject(filepath); InterOperations.ProjectName = SerializationHelper.GetFolderName( filepath.Remove(filepath.Length - InterOperations.ProjectFileExtention.Length, InterOperations.ProjectFileExtention.Length)); len = ".EPROJ".Length + InterOperations.ProjectName.Length; InterOperations.RootFilepath = filepath.Remove(filepath.Length - len, len); InterOperations.Project.ProjectRootFilepath = InterOperations.RootFilepath; InterOperations.Project.ProjectName = InterOperations.ProjectName; found = true; } else { recent.Remove(filepath); CurrentControl.Destroy(); } SaveRecent(); if (found) { StartLibraryReader(); } } else { switch (controlID) { case "Load Level": { Common.ShowMouse(true); if (openDia.ShowDialog() == DialogResult.OK) { string filepath = openDia.FileName; recent.Add(filepath); Crosswalk.Message message = new Crosswalk.Message() { Messages = new string[] { (filepath.Remove(filepath.Length - (openDia.SafeFileName.Length + 1), openDia.SafeFileName.Length + 1)) + InterOperations.LibraryFilepathExtention } }; SerializationHelper.Serialize <Crosswalk.Message>(message, "Temp.temp", ""); LoadProject(filepath); InterOperations.ProjectName = SerializationHelper.GetFolderName( filepath.Remove(filepath.Length - InterOperations.ProjectFileExtention.Length, InterOperations.ProjectFileExtention.Length)); int len = ".EPROJ".Length + InterOperations.ProjectName.Length; InterOperations.RootFilepath = filepath.Remove(filepath.Length - len, len); InterOperations.Project.ProjectRootFilepath = InterOperations.RootFilepath; InterOperations.Project.ProjectName = InterOperations.ProjectName; StartLibraryReader(); } Common.ShowMouse(false); SaveRecent(); } break; case "New Level": { Common.ShowMouse(true); if (folderDia.ShowDialog() == DialogResult.OK) { string root = folderDia.SelectedPath; InterOperations.RootFilepath = root + "\\"; InterOperations.Project = new Crosswalk.ProjectFile(); InterOperations.ProjectName = SerializationHelper.GetFolderName(root); recent.Add(root + "\\" + InterOperations.ProjectName + InterOperations.ProjectFileExtention); InterOperations.Project.ProjectRootFilepath = InterOperations.RootFilepath; InterOperations.Project.ProjectName = InterOperations.ProjectName; InterOperations.Project.Framework = new FrameworkCreation() { AssemblyRefferences = new string[] { "Eon", "Eon.Rendering2D", "Eon.Rendering3D" }, DefaultLanguage = "English", DefaultScreenResolution = 0, DefaultScreenSize = 0, DefaultTextureQuality = 2, FullScreen = true, TargetFramerate = 166, EngineComponents = new ParameterCollection[] { new ParameterCollection { ObjectType = "Eon.Rendering3D.Framework.Framework" }, new ParameterCollection { ObjectType = "Eon.Rendering2D.Framework.Framework" } } }; string lib = root + InterOperations.LibraryFilepathExtention; SerializationHelper.CopyFiles(Environment.CurrentDirectory, lib, ".dll", "Eon.", true); string content = root + EEDK.Crosswalk.InterOperations.ContentFilepathExtention + "\\Eon"; string eonRoot = Environment.CurrentDirectory + "\\Content\\Eon"; SerializationHelper.CopyFiles(eonRoot, content, ".xnb", true); EEDK.Crosswalk.Message message = new Crosswalk.Message() { Messages = new string[] { lib } }; SerializationHelper.Serialize <EEDK.Crosswalk.Message>(message, "Temp.temp", ""); StartLibraryReader(); } Common.ShowMouse(false); SaveRecent(); } break; default: Common.ExitGame(); break; } } }