파트리스트 공유폴더 열기 기능 수정 /
This commit is contained in:
		| @@ -123,6 +123,9 @@ namespace FPJ0000 | ||||
|             this.Show(); | ||||
|             Application.DoEvents(); | ||||
|             RefreshData(); | ||||
|             if (this.WindowState == FormWindowState.Minimized) this.WindowState = FormWindowState.Normal; | ||||
|             if (this.RestoreBounds.X + this.RestoreBounds.Width < 300 && this.RestoreBounds.X < 0) | ||||
|                 this.Location = new Point(0, 0); | ||||
|         } | ||||
|  | ||||
|         string sortkey = string.Empty; | ||||
| @@ -820,22 +823,23 @@ namespace FPJ0000 | ||||
|             f.Show(); | ||||
|         } | ||||
|  | ||||
|         private void button4_Click(object sender, EventArgs e) | ||||
|         void showfolder() | ||||
|         { | ||||
|             var drv = this.bs.Current as DataRowView; | ||||
|             if (drv == null) return; | ||||
|             var dr = drv.Row as dsPRJ.ProjectsRow; | ||||
|  | ||||
|             var tbPath = dr.path; | ||||
|             if (tbPath == "") tbPath = "/" + tbIdx.Text; | ||||
|  | ||||
|             if (tbPath == "") tbPath = "/" + dr.idx.ToString(); | ||||
|  | ||||
|             if (tbPath.StartsWith("\\") == false) | ||||
|             { | ||||
|                 if (tbPath.StartsWith("/")) tbPath = tbPath.Replace("/", "\\"); | ||||
|                 else tbPath = "\\" + tbPath; | ||||
|             } | ||||
|  | ||||
|             var serverpath = @"\\10.131.32.33\Data\Project"; | ||||
|             //\\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" + | ||||
| @@ -846,10 +850,29 @@ namespace FPJ0000 | ||||
|             var path = serverpath + tbPath; | ||||
|             if (System.IO.Directory.Exists(path) == false) | ||||
|             { | ||||
|                 FCOMMON.Util.MsgE("프로젝트 저장소 없음"); | ||||
|                 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 button4_Click(object sender, EventArgs e) | ||||
|         { | ||||
|             showfolder(); | ||||
|         } | ||||
|     } | ||||
| } | ||||
|   | ||||
		Reference in New Issue
	
	Block a user
	 chi
					chi