-
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathApp.xaml.cs
54 lines (45 loc) · 1.5 KB
/
App.xaml.cs
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
using System;
using System.Configuration;
using System.Data;
using System.Windows;
using System.Windows.Threading;
using System.Windows.Media.Animation;
using WinFlux.Services;
namespace WinFlux
{
/// <summary>
/// Interaction logic for App.xaml
/// </summary>
public partial class App : Application
{
private MainWindow mainWindow;
private Windows.SplashWindow splashWindow;
protected override void OnStartup(StartupEventArgs e)
{
base.OnStartup(e);
try
{
// Initialize language based on saved preference
LanguageService.InitializeLanguage();
// Ana pencereyi oluştur ama gösterme
mainWindow = new MainWindow();
// Özel splash window'u göster
splashWindow = new Windows.SplashWindow();
// Splash ekranı tamamlandığında ana pencereyi göster
splashWindow.LoadingComplete += (s, args) =>
{
mainWindow.Show();
mainWindow.Activate();
};
// Splash window'u göster
splashWindow.Show();
}
catch (Exception ex)
{
if (mainWindow == null)
mainWindow = new MainWindow();
mainWindow.Show();
}
}
}
}