프로젝트

일반

사용자정보

개정판 366f00c2

ID366f00c2f3ae4d88708b769f19d3208d5263a525
상위 72424099
하위 84605c0c

김태성이(가) 약 5년 전에 추가함

dns 체크 에러 수정

Change-Id: I9fd9b9d37c7c2529795ab14f46f58b157d911809

차이점 보기:

CommonLib/DNSHelper.cs
27 27
                    foreach (IPAddress dnsAdress in dnsAddresses)
28 28
                    {
29 29
                        if (dnsAdress.AddressFamily == System.Net.Sockets.AddressFamily.InterNetwork)
30
                            return dnsAdress;
30
                        {
31
                            try
32
                            {
33
                                var host = Dns.GetHostEntry(dnsAdress);
34

  
35
                                if (host != null)
36
                                {
37
                                    return dnsAdress;
38
                                }
39
                            }
40
                            catch (Exception ex)
41
                            {
42
                                if (ex.InnerException is System.Net.Sockets.SocketException)
43
                                {
44
                                    System.Diagnostics.Debug.WriteLine((ex.InnerException as System.Net.Sockets.SocketException).SocketErrorCode);
45
                                }
46
                                //return dnsAdress;
47
                            }
48
                        }
49
            
31 50
                    }
32 51
                }
33 52
            }
53

  
34 54
            return null;
35 55
        }
36 56

  
......
38 58
        {
39 59
            IPHostEntry result = null;
40 60

  
41
            await Task.Factory.StartNew(() =>
61
            try
42 62
            {
43
                try
44
                {
45
                    var ipaddress = CommonLib.DNSHelper.GetDnsAdress();
63
                var ipaddress = CommonLib.DNSHelper.GetDnsAdress();
46 64

  
47
                    result = Dns.GetHostEntry(ipaddress);
48
                }
49
                catch (System.Net.Sockets.SocketException ex)
65
                result = await Dns.GetHostEntryAsync(ipaddress);
66
            }
67
            catch (Exception ex)
68
            {
69
                if (ex.InnerException is System.Net.Sockets.SocketException)
50 70
                {
51
                    if (ex.SocketErrorCode == System.Net.Sockets.SocketError.HostNotFound)
52
                    {
53
                        System.Diagnostics.Debug.WriteLine("DNS SocketError");
54
                        result = null;
55
                    }
71
                    System.Diagnostics.Debug.WriteLine((ex.InnerException as System.Net.Sockets.SocketException).SocketErrorCode);
56 72
                }
57
                catch (Exception ex)
73
                else
58 74
                {
59
                    throw ex;
75

  
76
                    System.Diagnostics.Debug.WriteLine(ex.ToString());
60 77
                }
61
            });
78
            }
62 79

  
63 80
            System.Diagnostics.Debug.WriteLine("DNS END");
64 81

  
KCOM/App.xaml.cs
164 164
                }
165 165
                #endregion
166 166

  
167

  
167 168
                if (e.Args.Count() > 0)
