Esempio n. 1
0
 public static void UpdateDB()
 {
     if (!File.Exists(c_sBat_UpdateDB))
     {
         UnityEngine.Debug.LogError("Target Path Is Not Exists");
         return;
     }
     ATHelper_Process.RunBat(c_sBat_UpdateDB);
 }
Esempio n. 2
0
    public override void OnGUI()
    {
        if (ATGUILib.PathBar("选择你的服务器文件", ATHelper_File.CorrectPath(sr_sBatPath), ref m_sServerPath, "bat"))
        {
            SetConfig <string>(c_sConfig_ServerPath, m_sServerPath);
        }

        GUILayout.BeginHorizontal(EditorStyles.objectFieldThumb);
        if (m_kProcess != null && m_kProcess.HasExited)
        {
            m_kProcess = null;
        }

        if (ATHelper_File.IsFileExists(m_sServerPath, ".bat") && m_kProcess == null)
        {
            if (GUILayout.Button("启动", GUILayout.Width(50)))
            {
                m_kProcess = ATHelper_Process.RunBat(m_sServerPath);
            }
        }
        else
        {
            GUILayout.Label("   启动", GUILayout.Width(50));
        }

        if (m_kProcess != null)
        {
            if (GUILayout.Button("停止", GUILayout.Width(50)))
            {
                ATHelper_Process.KillProcessTree(m_kProcess);
            }
        }
        else
        {
            GUILayout.Label("   停止", GUILayout.Width(50));
        }
        GUILayout.EndHorizontal();
    }