프로젝트

일반

사용자정보

개정판 cf2671a6

IDcf2671a6d1cb553b33c26842ef1c8f0c984e8070
상위 f67f164e
하위 9d23566d

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

issue #681 스플래시 스크린

Change-Id: I9db43999dbef9f30d36e84a864f243285a253393

차이점 보기:

KCOM/App.xaml.cs
18 18
using log4net;
19 19
using System.Text;
20 20
using System.Runtime.InteropServices;
21
using KCOM.Views;
22
using System.Threading.Tasks;
21 23

  
22 24
[assembly: log4net.Config.XmlConfigurator(Watch = true)]
23 25
namespace KCOM
......
86 88
        }
87 89

  
88 90
        private string versionPath = null;
89
        public SplashScreen splash = new SplashScreen("splash.png");
90

  
91
        //public SplashScreen splash = new SplashScreen("splash.png");
92
        public SplashScreenWindow splashScreen = new SplashScreenWindow();
91 93
        protected override void OnStartup(StartupEventArgs e)
92
        {
94
        {          
93 95
            try
94 96
            {
97
                splashScreen.Show();
98
               
95 99
                /// create log database and table
96 100
                using (IAbstractDatabase database = new AppSQLiteDatabase() { FilePath = Path.Combine(AppDataFolder, "log4net.db") })
97 101
                {
......
105 109
                App.DBLogger = LogManager.GetLogger("DBLogger");
106 110
                App.FileLogger = LogManager.GetLogger("EventLogger");
107 111

  
108
                splash.Show(false, false);
109

  
112
                //splash.Show(false, false);                
113
                        
110 114
                if (e.Args.Count() > 0)
111 115
                {
112 116
                    var result = ParamDecoding(e.Args[0].Replace(@"kcom://", "").Replace(@"/", ""));
......
229 233
                            }
230 234
                        }
231 235
                        else
232
                        {
233
                            base.OnStartup(e);
234
                            splash.Close(new TimeSpan(0, 0, 2));
236
                        {                           
237
                            // splash.Close(new TimeSpan(0, 0, 2));
238
                            Task.Factory.StartNew(() =>
239
                            {
240
                                for (int i = 1; i <= 100; i++)
241
                                {
242
                                    System.Threading.Thread.Sleep(1);
243
                                    splashScreen.Dispatcher.Invoke(() => splashScreen.Progress = i);
244
                                }
245
                                this.Dispatcher.Invoke(() =>
246
                                {
247
                                    base.OnStartup(e);
248
                                    splashScreen.Close();
249
                                });
250
                                
251
                            });
235 252
                        }
236 253
                    }
237 254
                    catch (Exception ex) //2. 파일이 없거나 파일내에 version의 값이 없다면 KCOM 실행하기
238 255
                    {
239 256
                        ErrorLogFileWrite("KCOM//UpdateCheck ERR : " + ex);
240
                        base.OnStartup(e);
241
                        splash.Close(new TimeSpan(0, 0, 2));
242
                    }
257
                        
258
                        Task.Factory.StartNew(() =>
259
                        {
260
                            for (int i = 1; i <= 100; i++)
261
                            {
262
                                System.Threading.Thread.Sleep(1);
263
                                splashScreen.Dispatcher.Invoke(() => splashScreen.Progress = i);
264
                            }
265
                            this.Dispatcher.Invoke(() =>
266
                            {
267
                                base.OnStartup(e);
268
                                splashScreen.Close();
269
                            });
270
                        });
271
                    }                
243 272
                }
244 273
            }
245 274
            catch (Exception ex)
......
248 277
            }
249 278
            finally
250 279
            {
251
                splash.Close(new TimeSpan(0, 0, 2));
280
                Task.Factory.StartNew(() =>
281
                {
282
                    for (int i = 1; i <= 100; i++)
283
                    {
284
                        System.Threading.Thread.Sleep(1);
285
                        splashScreen.Dispatcher.Invoke(() => splashScreen.Progress = i);
286
                    }
287
                    this.Dispatcher.Invoke(() =>
288
                    {
289
                        //base.OnStartup(e);
290
                        splashScreen.Close();
291
                    });
292
                });
252 293
            }
294
        
253 295
        }
254 296

  
255 297
        /// <summary>
KCOM/Events/Implementation/TopMenuEvent.cs
2442 2442
                }
2443 2443
            }
2444 2444

  
2445
            if (data != null)
2445
            if (data != null && KCOM.Properties.Settings.Default.cad == 1)
2446 2446
            {
2447 2447
                string FilePath = System.IO.Path.Combine(System.IO.Path.GetDirectoryName(Assembly.GetExecutingAssembly().Location) + "\\Cad");
2448 2448
                string FileName = FilePath + "\\commentstring.json"; // Default file name
KCOM/KCOM.csproj
337 337
      <DependentUpon>ConversationView.xaml</DependentUpon>
338 338
    </Compile>
339 339
    <Compile Include="Messenger\MessageBase.cs" />
340
    <Compile Include="Views\SplashScreenWindow.xaml.cs">
341
      <DependentUpon>SplashScreenWindow.xaml</DependentUpon>
342
    </Compile>
340 343
    <Compile Include="Web References\Get_FinalImage\Reference.cs">
341 344
      <AutoGen>True</AutoGen>
342 345
      <DesignTime>True</DesignTime>
......
476 479
      <SubType>Designer</SubType>
477 480
      <Generator>MSBuild:Compile</Generator>
478 481
    </Page>
482
    <Page Include="Views\SplashScreenWindow.xaml">
483
      <SubType>Designer</SubType>
484
      <Generator>MSBuild:Compile</Generator>
485
    </Page>
479 486
    <Page Include="Views\TopMenu.xaml">
480 487
      <SubType>Designer</SubType>
481 488
      <Generator>MSBuild:Compile</Generator>
......
1229 1236
    <None Include="Connected Services\ServiceDeepView\ServiceDeepView1.disco" />
1230 1237
  </ItemGroup>
1231 1238
  <ItemGroup>
1232
    <Resource Include="splash.png" />
1239
    <Resource Include="Resources\Images\MenuImage_New\splash.png" />
1233 1240
  </ItemGroup>
1234 1241
  <ItemGroup>
1235 1242
    <Resource Include="Resources\Cursor\customCursor.cur" />

내보내기 Unified diff

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