168 169
                {
169 170
                    var result = ParamDecoding(e.Args[0].Replace(@"kcom://", "").Replace(@"/", ""));
KCOM/KCOM.csproj
1589 1589
     copy /Y  "$(SolutionDir)\INI\MARKUS_Doftech.ini" "C:\ProgramData\MARKUS\MARKUS.ini"
1590 1590
)
1591 1591

  
1592
if $(ConfigurationName) == Debug_HyoSung (
1593
     copy /Y  "$(SolutionDir)\INI\MARKUS_HyoSung_Debug.ini" "C:\ProgramData\MARKUS\MARKUS.ini"
1594
)
1592
rem if $(ConfigurationName) == Debug_HyoSung (
1593
rem      copy /Y  "$(SolutionDir)\INI\MARKUS_HyoSung_Debug.ini" "C:\ProgramData\MARKUS\MARKUS.ini"
1594
rem )
1595

  
1596
rem if $(ConfigurationName) == Release_HyoSung (
1597
rem      copy /Y  "$(SolutionDir)\INI\MARKUS_HyoSung.ini" "C:\ProgramData\MARKUS\MARKUS.ini"
1598
rem )
1595 1599

  
1596 1600
if $(ConfigurationName) == Debug_SNI (
1597 1601
     copy /Y  "$(SolutionDir)\INI\MARKUS_SNI.ini" "C:\ProgramData\MARKUS\MARKUS.ini"
KCOM/KCOM.csproj.user
62 62
    <StartArguments>eyJEb2N1bWVudEl0ZW1JRCI6IjQwMDAwMTQ5IiwiYlBhcnRuZXIiOmZhbHNlLCJDcmVhdGVGaW5hbFBERlBlcm1pc3Npb24iOnRydWUsIk5ld0NvbW1lbnRQZXJtaXNzaW9uIjp0cnVlLCJQcm9qZWN0Tk8iOiIwMDAwMDAiLCJVc2VySUQiOiJhZG1pbiIsIk1vZGUiOjB9</StartArguments>
63 63
  </PropertyGroup>
64 64
  <PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Debug_HyoSung|x86'">
65
    <StartArguments>eyJEb2N1bWVudEl0ZW1JRCI6IjIwMDUyIiwiYlBhcnRuZXIiOiJmYWxzZSIsIkNyZWF0ZUZpbmFsUERGUGVybWlzc2lvbiI6ImZhbHNlIiwiTmV3Q29tbWVudFBlcm1pc3Npb24iOiJmYWxzZSIsIlByb2plY3ROTyI6IkxQRyIsIlVzZXJJRCI6IlJFUE9JTlRcXHN5c3RlbSIsIk1vZGUiOjB9/</StartArguments>
65
    <StartArguments>eyJEb2N1bWVudEl0ZW1JRCI6IjgxNTgiLCJiUGFydG5lciI6ImZhbHNlIiwiQ3JlYXRlRmluYWxQREZQZXJtaXNzaW9uIjoiZmFsc2UiLCJOZXdDb21tZW50UGVybWlzc2lvbiI6ImZhbHNlIiwiUHJvamVjdE5PIjoiUFA0IiwiVXNlcklEIjoiYWRtaW4iLCJNb2RlIjowfQ==/</StartArguments>
66 66
  </PropertyGroup>
67 67
  <PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Debug|x86'">
68 68
    <StartArguments>eyJEb2N1bWVudEl0ZW1JRCI6IjExMDAwMTAyIiwiYlBhcnRuZXIiOmZhbHNlLCJDcmVhdGVGaW5hbFBERlBlcm1pc3Npb24iOiJ0cnVlIiwiTmV3Q29tbWVudFBlcm1pc3Npb24iOiJ0cnVlIiwiUHJvamVjdE5PIjoiMDAwMDAwIiwiVXNlcklEIjoiSmFtZXMiLCJNb2RlIjowfQ==/</StartArguments>
KCOM/MainWindow.xaml.cs
511 511

  
512 512
        void win_SourceInitialized(object sender, EventArgs e)
513 513
        {
514
            System.IntPtr handle = (new WinInterop.WindowInteropHelper(this)).Handle;
515
            WinInterop.HwndSource.FromHwnd(handle).AddHook(new WinInterop.HwndSourceHook(WindowProc));
514
            //System.IntPtr handle = (new WinInterop.WindowInteropHelper(this)).Handle;
515
            //WinInterop.HwndSource.FromHwnd(handle).AddHook(new WinInterop.HwndSourceHook(WindowProc));
516 516
        }
517 517

  
518 518
        private static System.IntPtr WindowProc(System.IntPtr hwnd, int msg, System.IntPtr wParam, System.IntPtr lParam, ref bool handled)
KCOM/PageManager/PageStorage.cs
103 103
            }
104 104
            finally
105 105
            {
106
                GC.Collect(2);
107 106
            }
108 107

  
109 108
            return PageImage;
......
203 202
                    client.DownloadFileCompleted += (snd, evt) =>
204 203
                    {
205 204
                        fileItems.Add(result);
206
                        client.Dispose();
207 205
                    };
208 206

  
209 207
                    await client.DownloadFileTaskAsync(result.OriginalUri, downloadFilePath);
KCOM/Views/TopMenu.xaml.cs
23 23
    {
24 24
        public TopMenu()
25 25
        {
26
            App.splashString(ISplashMessage.TOPMENU);
27
            InitializeComponent();            
28
            InitDataSet();
29
            if (!App.ViewInfo.CreateFinalPDFPermission && !App.ViewInfo.NewCommentPermission)
30
            {
31
                SAVE.Visibility = Visibility.Collapsed;
32
            }
26
            //App.splashString(ISplashMessage.TOPMENU);
27
            InitializeComponent();
33 28

  
34
            if (KCOM.Properties.Settings.Default.cad == 0)
35
            {
36
                AutoCAD.Visibility = Visibility.Hidden;
37
            }
29
            this.Loaded += TopMenu_Loaded;
30

  
31
        }
32

  
33
        bool _Initialize = false;
38 34

  
39
            if (KCOM.Properties.Settings.Default.grouping == 0)
35
        private void TopMenu_Loaded(object sender, RoutedEventArgs e)
36
        {
37
            if(!_Initialize)
40 38
            {
41
                GROUP.Visibility = Visibility.Hidden;
42
            }
39
                _Initialize = true;
40

  
41
                InitDataSet();
42
                if (!App.ViewInfo.CreateFinalPDFPermission && !App.ViewInfo.NewCommentPermission)
43
                {
44
                    SAVE.Visibility = Visibility.Collapsed;
45
                }
43 46

  
47
                if (KCOM.Properties.Settings.Default.cad == 0)
48
                {
49
                    AutoCAD.Visibility = Visibility.Hidden;
50
                }
51

  
52
                if (KCOM.Properties.Settings.Default.grouping == 0)
53
                {
54
                    GROUP.Visibility = Visibility.Hidden;
55
                }
56
            }
44 57
        }
