示例#1
0
        /// <summary>
        /// 서버 백업 완료된 파일명 (웹서비스 호출)
        /// </summary>
        /// <param name="_strBackupFileName"></param>
        /// <returns></returns>
        private bool CompressionBackupFileByWebService(ref string _strBackupFileName)
        {
            try
            {
                bool bRtnValue = true;

                //// 상태바 (아이콘) 실행
                //this.loadingScreen.IsSplashScreenShown = true;

                using (DeployWebService.LiveUpdateWebServiceClient client = new DeployWebService.LiveUpdateWebServiceClient())
                {
                    var strBackupFileName = string.Empty;
                    client.CompressionBackupFile(ref _strBackupFileName);
                }

                //this.loadingScreen.IsSplashScreenShown = false;

                return(bRtnValue);
            }
            catch { throw; }
            finally
            {
                //this.loadingScreen.IsSplashScreenShown = false;
            }
        }
示例#2
0
 /// <summary>
 /// 서버 배포 경로 존재 여부 체크 및 생성 (웹서비스 호출)
 /// </summary>
 private void CheckServerDeployDirectory()
 {
     try
     {
         using (DeployWebService.LiveUpdateWebServiceClient client = new DeployWebService.LiveUpdateWebServiceClient())
         {
             client.CheckServerDeployDirectory();
         }
     }
     catch { throw; }
 }
示例#3
0
        /// <summary>
        /// WebService를 이용하여 서버 배포 경로의 파일 리스트를 가져온다. (웹서비스 호출)
        /// <paramref name="_liLocalFileList">로컬 파일 리스트 정보</paramref>
        /// </summary>
        private List <ServerFileList> GetServerFileListByWebService(ref List <LocalFileList> _liLocalFileList)
        {
            try
            {
                // 서버 파일 리스트 저장 변수
                List <ServerFileList> liServerFileList = new List <ServerFileList>();

                //using (LocalDeployWebService.LiveUpdateWebServiceClient client = new LocalDeployWebService.LiveUpdateWebServiceClient())
                using (DeployWebService.LiveUpdateWebServiceClient client = new DeployWebService.LiveUpdateWebServiceClient())
                {
                    // 웹서비스 호출
                    var resp = client.GetServerDeployList();

                    // 호출 후 리턴값이 있는 경우
                    if (resp.Count() > 0)
                    {
                        foreach (KeyValuePair <string, string[]> list in resp)
                        {
                            ServerFileList df = new ServerFileList();
                            string         strFileDirectory = string.Empty;
                            string         strResource      = string.Empty;

                            #region + 다국어 구분을 위한 구문
                            if (list.Key.Contains("ko-KR"))
                            {
                                strResource = "ko-KR";
                            }
                            else if (list.Key.Contains("th-TH"))
                            {
                                strResource = "th-TH";
                            }
                            #endregion

                            foreach (var item in list.Value)
                            {
                                if (item[2].ToString().Length > 0)
                                {
                                    strFileDirectory = item[2].ToString();
                                    break;
                                }
                            }

                            for (int i = 0; i < list.Value.Count(); i++)
                            {
                                df.FILE_NAME           = list.Value[0].ToString();      // 파일명
                                df.FILE_EXTENSION      = list.Value[1].ToString();      // 파일 확장자
                                df.FILE_DIRECTORY      = list.Value[2].ToString();      // 파일 경로
                                df.SERVER_FILE_VERSION = list.Value[3].ToString();      // 서버파일 버전
                                df.RESOURCE_KIND       = strResource;                   // 리소스 파일 종류

                                // 로컬리스트와 서버리스트를 비교해서 같은 파일인 경우 서버파일 버전을 로컬파일 버전 필드에 저장
                                _liLocalFileList.Where(p => p.FILE_NAME == df.FILE_NAME).ToList().ForEach(p => p.SERVER_FILE_VERSION = df.SERVER_FILE_VERSION);
                            }

                            liServerFileList.Add(df);
                        }
                    }
                }

                return(liServerFileList);
            }
            catch { throw; }
        }