/// <summary> /// 设置"路径" /// </summary> private void SetCommonPath() { // 读取游戏平台 CommonPath.SetGamePlatform(); #region 读取客户端路径、服务器路径和ClusterToken // 客户端路径 GameDirSelectTextBox.Text = ""; CommonPath.ClientFilePath = CommonPath.ReadClientPath(CommonPath.GamePlatform); if (!string.IsNullOrEmpty(CommonPath.ClientFilePath) && File.Exists(CommonPath.ClientFilePath)) { GameDirSelectTextBox.Text = CommonPath.ClientFilePath; } else { CommonPath.ClientFilePath = ""; } // 服务器路径 DediDirSelectTextBox.Text = ""; CommonPath.ServerFilePath = CommonPath.ReadServerPath(CommonPath.GamePlatform); if (!string.IsNullOrEmpty(CommonPath.ServerFilePath) && File.Exists(CommonPath.ServerFilePath)) { DediDirSelectTextBox.Text = CommonPath.ServerFilePath; } else { CommonPath.ServerFilePath = ""; } // ClusterToken DediSettingClusterTokenTextBox.Text = ""; CommonPath.ClusterToken = CommonPath.ReadClusterTokenPath(CommonPath.GamePlatform); if (!string.IsNullOrEmpty(CommonPath.ClusterToken)) { DediSettingClusterTokenTextBox.Text = CommonPath.ClusterToken; } else { CommonPath.ClusterToken = ""; } #endregion }