From 1aeb815836d84ecfddf761a47862efebbba0ad03 Mon Sep 17 00:00:00 2001
From: client_Wu Xijin <364452445@qq.com>
Date: 星期二, 12 二月 2019 21:55:16 +0800
Subject: [PATCH] 3335 配置表读取重构。

---
 Core/GameEngine/Model/Config/WindowSearchConfig.cs |   72 ++++++++++++++++++-----------------
 1 files changed, 37 insertions(+), 35 deletions(-)

diff --git a/Core/GameEngine/Model/Config/WindowSearchConfig.cs b/Core/GameEngine/Model/Config/WindowSearchConfig.cs
index 61616aa..8be4a26 100644
--- a/Core/GameEngine/Model/Config/WindowSearchConfig.cs
+++ b/Core/GameEngine/Model/Config/WindowSearchConfig.cs
@@ -1,50 +1,52 @@
-锘�//--------------------------------------------------------
-//    [Author]:			绗簩涓栫晫
-//    [  Date ]:		   Friday, April 13, 2018
-//--------------------------------------------------------
-
-using UnityEngine;
-using System;
-
-namespace TableConfig {
-
-    
+锘�//--------------------------------------------------------
+//    [Author]:			绗簩涓栫晫
+//    [  Date ]:		   Tuesday, February 12, 2019
+//--------------------------------------------------------
+
+using UnityEngine;
+using System;
+
+namespace TableConfig {
+
+    
 	public partial class WindowSearchConfig : ConfigBase {
 
-		public int ID { get ; private set ; }
-		public int Type { get ; private set ; }
-		public int Lv { get ; private set ; }
-		public int TABID { get ; private set ; }
-		public string SelectActive { get ; private set; } 
-
+		public int ID;
+		public int Type;
+		public int Lv;
+		public int TABID;
+		public string SelectActive;
+
 		public override string getKey()
         {
             return ID.ToString();
-        }
-
-		public override void Parse() {
+        }
+
+		public override void Parse(string content) {
 			try
             {
-                ID=IsNumeric(rawContents[0]) ? int.Parse(rawContents[0]):0; 
+                var contents = content.Split('\t');
+
+                int.TryParse(contents[0],out ID);
 			
-				Type=IsNumeric(rawContents[1]) ? int.Parse(rawContents[1]):0; 
+				int.TryParse(contents[1],out Type);
 			
-				Lv=IsNumeric(rawContents[2]) ? int.Parse(rawContents[2]):0; 
+				int.TryParse(contents[2],out Lv);
 			
-				TABID=IsNumeric(rawContents[3]) ? int.Parse(rawContents[3]):0; 
+				int.TryParse(contents[3],out TABID);
 			
-				SelectActive = rawContents[4].Trim();
+				SelectActive = contents[4];
             }
             catch (Exception ex)
             {
                 DebugEx.Log(ex);
-            }
-		}
-	
-	}
-
-}
-
-
-
-
+            }
+		}
+	
+	}
+
+}
+
+
+
+

--
Gitblit v1.8.0