Пример #1
0
        private void Application_Startup(object sender, StartupEventArgs e)
        {
            // Create the startup window
            SIMAIL.Views.Connexion FenStartup = new SIMAIL.Views.Connexion();
            FenStartup.currentCompteMessagerie = cm;

            // Paramètres comptes serveur
            string appDirectory = new KnownFolder(KnownFolderType.Documents).Path + "\\" + "SIMAIL";

            if (Directory.Exists(appDirectory) == false)
            {
                try
                {
                    Directory.CreateDirectory(appDirectory);
                }
                catch (Exception e2)
                {
                    MessageBox.Show(e2.Message);
                }
            }
            App.Current.Resources.Add("pathDefaultCompteServ", appDirectory);

            //paramètre de l'application
            string helpHttpAddress = "https://github.com/lynch251/SIMAIL";

            App.Current.Resources.Add("helpHttpAddress", helpHttpAddress);

            // Do stuff here, e.g. to the window
            FenStartup.Show();
            // Show the window
        }