-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathApp.xaml.cs
More file actions
33 lines (28 loc) · 898 Bytes
/
Copy pathApp.xaml.cs
File metadata and controls
33 lines (28 loc) · 898 Bytes
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
using System.Windows;
namespace OpenStudioIDE
{
public partial class App : Application
{
private string folderPath;
public bool LoadedProject { get; private set; }
protected override void OnStartup(StartupEventArgs e)
{
base.OnStartup(e);
// Show the welcome window
Window1 welcomeWindow = new Window1();
welcomeWindow.ShowDialog();
// Check if the user chose to load or create a project
if (welcomeWindow.LoadedProject)
{
// Create and show the main window
MainWindow mainWindow = new MainWindow(folderPath);
mainWindow.Show();
}
else
{
// Exit the application if the user didn't choose to load a project
Shutdown();
}
}
}
}