public void InitializeClientWithServer() { try { MetaverseServer.GetInstance().Init(_commandlineConfig, ServerControllers.Instance); MetaverseClient.GetInstance().Tick += new MetaverseClient.TickHandler(EntryPoint_Tick); MetaverseClient.GetInstance().Init(_commandlineConfig, ClientControllers.Instance); } catch (Exception e) { Console.WriteLine(e); string errorlogpath = EnvironmentHelper.GetExeDirectory() + "/error.log"; StreamWriter sw = new StreamWriter(errorlogpath, false); sw.WriteLine(LogFile.GetInstance().logfilecontents); sw.WriteLine(e.ToString()); sw.Close(); if (System.Environment.OSVersion.Platform != PlatformID.Unix) { ProcessStartInfo psi = new ProcessStartInfo("notepad.exe", errorlogpath); psi.UseShellExecute = true; Process process = new Process(); process.StartInfo = psi; process.Start(); } else { throw new NotImplementedException("An exception has occurred and we are not sure yet how to show this to you. Please look over your log files for errors"); } } return; }
public void LoadClientPlugins() { LoadGlobalPlugins(); UIEntityPropertiesDialog.GetInstance(); Editing3d.GetInstance(); SelectionController.GetInstance(); AssignTextureHandler.GetInstance(); AssignColorHandler.GetInstance(); WorldPersistToXml.GetInstance(); ImportExportPrimBlender.GetInstance(); EntityDelete.GetInstance(); //SimpleCube.Register(); // SimpleCube and SimpleCone are for testing primarily //SimpleCone.Register(); FractalSplineBox.Register(); FractalSplinePrism.Register(); FractalSplineCylinder.Register(); FractalSplineTube.Register(); FractalSplineRing.Register(); FractalSplineTorus.Register(); //WorldView.GetInstance(); //plugins.Add(new DrawAxes()); FrustrumCulling.GetInstance(); ServerInfo.GetInstance(); ConnectToServerDialog.GetInstance(); MainTerrainWindow.GetInstance(); BrushEffectController.GetInstance().Register(new RaiseLower()); BrushEffectController.GetInstance().Register(new FixedHeight()); BrushEffectController.GetInstance().Register(new Flatten()); BrushEffectController.GetInstance().Register(new PaintTexture()); BrushShapeController.GetInstance().Register(new RoundBrush()); BrushShapeController.GetInstance().Register(new SquareBrush()); EditController.GetInstance(); plugins.Add(new CurrentEditSpot()); // add allowed serialization/deserialization types (security measure) OsmpXmlSerializer.GetInstance().RegisterType(typeof(Prim)); OsmpXmlSerializer.GetInstance().RegisterType(typeof(Vector3)); OsmpXmlSerializer.GetInstance().RegisterType(typeof(Rot)); OsmpXmlSerializer.GetInstance().RegisterType(typeof(Vector2)); OsmpXmlSerializer.GetInstance().RegisterType(typeof(TerrainModel)); OsmpXmlSerializer.GetInstance().RegisterType(typeof(Color)); OsmpXmlSerializer.GetInstance().RegisterType(typeof(MapTextureStageModel)); OsmpXmlSerializer.GetInstance().RegisterType(typeof(FractalSplineBox)); OsmpXmlSerializer.GetInstance().RegisterType(typeof(FractalSplineCylinder)); OsmpXmlSerializer.GetInstance().RegisterType(typeof(FractalSplinePrim)); OsmpXmlSerializer.GetInstance().RegisterType(typeof(FractalSplinePrism)); OsmpXmlSerializer.GetInstance().RegisterType(typeof(FractalSplineRing)); OsmpXmlSerializer.GetInstance().RegisterType(typeof(FractalSplineTorus)); OsmpXmlSerializer.GetInstance().RegisterType(typeof(FractalSplineTube)); OsmpXmlSerializer.GetInstance().RegisterType(typeof(Avatar)); OsmpXmlSerializer.GetInstance().RegisterType(typeof(EntityGroup)); OsmpXmlSerializer.GetInstance().RegisterType(typeof(Entity)); MetaverseClient.GetInstance().worldstorage.terrainmodel.NewMap(); DumpLogfile.GetInstance(); HelpAbout.GetInstance(); KeyHandlerQuit.GetInstance(); }