|  | @@ -45,31 +45,31 @@ namespace GFGGame
 | 
	
		
			
				|  |  |          /// <summary>
 | 
	
		
			
				|  |  |          /// ��ʾһ����ͼ
 | 
	
		
			
				|  |  |          /// </summary>
 | 
	
		
			
				|  |  | -        /// <param name="viewName">Ҫ��ʾ����ͼ����</param>
 | 
	
		
			
				|  |  | +        /// <param name="name">Ҫ��ʾ����ͼ����</param>
 | 
	
		
			
				|  |  |          /// <param name="viewData">Ҫ���ݸ���ͼ�IJ���</param>
 | 
	
		
			
				|  |  |          /// <param name="goBackParams">�Ӹ���ͼ���ص���ͼ��Ϣ</param>
 | 
	
		
			
				|  |  |          /// <param name="hideOthers">�Ƿ�ر�������ͼ</param>
 | 
	
		
			
				|  |  |          public static void Show(string viewName, object viewData = null, object[] goBackParams = null, bool hideOthers = false, bool resetGobackParams = false)
 | 
	
		
			
				|  |  |          {
 | 
	
		
			
				|  |  | -            string[] names = viewName.Split('.');
 | 
	
		
			
				|  |  | -            // if (!FunctionOpenDataManager.Instance.CheckIsFunOpenById(names[names.Length - 1]))
 | 
	
		
			
				|  |  | -            // {
 | 
	
		
			
				|  |  | -            //     return;
 | 
	
		
			
				|  |  | -            // }
 | 
	
		
			
				|  |  | +            string name = GetName(viewName);
 | 
	
		
			
				|  |  | +            if (!FunctionOpenDataManager.Instance.CheckIsFunOpenById(name))
 | 
	
		
			
				|  |  | +            {
 | 
	
		
			
				|  |  | +                return;
 | 
	
		
			
				|  |  | +            }
 | 
	
		
			
				|  |  |              if (hideOthers)
 | 
	
		
			
				|  |  |              {
 | 
	
		
			
				|  |  | -                HideAllView(viewName);
 | 
	
		
			
				|  |  | +                HideAllView(name);
 | 
	
		
			
				|  |  |              }
 | 
	
		
			
				|  |  |              UIView obj = null;
 | 
	
		
			
				|  |  |  
 | 
	
		
			
				|  |  | -            if (_viewDic.ContainsKey(viewName))
 | 
	
		
			
				|  |  | +            if (_viewDic.ContainsKey(name))
 | 
	
		
			
				|  |  |              {
 | 
	
		
			
				|  |  | -                obj = _viewDic[viewName];
 | 
	
		
			
				|  |  | +                obj = _viewDic[name];
 | 
	
		
			
				|  |  |              }
 | 
	
		
			
				|  |  |              else
 | 
	
		
			
				|  |  |              {
 | 
	
		
			
				|  |  |                  obj = CreateViewInstance(viewName) as UIView;
 | 
	
		
			
				|  |  | -                _viewDic.Add(viewName, obj);
 | 
	
		
			
				|  |  | +                _viewDic.Add(name, obj);
 | 
	
		
			
				|  |  |              }
 | 
	
		
			
				|  |  |              if (obj != null)
 | 
	
		
			
				|  |  |              {
 | 
	
	
		
			
				|  | @@ -78,7 +78,7 @@ namespace GFGGame
 | 
	
		
			
				|  |  |                  if (!view.isShowing)
 | 
	
		
			
				|  |  |                  {
 | 
	
		
			
				|  |  |                      view.Show();
 | 
	
		
			
				|  |  | -                    Debug.Log("��ǰ��" + viewName);
 | 
	
		
			
				|  |  | +                    Debug.Log("��ǰ��" + name);
 | 
	
		
			
				|  |  |                  }
 | 
	
		
			
				|  |  |                  else
 | 
	
		
			
				|  |  |                  {
 | 
	
	
		
			
				|  | @@ -86,14 +86,14 @@ namespace GFGGame
 | 
	
		
			
				|  |  |                  }
 | 
	
		
			
				|  |  |                  if (resetGobackParams)
 | 
	
		
			
				|  |  |                  {
 | 
	
		
			
				|  |  | -                    if (_goBackDatas.ContainsKey(viewName) == true)
 | 
	
		
			
				|  |  | +                    if (_goBackDatas.ContainsKey(name) == true)
 | 
	
		
			
				|  |  |                      {
 | 
	
		
			
				|  |  | -                        _goBackDatas.Remove(viewName);
 | 
	
		
			
				|  |  | +                        _goBackDatas.Remove(name);
 | 
	
		
			
				|  |  |                      }
 | 
	
		
			
				|  |  |                  }
 | 
	
		
			
				|  |  |                  if (goBackParams != null)
 | 
	
		
			
				|  |  |                  {
 | 
	
		
			
				|  |  | -                    _goBackDatas[viewName] = goBackParams;
 | 
	
		
			
				|  |  | +                    _goBackDatas[name] = goBackParams;
 | 
	
		
			
				|  |  |                  }
 | 
	
		
			
				|  |  |                  // else 
 | 
	
		
			
				|  |  |              }
 | 
	
	
		
			
				|  | @@ -102,10 +102,12 @@ namespace GFGGame
 | 
	
		
			
				|  |  |  
 | 
	
		
			
				|  |  |          public static bool isViewOpen(string viewName)
 | 
	
		
			
				|  |  |          {
 | 
	
		
			
				|  |  | +            string name = GetName(viewName);
 | 
	
		
			
				|  |  | +
 | 
	
		
			
				|  |  |              UIView obj = null;
 | 
	
		
			
				|  |  | -            if (_viewDic.ContainsKey(viewName))
 | 
	
		
			
				|  |  | +            if (_viewDic.ContainsKey(name))
 | 
	
		
			
				|  |  |              {
 | 
	
		
			
				|  |  | -                obj = _viewDic[viewName];
 | 
	
		
			
				|  |  | +                obj = _viewDic[name];
 | 
	
		
			
				|  |  |                  if (obj != null)
 | 
	
		
			
				|  |  |                  {
 | 
	
		
			
				|  |  |                      IUIView view = (IUIView)obj;
 | 
	
	
		
			
				|  | @@ -116,25 +118,27 @@ namespace GFGGame
 | 
	
		
			
				|  |  |          }
 | 
	
		
			
				|  |  |          public static bool Show<T>(object viewData = null, object[] goBackParams = null, bool hideOthers = false, bool resetGobackParams = false) where T : class, new()
 | 
	
		
			
				|  |  |          {
 | 
	
		
			
				|  |  | -            string viewName = typeof(T).FullName;
 | 
	
		
			
				|  |  | -            string[] names = viewName.Split('.');
 | 
	
		
			
				|  |  | -            // if (!FunctionOpenDataManager.Instance.CheckIsFunOpenById(names[names.Length - 1]))
 | 
	
		
			
				|  |  | -            // {
 | 
	
		
			
				|  |  | -            //     return false;
 | 
	
		
			
				|  |  | -            // }
 | 
	
		
			
				|  |  | +            // string[] names = typeof(T).FullName.Split('.');
 | 
	
		
			
				|  |  | +            // string viewName = names[names.Length - 1];
 | 
	
		
			
				|  |  | +            string name = GetName(typeof(T).FullName);
 | 
	
		
			
				|  |  | +
 | 
	
		
			
				|  |  | +            if (!FunctionOpenDataManager.Instance.CheckIsFunOpenById(name))
 | 
	
		
			
				|  |  | +            {
 | 
	
		
			
				|  |  | +                return false;
 | 
	
		
			
				|  |  | +            }
 | 
	
		
			
				|  |  |              if (hideOthers)
 | 
	
		
			
				|  |  |              {
 | 
	
		
			
				|  |  | -                HideAllView(viewName);
 | 
	
		
			
				|  |  | +                HideAllView(name);
 | 
	
		
			
				|  |  |              }
 | 
	
		
			
				|  |  |              UIView obj = null;
 | 
	
		
			
				|  |  | -            if (_viewDic.ContainsKey(viewName))
 | 
	
		
			
				|  |  | +            if (_viewDic.ContainsKey(name))
 | 
	
		
			
				|  |  |              {
 | 
	
		
			
				|  |  | -                obj = _viewDic[viewName];
 | 
	
		
			
				|  |  | +                obj = _viewDic[name];
 | 
	
		
			
				|  |  |              }
 | 
	
		
			
				|  |  |              else
 | 
	
		
			
				|  |  |              {
 | 
	
		
			
				|  |  |                  obj = new T() as UIView;
 | 
	
		
			
				|  |  | -                _viewDic.Add(viewName, obj);
 | 
	
		
			
				|  |  | +                _viewDic.Add(name, obj);
 | 
	
		
			
				|  |  |              }
 | 
	
		
			
				|  |  |              if (obj != null)
 | 
	
		
			
				|  |  |              {
 | 
	
	
		
			
				|  | @@ -143,7 +147,7 @@ namespace GFGGame
 | 
	
		
			
				|  |  |                  if (!view.isShowing)
 | 
	
		
			
				|  |  |                  {
 | 
	
		
			
				|  |  |                      view.Show();
 | 
	
		
			
				|  |  | -                    Debug.Log("��ǰ��" + viewName);
 | 
	
		
			
				|  |  | +                    Debug.Log("��ǰ��" + name);
 | 
	
		
			
				|  |  |                  }
 | 
	
		
			
				|  |  |                  else
 | 
	
		
			
				|  |  |                  {
 | 
	
	
		
			
				|  | @@ -151,13 +155,13 @@ namespace GFGGame
 | 
	
		
			
				|  |  |                  }
 | 
	
		
			
				|  |  |                  if (goBackParams != null)
 | 
	
		
			
				|  |  |                  {
 | 
	
		
			
				|  |  | -                    _goBackDatas[viewName] = goBackParams;
 | 
	
		
			
				|  |  | +                    _goBackDatas[name] = goBackParams;
 | 
	
		
			
				|  |  |                  }
 | 
	
		
			
				|  |  |                  else if (resetGobackParams)
 | 
	
		
			
				|  |  |                  {
 | 
	
		
			
				|  |  | -                    if (_goBackDatas.ContainsKey(viewName) == true)
 | 
	
		
			
				|  |  | +                    if (_goBackDatas.ContainsKey(name) == true)
 | 
	
		
			
				|  |  |                      {
 | 
	
		
			
				|  |  | -                        _goBackDatas.Remove(viewName);
 | 
	
		
			
				|  |  | +                        _goBackDatas.Remove(name);
 | 
	
		
			
				|  |  |                      }
 | 
	
		
			
				|  |  |                  }
 | 
	
		
			
				|  |  |              }
 | 
	
	
		
			
				|  | @@ -166,11 +170,12 @@ namespace GFGGame
 | 
	
		
			
				|  |  |  
 | 
	
		
			
				|  |  |          public static void Hide(string viewName)
 | 
	
		
			
				|  |  |          {
 | 
	
		
			
				|  |  | -            if (!_viewDic.ContainsKey(viewName))
 | 
	
		
			
				|  |  | +            string name = GetName(viewName);
 | 
	
		
			
				|  |  | +            if (!_viewDic.ContainsKey(name))
 | 
	
		
			
				|  |  |              {
 | 
	
		
			
				|  |  |                  return;
 | 
	
		
			
				|  |  |              }
 | 
	
		
			
				|  |  | -            UIView obj = _viewDic[viewName];
 | 
	
		
			
				|  |  | +            UIView obj = _viewDic[name];
 | 
	
		
			
				|  |  |              if (obj != null && obj.isShowing)
 | 
	
		
			
				|  |  |              {
 | 
	
		
			
				|  |  |                  IUIView view = (IUIView)obj;
 | 
	
	
		
			
				|  | @@ -180,12 +185,12 @@ namespace GFGGame
 | 
	
		
			
				|  |  |  
 | 
	
		
			
				|  |  |          public static void Hide<T>()
 | 
	
		
			
				|  |  |          {
 | 
	
		
			
				|  |  | -            string viewName = typeof(T).FullName;
 | 
	
		
			
				|  |  | -            if (!_viewDic.ContainsKey(viewName))
 | 
	
		
			
				|  |  | +            string name = GetName(typeof(T).FullName);
 | 
	
		
			
				|  |  | +            if (!_viewDic.ContainsKey(name))
 | 
	
		
			
				|  |  |              {
 | 
	
		
			
				|  |  |                  return;
 | 
	
		
			
				|  |  |              }
 | 
	
		
			
				|  |  | -            object obj = _viewDic[viewName];
 | 
	
		
			
				|  |  | +            object obj = _viewDic[name];
 | 
	
		
			
				|  |  |              if (obj != null)
 | 
	
		
			
				|  |  |              {
 | 
	
		
			
				|  |  |                  IUIView view = (IUIView)obj;
 | 
	
	
		
			
				|  | @@ -195,10 +200,11 @@ namespace GFGGame
 | 
	
		
			
				|  |  |  
 | 
	
		
			
				|  |  |          public static void GoBackFrom(string viewName, bool clearGoBackDatas = false)
 | 
	
		
			
				|  |  |          {
 | 
	
		
			
				|  |  | -            ViewManager.Hide(viewName);
 | 
	
		
			
				|  |  | -            if (_goBackDatas.ContainsKey(viewName))
 | 
	
		
			
				|  |  | +            string name = GetName(viewName);
 | 
	
		
			
				|  |  | +            ViewManager.Hide(name);
 | 
	
		
			
				|  |  | +            if (_goBackDatas.ContainsKey(name))
 | 
	
		
			
				|  |  |              {
 | 
	
		
			
				|  |  | -                object[] gobackItems = _goBackDatas[viewName];
 | 
	
		
			
				|  |  | +                object[] gobackItems = _goBackDatas[name];
 | 
	
		
			
				|  |  |                  string tViewName = gobackItems[0] as string;
 | 
	
		
			
				|  |  |  
 | 
	
		
			
				|  |  |                  object tViewData = null;
 | 
	
	
		
			
				|  | @@ -217,8 +223,9 @@ namespace GFGGame
 | 
	
		
			
				|  |  |  
 | 
	
		
			
				|  |  |          public static object[] GetGoBackDatas(string viewName)
 | 
	
		
			
				|  |  |          {
 | 
	
		
			
				|  |  | +            string name = GetName(viewName);
 | 
	
		
			
				|  |  |              object[] value;
 | 
	
		
			
				|  |  | -            _goBackDatas.TryGetValue(viewName, out value);
 | 
	
		
			
				|  |  | +            _goBackDatas.TryGetValue(name, out value);
 | 
	
		
			
				|  |  |              return value;
 | 
	
		
			
				|  |  |          }
 | 
	
		
			
				|  |  |          public static void HideAllView(string excludeViewName = null)
 | 
	
	
		
			
				|  | @@ -268,5 +275,11 @@ namespace GFGGame
 | 
	
		
			
				|  |  |              }
 | 
	
		
			
				|  |  |              return false;
 | 
	
		
			
				|  |  |          }
 | 
	
		
			
				|  |  | +        private static string GetName(string fullName)
 | 
	
		
			
				|  |  | +        {
 | 
	
		
			
				|  |  | +            string[] names = fullName.Split('.');
 | 
	
		
			
				|  |  | +            string name = names[names.Length - 1];
 | 
	
		
			
				|  |  | +            return name;
 | 
	
		
			
				|  |  | +        }
 | 
	
		
			
				|  |  |      }
 | 
	
		
			
				|  |  |  }
 |