diff options
-rw-r--r-- | AssetsStructure/README.md | 1 | ||||
-rw-r--r-- | EncryptedData/IEncryptedData.cs | 12 | ||||
-rw-r--r-- | EncryptedData/Vector3_e.cs | 14 | ||||
-rw-r--r-- | EncryptedData/bool_e.cs | 12 | ||||
-rw-r--r-- | EncryptedData/doc/README.md | 0 | ||||
-rw-r--r-- | EncryptedData/float_e.cs | 18 | ||||
-rw-r--r-- | EncryptedData/int_e.cs | 38 | ||||
-rw-r--r-- | EncryptedData/long_e.cs | 19 | ||||
-rw-r--r-- | EventMsgCenter/BaseSend.cs | 39 | ||||
-rw-r--r-- | EventMsgCenter/BroadcastCallBack.cs | 9 | ||||
-rw-r--r-- | EventMsgCenter/EventMsgCenter.cs | 35 | ||||
-rw-r--r-- | Json/Json.cs | 0 | ||||
-rw-r--r-- | Localization/Language.cs | 0 | ||||
-rw-r--r-- | Localization/LanguageManager.cs | 0 | ||||
-rw-r--r-- | Log/LogHelper.cs | 0 | ||||
-rw-r--r-- | Log/README.md | 0 | ||||
-rw-r--r-- | NetWork/AsynClient.cs | 250 | ||||
-rw-r--r-- | Pool/Pool.cs | 0 | ||||
-rw-r--r-- | SetActiveX/README.md | 1 | ||||
-rw-r--r-- | Singleton/Singleton.cs | 28 | ||||
-rw-r--r-- | UIUtil/ContentSizeFilterExt/ContentSizeFilterExt.cs | 0 | ||||
-rw-r--r-- | UIUtil/ContentSizeFilterExt/README.md | 0 | ||||
-rw-r--r-- | 编程规范/README.md | 0 |
23 files changed, 0 insertions, 476 deletions
diff --git a/AssetsStructure/README.md b/AssetsStructure/README.md deleted file mode 100644 index df1b457..0000000 --- a/AssetsStructure/README.md +++ /dev/null @@ -1 +0,0 @@ -# Assets Stucture Recomanded
\ No newline at end of file diff --git a/EncryptedData/IEncryptedData.cs b/EncryptedData/IEncryptedData.cs deleted file mode 100644 index d7a83a2..0000000 --- a/EncryptedData/IEncryptedData.cs +++ /dev/null @@ -1,12 +0,0 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; - -namespace Assets.Scripts.Tools.Cheat -{ - public interface IEncryptedData - { - void SetDefaultValue(); - } -} diff --git a/EncryptedData/Vector3_e.cs b/EncryptedData/Vector3_e.cs deleted file mode 100644 index 29d30c9..0000000 --- a/EncryptedData/Vector3_e.cs +++ /dev/null @@ -1,14 +0,0 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; - -namespace Assets.Scripts.Tools.Cheat -{ - class Vector3_e : IEquatable<int_e>, IComparable<int_e>, IEncryptedData - { - private float_e _datax; - private float_e _datay; - private float_e _dataz; - } -} diff --git a/EncryptedData/bool_e.cs b/EncryptedData/bool_e.cs deleted file mode 100644 index f0b8ac3..0000000 --- a/EncryptedData/bool_e.cs +++ /dev/null @@ -1,12 +0,0 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; - -namespace Assets.Scripts.Tools.Cheat -{ - class bool_e : IEquatable<int_e>, IComparable<int_e>, IEncryptedData - { - private int_e _date; - } -} diff --git a/EncryptedData/doc/README.md b/EncryptedData/doc/README.md deleted file mode 100644 index e69de29..0000000 --- a/EncryptedData/doc/README.md +++ /dev/null diff --git a/EncryptedData/float_e.cs b/EncryptedData/float_e.cs deleted file mode 100644 index 12489d5..0000000 --- a/EncryptedData/float_e.cs +++ /dev/null @@ -1,18 +0,0 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; - -namespace Assets.Scripts.Tools.Cheat -{ - class float_e : IEquatable<int_e>, IComparable<int_e>, IEncryptedData - { - private bool _isInit; - private float _data; - private int _verifynum; - private float _backData; - private static int _randomSeed; - - - } -} diff --git a/EncryptedData/int_e.cs b/EncryptedData/int_e.cs deleted file mode 100644 index 1622268..0000000 --- a/EncryptedData/int_e.cs +++ /dev/null @@ -1,38 +0,0 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; - -namespace Assets.Scripts.Tools.Cheat -{ - // encrypted integer - class int_e : IEquatable<int_e>, IComparable<int_e>, IEncryptedData - { - private bool _isInit; - private int _data; - private int _verifynum; - private int _backData; - private static int _randomSeed; - - public int GetData() - { - return _data; - } - - public void SetData(int value) - { - - } - - public void SetDefaultValue() - { - SetData(0); - } - - private bool VerifyData() - { - - } - - } -} diff --git a/EncryptedData/long_e.cs b/EncryptedData/long_e.cs deleted file mode 100644 index d166124..0000000 --- a/EncryptedData/long_e.cs +++ /dev/null @@ -1,19 +0,0 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; - -namespace Assets.Scripts.Tools.Cheat -{ - class long_e : IEquatable<int_e>, IComparable<int_e>, IEncryptedData - { - private bool _isInit; - private long _data; - private long _verifynum; - private long _backData; - private static long _randomSeed; - - - - } -} diff --git a/EventMsgCenter/BaseSend.cs b/EventMsgCenter/BaseSend.cs deleted file mode 100644 index b240e57..0000000 --- a/EventMsgCenter/BaseSend.cs +++ /dev/null @@ -1,39 +0,0 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; - -namespace Assets.Scripts.Tools.EventMsgCenter -{ - class BaseSend <EventType, MsgCenter> - where MsgCenter : class, new() - { - private Dictionary<EventType, LinkedList<BroadcastCallBack>> _broadcastTable = new Dictionary<EventType, LinkedList<BroadcastCallBack>>(); - - public void BaseRegisterMsg(EventType e, BroadcastCallBack callback, bool addfirst = false) - { - - } - - public void BaseUnRegisterMsg(EventType e, BroadcastCallBack callback) - { - - } - - public void BaseUnRegisterAllMsg(EventType e) - { - - } - - public void BaseUnRegisterAllMsg() - { - - } - - public void BaseSendMsg(EventType e, params object[] objs) - { - - } - - } -} diff --git a/EventMsgCenter/BroadcastCallBack.cs b/EventMsgCenter/BroadcastCallBack.cs deleted file mode 100644 index 019f434..0000000 --- a/EventMsgCenter/BroadcastCallBack.cs +++ /dev/null @@ -1,9 +0,0 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; - -namespace Assets.Scripts.Tools.EventMsgCenter -{ - public delegate void BroadcastCallBack(params object[] objs); -} diff --git a/EventMsgCenter/EventMsgCenter.cs b/EventMsgCenter/EventMsgCenter.cs deleted file mode 100644 index 995e6f5..0000000 --- a/EventMsgCenter/EventMsgCenter.cs +++ /dev/null @@ -1,35 +0,0 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; - -namespace Assets.Scripts.Tools.EventMsgCenter -{ - public enum Events - { - - } - - class EventMsgCenter : BaseSend<Events, EventMsgCenter> - { - public void RegisterMsg(Events e, BroadcastCallBack callback, bool addfirst) - { - BaseRegisterMsg(e, callback, addfirst); - } - - public void UnRegisterMsg(Events e, BroadcastCallBack callback) - { - BaseUnRegisterMsg(e, callback); - } - - public void UnRegisterAllMsg(Events e) - { - BaseUnRegisterAllMsg(e); - } - - public void unRegisterAllMsg() - { - BaseUnRegisterAllMsg(); - } - } -} diff --git a/Json/Json.cs b/Json/Json.cs deleted file mode 100644 index e69de29..0000000 --- a/Json/Json.cs +++ /dev/null diff --git a/Localization/Language.cs b/Localization/Language.cs deleted file mode 100644 index e69de29..0000000 --- a/Localization/Language.cs +++ /dev/null diff --git a/Localization/LanguageManager.cs b/Localization/LanguageManager.cs deleted file mode 100644 index e69de29..0000000 --- a/Localization/LanguageManager.cs +++ /dev/null diff --git a/Log/LogHelper.cs b/Log/LogHelper.cs deleted file mode 100644 index e69de29..0000000 --- a/Log/LogHelper.cs +++ /dev/null diff --git a/Log/README.md b/Log/README.md deleted file mode 100644 index e69de29..0000000 --- a/Log/README.md +++ /dev/null diff --git a/NetWork/AsynClient.cs b/NetWork/AsynClient.cs deleted file mode 100644 index 20efcc7..0000000 --- a/NetWork/AsynClient.cs +++ /dev/null @@ -1,250 +0,0 @@ -using System; -using System.Net; -using System.Net.Sockets; -using System.Collections.Generic; -using System.Linq; -using System.Text; -using System.Threading; - -/* -public class Messageinfo -{ - public MsgHeader header; // 消息头 - public byte[] databuffer; // 数据本体 -} - -*/ - -namespace Assets.Scripts.NetWork -{ - // 发送出去的data buffer - public class SendBufferInfo - { - public UInt32 seqId; - public byte[] buffer; - public int length; - } - - public class AsynClient - { - public const int BufferSzie = 65500; - private byte[] socketCacheBuffer = new byte[BufferSzie]; - - private int mPort; - private string mServerAddress; - - private volatile Socket mClient = null; - private volatile bool isConnectionEstablished = false; - // thread lock - private volatile object lockThis = new object(); - - //private vp_Timer.Handle timerHandle = new vp_Timer.Handle(); - - private const int SendReceiveTimeOut = 3000; - - public delegate void OnCoonectCallBack(); - public delegate void OnConnectFail(Exception e); - public delegate void OnDisconnectCallBack(); - public delegate void OnSendCallBack(SendBufferInfo bufferInfo, bool isCompleted); - public delegate void OnReceiveCallBack(byte[] buffer, int length); - - public OnCoonectCallBack connectCallBack = null; - public OnConnectFail connectFailCallBack = null; - public OnDisconnectCallBack disConnectCallBack = null; - public OnSendCallBack sendCallBack = null; - public OnReceiveCallBack receiveCallBack = null; - - // socket - public void StartClient(int port, string serverAddress, int timeOutMS) - { - lock(lockThis) - { - mPort = port; - mServerAddress = serverAddress; - - try - { - IPAddress[] ipAddresses = Dns.GetHostAddresses(mServerAddress); - if(ipAddresses.Length == 0) - { - return; - } - IPAddress ipAddress = ipAddresses[0]; - IPEndPoint remoteEndPoint = new IPEndPoint(ipAddress, mPort); - - mClient = new Socket(AddressFamily.InterNetwork, SocketType.Stream, ProtocolType.Tcp); - mClient.BeginConnect(remoteEndPoint, new AsyncCallback(ConnectCallback), null); - - // - } - catch(Exception e) - { - CloseClient(); - } - } - } - - private void CloseClient() - { - try - { - if(!isConnectionEstablished) - { - - mClient.Close(); - mClient = null; - if (disConnectCallBack != null) - disConnectCallBack(); - return; - } - isConnectionEstablished = false; - if (mClient != null) - mClient.Shutdown(SocketShutdown.Both); - if(mClient != null) - { - mClient.Close(); - mClient = null; - } - if (disConnectCallBack != null) - disConnectCallBack(); - } - catch(Exception e) - { - if (disConnectCallBack != null) - disConnectCallBack(); - } - } - - // 用来设置连接超时 - private void timer_connection_tick() - { - //lock (lockThis) - //{ - // if(null == mClient || !mClient.Connected) - // { - // timerHandler.Cancel(); - // if (null != mCLient) - // CloseClient(); - // } - //} - } - - private void ConnectCallback(IAsyncResult ar) - { - lock (lockThis) - { - try - { - if(null != mClient && null != ar) - { - mClient.EndConnect(ar); - mClient.ReceiveTimeout = SendReceiveTimeOut; - mClient.SendTimeout = SendReceiveTimeOut; - - isConnectionEstablished = true; - - if (connectCallBack != null) - connectCallBack(); - - // 接收线程 - Thread receiveThread = new Thread(new ThreadStart(AsyncRecive)); - receiveThread.Start(); - } - else - { - } - } - catch(Exception e) - { - if (connectFailCallBack != null) - connectFailCallBack(e); - CloseClient(); - } - } - } - - private void AsyncRecive() - { - try - { - while (true) - { - lock (lockThis) - { - if (!isConnectionEstablished) - break; - if (null == mClient || !mClient.Connected) - break; - if (mClient.Available > 0) - { - int bytesRead = mClient.Receive(socketCacheBuffer, 0, socketCacheBuffer.Length, SocketFlags.None); - if (bytesRead > 0) - { - if (receiveCallBack != null) - { - receiveCallBack(socketCacheBuffer, bytesRead); - } - else - { - } - } - else - { - // 服务器主动断线 - CloseClient(); - break; - } - } - } - Thread.Sleep(10); - } - } - catch(Exception e) - { - - } - } - - public void Send(SendBufferInfo sendBuffer) - { - lock (lockThis) - { - if(sendBuffer.length <= 0 || sendBuffer.length > sendBuffer.buffer.Length) - { - sendCallBack(sendBuffer, true); - return; - } - - try - { - if(!isConnectionEstablished) - { - sendCallBack(sendBuffer, false); - return; - } - - //NetWorkData.totalSendBytes += sendBuffer.length; // 统计发送的字节 - mClient.Send(sendBuffer.buffer, 0, sendBuffer.length, SocketFlags.None); - sendCallBack(sendBuffer, true); - - } - catch(Exception e) - { - sendCallBack(sendBuffer, false); - CloseClient(); - } - } - } - - public void CloseNetWorkConnect() - { - lock (lockThis) - { - CloseClient(); - } - } - - - } -} - diff --git a/Pool/Pool.cs b/Pool/Pool.cs deleted file mode 100644 index e69de29..0000000 --- a/Pool/Pool.cs +++ /dev/null diff --git a/SetActiveX/README.md b/SetActiveX/README.md deleted file mode 100644 index 98dd78a..0000000 --- a/SetActiveX/README.md +++ /dev/null @@ -1 +0,0 @@ -ʾ/ؿƵİ diff --git a/Singleton/Singleton.cs b/Singleton/Singleton.cs deleted file mode 100644 index 4b5ae47..0000000 --- a/Singleton/Singleton.cs +++ /dev/null @@ -1,28 +0,0 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; - -namespace Assets.Scripts.Tools.Singleton -{ - class Singleton<T> where T : class, new() - { - private static T _instance; - - public static T Instance - { - get - { - if (_instance == null) - _instance = new T(); - return _instance; - } - } - - public static void Release() - { - if (_instance != null) - _instance = null; - } - } -} diff --git a/UIUtil/ContentSizeFilterExt/ContentSizeFilterExt.cs b/UIUtil/ContentSizeFilterExt/ContentSizeFilterExt.cs deleted file mode 100644 index e69de29..0000000 --- a/UIUtil/ContentSizeFilterExt/ContentSizeFilterExt.cs +++ /dev/null diff --git a/UIUtil/ContentSizeFilterExt/README.md b/UIUtil/ContentSizeFilterExt/README.md deleted file mode 100644 index e69de29..0000000 --- a/UIUtil/ContentSizeFilterExt/README.md +++ /dev/null diff --git a/编程规范/README.md b/编程规范/README.md deleted file mode 100644 index e69de29..0000000 --- a/编程规范/README.md +++ /dev/null |