프로젝트

일반

사용자정보

개정판 cdfb57ff

IDcdfb57ff4780f16447f02fb0203c397a3732c3cd
상위 dbc1e5b6
하위 96c13fad

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

zoom control 이벤트 추가
mainmenu 수정
app 수정

Change-Id: I0d007c3a3c412b7fbe6e2a52bafb932e1a7b9f03

차이점 보기:

KCOM/App.xaml.cs
92 92
        private string versionPath = null;
93 93
        //public SplashScreen splash = new SplashScreen("splash.png");
94 94
        public static SplashScreenWindow splashScreen = new SplashScreenWindow();
95
        protected override void OnStartup(StartupEventArgs e)
96
        {          
95

  
96
        public App()
97
        {
98
           
99
        }
100

  
101
        protected override async void OnStartup(StartupEventArgs e)
102
        {
103
          
97 104
            try
98 105
            {
99 106
                splashScreen.Show();
......
172 179

  
173 180
                string sBaseServiceURL = string.Empty;//CommonLib.Common.GetConfigString("BaseClientAddress", "URL", "");
174 181
                string localdomain = CommonLib.Common.GetConfigString("HOST_DOMAIN", "DOMAIN", "");
175
                var ipaddress = CommonLib.DNSHelper.GetDnsAdress();
176 182

  
177
                try
178
                {
179
                    var hostName = Dns.GetHostEntry(ipaddress).HostName;
183
                var hostEntry = CommonLib.DNSHelper.GetHostEntryTask();
180 184

  
181
                    if (!hostName.EndsWith(localdomain))
182
                    {
183
                        // 외부 사용자
184
                        isExternal = true;                        
185
                    }
186
                }
187
                catch (Exception ex)
185
                if (hostEntry == null || !hostEntry.HostName.EndsWith(localdomain))
188 186
                {
189
                    System.Diagnostics.Debug.WriteLine(ex.ToString());
187
                    // 외부 사용자
188
                    isExternal = true;
190 189
                }
191 190
#if DEBUG
192 191
                //sBaseServiceURL = CommonLib.Common.GetConfigString("BaseClientAddress", "URL", "", isExternal);
193
                sBaseServiceURL = CommonLib.Common.GetConfigString("Debug_BaseClientAddress", "URL", "",isExternal);
192
                sBaseServiceURL = CommonLib.Common.GetConfigString("Debug_BaseClientAddress", "URL", "", isExternal);
194 193
#else
195
                sBaseServiceURL = CommonLib.Common.GetConfigString("BaseClientAddress", "URL", "", isExternal);
194
                sBaseServiceURL = CommonLib.Common.GetConfigString("BaseClientAddress", "URL", "", IsExternal);
196 195
#endif
197
                                
196

  
198 197
                _EndPoint = new EndpointAddress(string.Format("{0}/ServiceDeepView.svc", sBaseServiceURL));
199
               
200
                Task.Factory.StartNew(() =>
201
                {
202
                    int value = 100 / ISplashMessage.SplashMessageCnt;
203
                    for (int i = 1; i <= ISplashMessage.SplashMessageCnt; i++)
204
                    {
205
                        System.Threading.Thread.Sleep(3);
206
                        splashScreen.Dispatcher.Invoke(() => splashScreen.Progress = i * value);
207
                    }
208 198

  
209
                    this.Dispatcher.Invoke(() =>
210
                    {
211
                        base.OnStartup(e);
212
                        splashScreen.Close();
213
                    });
214
                });                
199
                await SplashScreenAsnyc();
200
                base.OnStartup(e);
201

  
202
                //this.MainWindow = new MainWindow();
203

  
215 204
            }
216 205
            catch (Exception ex)
217 206
            {
......
219 208
            }
220 209
            finally
221 210
            {
222
                Task.Factory.StartNew(() =>
223
                {
224
                    int value = 100 / ISplashMessage.SplashMessageCnt;
225
                    for (int i = 1; i < ISplashMessage.SplashMessageCnt; i++)
226
                    {
227
                        System.Threading.Thread.Sleep(3);                        
228
                        splashScreen.Dispatcher.Invoke(() => splashScreen.Progress = i * value);                   
229
                    }
230
                    this.Dispatcher.Invoke(() =>
231
                    {
232
                        //base.OnStartup(e);
233
                        splashScreen.Close();
234
                    });
235
                });
211
                await SplashScreenAsnyc();
236 212
            }        
237 213
        }
238 214

  
215
        private async Task<bool> SplashScreenAsnyc()
216
        {
217
            int value = 100 / ISplashMessage.SplashMessageCnt;
218

  
219
            for (int i = 1; i < ISplashMessage.SplashMessageCnt; i++)
220
            {
221
                System.Threading.Thread.Sleep(3);
222
                await splashScreen.Dispatcher.InvokeAsync(() => splashScreen.Progress = i * value);
223
            }
224

  
225
            splashScreen.Close();
226

  
227
            return true;
228
        }
229

  
239 230
        public static void splashString(string text)
240 231
        {
241 232
            Task.Factory.StartNew(() =>

내보내기 Unified diff

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