Merge pull request '최초 페이지에서 프로젝트 명 없이 Create가 가능한 오류 수정' (#147) from jym/250609_02 into main
Reviewed-on: http://220.90.135.190:3000/UVCXR/Studio/pulls/147
This commit was merged in pull request #147.
This commit is contained in:
@@ -1,5 +1,6 @@
|
|||||||
using System;
|
using System;
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
|
using System.IO;
|
||||||
using System.Linq;
|
using System.Linq;
|
||||||
using TMPro;
|
using TMPro;
|
||||||
using TriLibCore.SFB;
|
using TriLibCore.SFB;
|
||||||
@@ -43,6 +44,14 @@ namespace Studio.UI
|
|||||||
|
|
||||||
private void OnClickCreate()
|
private void OnClickCreate()
|
||||||
{
|
{
|
||||||
|
var projectName = GetProjectName();
|
||||||
|
var projectPath = GetProjectRoute();
|
||||||
|
|
||||||
|
if (!IsProjectNameVaild(projectName) || !IsProjectPathVaild(projectPath))
|
||||||
|
{
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
onClickCreate?.Invoke();
|
onClickCreate?.Invoke();
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -70,6 +79,22 @@ namespace Studio.UI
|
|||||||
var template = InputField_ProjectTemplate.text;
|
var template = InputField_ProjectTemplate.text;
|
||||||
return template;
|
return template;
|
||||||
}
|
}
|
||||||
|
private bool IsProjectNameVaild(string projectName)
|
||||||
|
{
|
||||||
|
if (projectName == string.Empty)
|
||||||
|
{
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
private bool IsProjectPathVaild(string projectPath)
|
||||||
|
{
|
||||||
|
if (projectPath == string.Empty || !Directory.Exists(projectPath))
|
||||||
|
{
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -124,14 +124,8 @@ namespace Studio.UI
|
|||||||
}
|
}
|
||||||
private bool IsPathVaild(string path)
|
private bool IsPathVaild(string path)
|
||||||
{
|
{
|
||||||
if(path == string.Empty)
|
if(path == string.Empty || !File.Exists(path))
|
||||||
{
|
{
|
||||||
Debug.Log("The project path entry field is empty");
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
else if (!File.Exists(path))
|
|
||||||
{
|
|
||||||
Debug.Log("The path you entered is not a valid path");
|
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
return true;
|
return true;
|
||||||
|
|||||||
@@ -75,21 +75,14 @@ namespace Studio.UI
|
|||||||
{
|
{
|
||||||
if(projectName == string.Empty)
|
if(projectName == string.Empty)
|
||||||
{
|
{
|
||||||
Debug.Log("The project name entry field is empty");
|
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
private bool IsProjectPathVaild(string projectPath)
|
private bool IsProjectPathVaild(string projectPath)
|
||||||
{
|
{
|
||||||
if (projectPath == string.Empty)
|
if (projectPath == string.Empty || !Directory.Exists(projectPath))
|
||||||
{
|
{
|
||||||
Debug.Log("The project path entry field is empty");
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
else if (!Directory.Exists(projectPath))
|
|
||||||
{
|
|
||||||
Debug.Log("The path you entered is not a valid path");
|
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
return true;
|
return true;
|
||||||
|
|||||||
@@ -62,14 +62,8 @@ namespace Studio.UI
|
|||||||
}
|
}
|
||||||
private bool IsPathVaild(string path)
|
private bool IsPathVaild(string path)
|
||||||
{
|
{
|
||||||
if (path == string.Empty)
|
if (path == string.Empty || !File.Exists(path))
|
||||||
{
|
{
|
||||||
Debug.Log("The project path entry field is empty");
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
else if (!File.Exists(path))
|
|
||||||
{
|
|
||||||
Debug.Log("The path you entered is not a valid path");
|
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
return true;
|
return true;
|
||||||
|
|||||||
Reference in New Issue
Block a user