58

  
45 59
        private void btnFromFile_Click(object sender, RoutedEventArgs e)
46 60
        {
47 61
            System.Windows.Forms.OpenFileDialog dialog = new System.Windows.Forms.OpenFileDialog();
MarkupToPDF/Common/GetUserSign.cs
49 49
            _binding.TransferMode = TransferMode.Buffered;
50 50
            string localdomain = CommonLib.Common.GetConfigString("HOST_DOMAIN", "DOMAIN", "");
51 51

  
52
            var hostEntry = CommonLib.DNSHelper.GetHostEntryTask();
52
            var hostEntry =  CommonLib.DNSHelper.GetHostEntryTask();
53 53

  
54 54
            if (hostEntry == null)
55 55
            {
MarkupToPDF/Controls/Etc/SignControl.cs
16 16
using MarkupToPDF.Serialize.Core;
17 17
using MarkupToPDF.Serialize.S_Control;
18 18
using System.Windows.Media.Imaging;
19
using System.Threading.Tasks;
19 20

  
20 21
//강인구 추가
21 22
namespace MarkupToPDF.Controls.Etc
......
305 306
        /// <author>humkyung</author>
306 307
        /// <param name="pt"></param>
307 308
        /// <param name="bAxisLocked"></param>
308
        public override void OnCreatingMouseMove(Point pt, bool bAxisLocked, bool bShiftKeyPressed)
309
        public override  void OnCreatingMouseMove(Point pt, bool bAxisLocked, bool bShiftKeyPressed)
309 310
        {
310 311
            this.EndPoint = pt;
311 312
            this.LeftBottomPoint = new Point(this.StartPoint.X, this.EndPoint.Y);
......
314 315
            if (this.StartPoint != this.EndPoint && this.SignImage == null)
315 316
            {
316 317
                var _sign = GetUserSign.GetSign(this.UserNumber, this.ProjectNO);
318

  
317 319
                byte[] imageBytes = System.Convert.FromBase64String(_sign);
318 320

  
319 321
                System.IO.MemoryStream stream = new System.IO.MemoryStream();
......
468 470
                        using (System.IO.MemoryStream stream = new System.IO.MemoryStream())
469 471
                        {
470 472
                            stream.WriteAsync(imageBytes, 0, imageBytes.Length);
473

  
471 474
                            stream.Position = 0;
472 475
                            System.Drawing.Image img = System.Drawing.Image.FromStream(stream);
473 476
                            returnImage.BeginInit();
MarkupToPDF/Controls/Parsing/MarkupParse.cs
65 65
        /// </summary>
66 66
        /// <param name="str"></param>
67 67
        /// <returns></returns>
68
        public static CommentUserInfo FromString(string item, SolidColorBrush brush, string sProjectNo)
68
        public static async Task<CommentUserInfo> FromStringAsync(string item, SolidColorBrush brush, string sProjectNo)
69 69
        {
70 70
            CommentUserInfo instance = null;
71 71
            var unkown = JsonSerializerHelper.JsonDeserialize<S_BaseControl>(item); //복호화작업
......
221 221
                foreach (var token in tokens)
222 222
                {
223 223
                    var item = await JsonSerializerHelper.UnCompressStringAsync(token); //언패킹작업
224
                    CommentUserInfo control = MarkupParser.FromString(item, _SetColor, sProjectNo);
224
                    CommentUserInfo control = await MarkupParser.FromStringAsync(item, _SetColor, sProjectNo);
225 225
                    if (control != null)
226 226
                    {
227 227
                        Layer.Children.Add(control);
......
284 284
                foreach (var dataPease in data)
285 285
                {
286 286
                    var item = await JsonSerializerHelper.UnCompressStringAsync(dataPease); //언패킹작업
287
                    CommentUserInfo control = MarkupParser.FromString(item, _SetColor, sProjectNo);
287

  
288
                    CommentUserInfo control = await MarkupParser.FromStringAsync(item, _SetColor, sProjectNo);
289

  
288 290
                    res = control as Control;
289 291
                    if (control != null)
290 292
                    {

내보내기 Unified diff

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