Exemple #1
0
 private void CheckWarning()
 {
     if (GUILayout.Button("Remove All Chart Object"))
     {
         m_Target.RemoveChartObject();
     }
     if (GUILayout.Button("Check XCharts Update "))
     {
         CheckVersionEditor.ShowWindow();
     }
     if (m_CheckWarning)
     {
         EditorGUILayout.BeginHorizontal();
         if (GUILayout.Button("Check Warning"))
         {
             m_CheckWarning = true;
             m_Target.CheckWarning();
         }
         if (GUILayout.Button("Hide Warning"))
         {
             m_CheckWarning = false;
         }
         EditorGUILayout.EndHorizontal();
         sb.Length = 0;
         sb.AppendFormat("version:{0}", XChartsMgr.Instance.nowVersion);
         if (!string.IsNullOrEmpty(m_Target.warningInfo))
         {
             sb.AppendLine();
             sb.Append(m_Target.warningInfo);
         }
         else
         {
             sb.AppendLine();
             sb.Append("Perfect! No warning!");
         }
         EditorGUILayout.HelpBox(sb.ToString(), MessageType.Warning);
     }
     else
     {
         if (GUILayout.Button("Check warning"))
         {
             m_CheckWarning = true;
             m_Target.CheckWarning();
         }
     }
     EditorGUILayout.Space();
     EditorGUILayout.Space();
 }
 private void CheckWarning()
 {
     if (GUILayout.Button("Check Update "))
     {
         CheckVersionEditor.ShowWindow();
     }
     if (m_CheckWarning)
     {
         EditorGUILayout.BeginHorizontal();
         if (GUILayout.Button("Check Warning"))
         {
             m_CheckWarning = true;
             m_Target.CheckWarning();
         }
         if (GUILayout.Button("Hide Warning"))
         {
             m_CheckWarning = false;
         }
         EditorGUILayout.EndHorizontal();
         EditorGUILayout.LabelField("version:" + XChartsMgr.Instance.nowVersion);
         if (!string.IsNullOrEmpty(m_Target.warningInfo))
         {
             var infos = m_Target.warningInfo.Split('\n');
             foreach (var info in infos)
             {
                 EditorGUILayout.LabelField(info);
             }
         }
         else
         {
             EditorGUILayout.LabelField("Perfect! No warning!");
         }
     }
     else
     {
         if (GUILayout.Button("Check warning"))
         {
             m_CheckWarning = true;
             m_Target.CheckWarning();
         }
     }
     EditorGUILayout.Space();
     EditorGUILayout.Space();
 }
 private void CheckWarning()
 {
     EditorGUILayout.Space();
     EditorGUILayout.Space();
     if (m_CheckWarning)
     {
         EditorGUILayout.BeginHorizontal();
         if (GUILayout.Button("Check warning"))
         {
             m_CheckWarning = true;
             m_Target.CheckWarning();
         }
         if (GUILayout.Button("Hide warning"))
         {
             m_CheckWarning = false;
         }
         EditorGUILayout.EndHorizontal();
         var version = string.Format("version:{0}_{1}\n", XChartsMgr.version, XChartsMgr.date);
         EditorGUILayout.LabelField(version);
         if (!string.IsNullOrEmpty(m_Target.warningInfo))
         {
             var infos = m_Target.warningInfo.Split('\n');
             foreach (var info in infos)
             {
                 EditorGUILayout.LabelField(info);
             }
         }
         else
         {
             EditorGUILayout.LabelField("Perfect! No warning!");
         }
     }
     else
     {
         if (GUILayout.Button("Check warning"))
         {
             m_CheckWarning = true;
             m_Target.CheckWarning();
         }
     }
     EditorGUILayout.Space();
     EditorGUILayout.Space();
 }