프로젝트

일반

사용자정보

개정판 d71b4688

IDd71b4688b1ac4bd5e1a5babd766490baa88f0808
상위 9908a3c1
하위 6070dde7

이지연이(가) 5년 이상 전에 추가함

issue #660: SmartUpdate 수정

Change-Id: Icc4c9bd2702624bd8d235127b8d375a1962f6a48

차이점 보기:

KCOM/Common/Check_Uri.cs
15 15
                throw new Exception();
16 16
            }           
17 17
        }
18

  
19
        public static bool UriCheckBool(string filepath)
20
        {
21
            if (!(Uri.TryCreate(filepath, UriKind.Absolute, out Uri uri) && uri.Scheme == Uri.UriSchemeHttp))
22
            {
23
                return false;
24
            }
25
            return true;
26
        }
18 27
    }
19 28
}
KCOM/MainWindow.xaml.cs
408 408
            try
409 409
            {
410 410
                updateurl = Common.ViewerDataModel.Instance.SystemMain.dzMainMenu.BaseClient.GetVersionData(Environment.Is64BitProcess, Assembly.GetExecutingAssembly().GetName().Version.ToString());
411
                if (!string.IsNullOrEmpty(updateurl))
411
                
412
                if (Check_Uri.UriCheckBool(updateurl))
412 413
                {                          
413 414
                    DialogParameters parameters = new DialogParameters()
414 415
                    {
KCOM_API/ServiceDeepView.svc.cs
35 35
        public string GetVersionData(bool is64BitProcess, string markusVer)
36 36
        {
37 37
            string url = null;
38
            int[] markusVersion = Array.ConvertAll<string, int>(markusVer.Split('.'), int.Parse);
39

  
38 40
            try
39 41
            {
40 42
                using (KCOMEntities uc = new KCOMEntities(ConnectStringBuilder.KCOMConnectionString().ToString()))
41
                {
42
                    
43
                {                    
43 44
                    if (is64BitProcess) //64 bit machine
44 45
                    {
45
                        url = uc.PROPERTIES.Where(data => data.TYPE == "Update_x64"
46
                        && data.PROPERTY != markusVer).FirstOrDefault().VALUE;                        
46
                        var versionData = uc.PROPERTIES.Where(data => data.TYPE == "Update_x64").FirstOrDefault();
47
                        int[] dbversion = Array.ConvertAll<string, int>(versionData.PROPERTY.Split('.'), int.Parse);
48
                        if (dbversion[0] > markusVersion[0] || dbversion[1] > markusVersion[1] || dbversion[2] > markusVersion[2] || dbversion[3] > markusVersion[3])
49
                        {
50
                            url = versionData.VALUE;
51
                        }
47 52
                    }
48 53
                    else
49 54
                    {
50
                        url = uc.PROPERTIES.Where(data => data.TYPE == "Update_x84"
51
                        && data.PROPERTY != markusVer).FirstOrDefault().VALUE;
52
                    }
53
                    
55
                        var versionData = uc.PROPERTIES.Where(data => data.TYPE == "Update_x84").FirstOrDefault();
56
                        int[] dbversion = Array.ConvertAll<string, int>(versionData.PROPERTY.Split('.'), int.Parse);
57
                        if (dbversion[0] > markusVersion[0] || dbversion[1] > markusVersion[1] || dbversion[2] > markusVersion[2] || dbversion[3] > markusVersion[3])
58
                        {
59
                            url = versionData.VALUE;
60
                        }
61
                    }                    
54 62
                }
55 63
            }
56 64
            catch (Exception)
SmartUpdate/SmartUpdate.csproj
36 36
    <DebugSymbols>true</DebugSymbols>
37 37
    <DebugType>full</DebugType>
38 38
    <Optimize>false</Optimize>
39
    <OutputPath>..\KCOM\bin\Debug\</OutputPath>
39
    <OutputPath>..\Setup\</OutputPath>
40 40
    <DefineConstants>DEBUG;TRACE</DefineConstants>
41 41
    <ErrorReport>prompt</ErrorReport>
42 42
    <WarningLevel>4</WarningLevel>

내보내기 Unified diff

클립보드 이미지 추가 (최대 크기: 500 MB)