Program.cs 2.6 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273
  1. using CommonLang.Property;
  2. using System;
  3. using System.Collections.Generic;
  4. using System.Linq;
  5. using System.Threading.Tasks;
  6. using System.Web.Helpers;
  7. using System.Windows.Forms;
  8. using XmdsCommonServer.Message;
  9. using XmdsServerTest;
  10. using XmdsServerTest.Server;
  11. namespace XmdsServerTestLauncher
  12. {
  13. static class Program
  14. {
  15. /// <summary>
  16. /// 应用程序的主入口点。
  17. /// </summary>
  18. //[STAThread]
  19. static void Main()
  20. {
  21. // try
  22. // {
  23. // var _zoneConfig = new Pomelo.ZoneConfig()
  24. // {
  25. // startPath = Application.StartupPath,
  26. // assetPath = @"H:\projects\morefuntek\Xmds\GameEditors\GameEditor\data",
  27. // };
  28. // var _fastStreamConfig = new Pomelo.FastStreamConfig()
  29. // {
  30. // port = 13360,
  31. // };
  32. // var _logConfig = new Pomelo.LogConfig()
  33. // {
  34. // configFile = Application.StartupPath + @"\log4net.config",
  35. // outputPath = Application.StartupPath,
  36. // };
  37. // var _iceConfig = new Pomelo.IceConfig()
  38. // {
  39. // host = "0.0.0.0",
  40. // port = 13301,
  41. // };
  42. // var edge = new Pomelo.EdgeJS();
  43. // edge.open(_zoneConfig, _logConfig, _iceConfig, _fastStreamConfig);
  44. // while (Console.ReadLine() != "exit") { }
  45. // edge.close();
  46. // }
  47. // catch (Exception err)
  48. // {
  49. // Console.WriteLine(err.Message);
  50. // }
  51. // {
  52. // ConsumeItemEventB2R e = new ConsumeItemEventB2R();
  53. // e.playerId = "123";
  54. // e.Reason = "abc";
  55. // string json = Json.Encode(e);
  56. // Console.WriteLine(json);
  57. // }
  58. Console.WriteLine("*************************************************");
  59. //ReflectionUtil.LoadDlls(new System.IO.DirectoryInfo(Application.StartupPath));
  60. NodeTestServer server = new NodeTestServer(new System.IO.DirectoryInfo("."));
  61. server.Start("127.0.0.1", 19999);
  62. Console.WriteLine("*************************************************");
  63. Console.WriteLine("* 启动完毕 ");
  64. Console.WriteLine("*************************************************");
  65. Application.EnableVisualStyles();
  66. Application.SetCompatibleTextRenderingDefault(false);
  67. Application.Run(new FormTest(server));
  68. }
  69. }
  70. }