<commit_before>﻿using System.Threading.Tasks;
using System.Windows;


namespace MailSecure
{
    /// <summary>
    /// Logique d'interaction pour App.xaml
    /// </summary>
    public partial class App : Application {
        public static MailSender mailSender { get; set; }
        public static UserDataContext CurrentUserData { get; set; }

        private SplashScreen.SplashScreen splashScreen;

        public App() {
            splashScreen = new SplashScreen.SplashScreen();
            splashScreen.Show();
        }

        public void getCurrentUser() {
            CurrentUserData.CurrentUser = BinaryMCSFileManager.ReadStructInFile();
            CurrentUserData.DisplayedName = App.CurrentUserData.CurrentUser.userName;
        }

        protected override async void OnStartup(StartupEventArgs e) {
            base.OnStartup(e);

            // Longest loading
            await LongLoading();

            // Shortest loading
            if(!await this.ShortLoading()) {
                Login login = new Login();
                login.ShowDialog();
            }
            MainWindow = new MainWindow();
            MainWindow.Show();<commit_msg>Login form display first if no config avaible<commit_after>﻿using System.Threading.Tasks;
using System.Windows;


namespace MailSecure
{
    /// <summary>
    /// Logique d'interaction pour App.xaml
    /// </summary>
    public partial class App : Application {
        public static MailSender mailSender { get; set; }
        public static UserDataContext CurrentUserData { get; set; }

        private SplashScreen.SplashScreen splashScreen;

        public App() {
            splashScreen = new SplashScreen.SplashScreen();
            splashScreen.Show();
        }

        public void getCurrentUser() {
            CurrentUserData.CurrentUser = BinaryMCSFileManager.ReadStructInFile();
            CurrentUserData.DisplayedName = App.CurrentUserData.CurrentUser.userName;
        }

        protected override async void OnStartup(StartupEventArgs e) {
            base.OnStartup(e);

            // Longest loading
            await LongLoading();


            MainWindow = new MainWindow();
            // Shortest loading

            if (!await this.ShortLoading()) {
                MainWindow.Show();
                MailServerConfigurationWindow mailConfigurationWindow = new MailServerConfigurationWindow();
                mailConfigurationWindow.Show();
            } else {
                MainWindow.Show();
            }
            
{'fraction_non_alphanumeric': 0.08544303797468354, 'fraction_numerical': 0.0, 'mean_word_length': 2.0287425149700598, 'pattern_counts': {'":': 0, '<': 7, '<?xml version=': 0, '>': 7, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '557592', 'n_tokens_mistral': 633, 'n_tokens_neox': 604, 'n_words': 147}