1 using System;
 2 using System.Windows;
 3 using FileExplorer;
 4 
 5 int main()
 6 {
 7     MainWindow mainWindow("File Explorer");
 8     if (mainWindow.Error())
 9     {
10         string errorMessage = GetErrorMessage(mainWindow.GetErrorId());
11         MessageBox.Show(errorMessage"error");
12         return 1;
13     }
14     auto iconResult = Application.GetResourceManager().GetIcon("file_explorer.icon");
15     if (iconResult.Error())
16     {
17         string errorMessage = iconResult.GetErrorMessage();
18         MessageBox.Show(errorMessage"error");
19         return 1;
20     }
21     auto result = mainWindow.SetSmallIcon(*iconResult.Value());
22     if (result.Error())
23     {
24         string errorMessage = result.GetErrorMessage();
25         MessageBox.Show(errorMessage"error");
26         return 1;
27     }
28     return Application.Run(mainWindow);
29 }