This commit is contained in:
chi
2022-03-07 20:13:58 +09:00
parent 06dbd92893
commit dd3fcf149f
13 changed files with 646 additions and 468 deletions

View File

@@ -227,19 +227,67 @@ namespace FPJ0000
private void btPath_Click(object sender, EventArgs e)
{
string path = tbPath.Text.Trim();
if (path == "")
{
path = "\\10.131.32.33\\Data\\Projects\\";
path += tbIdx.Text;
tbPath.Text = path;
}
var dlg = FCOMMON.Util.MsgQ("다음 폴더를 표시할까요?\n\n" +
path);
if (dlg == System.Windows.Forms.DialogResult.Yes)
FCOMMON.Util.RunExplorer(path);
showfolder();
//string path = tbPath.Text.Trim();
//if (path == "")
//{
// path = "\\10.131.32.33\\Data\\Projects\\";
// path += tbIdx.Text;
// tbPath.Text = path;
//}
//var dlg = FCOMMON.Util.MsgQ("다음 폴더를 표시할까요?\n\n" +
// path);
//if (dlg == System.Windows.Forms.DialogResult.Yes)
// FCOMMON.Util.RunExplorer(path);
}
void showfolder()
{
var dr = this.bs.Current as dsPRJ.ProjectsRow;
if (dr == null) return;
//var dr = drv.Row as dsPRJ.ProjectsRow;
var tbPath = dr.path;
if (tbPath == "") tbPath = "/" + dr.idx.ToString();
if (tbPath.StartsWith("\\") == false)
{
if (tbPath.StartsWith("/")) tbPath = tbPath.Replace("/", "\\");
else tbPath = "\\" + tbPath;
}
//\\10.131.32.29\Data
var serverpath = System.IO.Path.Combine(FCOMMON.info.datapath, "Data", "Project");
if (System.IO.Directory.Exists(serverpath) == false)
{
FCOMMON.Util.MsgE("프로젝트 기본경로가 존재하지 않아 진행할 수 없습니다\n\n" +
serverpath);
return;
}
var path = serverpath + tbPath;
if (System.IO.Directory.Exists(path) == false)
{
try
{
System.IO.Directory.CreateDirectory(path);
string[] subdir = new string[] { "Source", "Document", "Draw", "Estimate" };
foreach (var dir in subdir)
System.IO.Directory.CreateDirectory(path + "\\" + dir);
}
catch (Exception eX)
{
FCOMMON.Util.MsgE("프로젝트 저장소 생성실패\n" + eX.Message);
return;
}
}
FCOMMON.Util.RunExplorer(path);
}
private void btPart_Click(object sender, EventArgs e)
{
var f = new fPartList(dr.idx);