static void Main()
        {
            if (!EventLog.SourceExists("SelfMailer"))
            {
                EventLog.CreateEventSource("SelfMailer", "Mes applications");
            }
            EventLog eventLog = new EventLog("Mes applications", ".", "SelfMailer");
            eventLog.WriteEntry("Mon message", EventLogEntryType.Warning);

            BooleanSwitch booleanSwitch = new BooleanSwitch("BooleanSwitch", "Commutateur booléen.");
            TraceSwitch traceSwitch = new TraceSwitch("TraceSwitch", "Commutateur complexe.");

            TextWriterTraceListener textListener = new TextWriterTraceListener(@".\Trace.txt");
            Trace.Listeners.Add(textListener);

            Trace.AutoFlush = true;
            Trace.WriteLineIf(booleanSwitch.Enabled, "Démarrage de l'application SelfMailer");

            Project = new Library.Project();
            Application.EnableVisualStyles();
            Application.SetCompatibleTextRenderingDefault(false);
            Application.Run(new Forms.Main());

            Trace.WriteLineIf(traceSwitch.TraceInfo, "Arrêt de l'application SelfMailer");
        }
 static void Main()
 {
     Project = new Library.Project();
     Application.EnableVisualStyles();
     Application.SetCompatibleTextRenderingDefault(false);
     Application.Run(new Forms.Main());
 }
        static void Main()
        {
            Library.Project P = new Library.Project();
            P.MailServerSettings.HasChanged = true;
            P.ProjectSettings.HasChanged = true;

            Application.EnableVisualStyles();
            Application.SetCompatibleTextRenderingDefault(false);
            Application.Run(new Form1());
        }
        static void Main()
        {
            AppDomain.CurrentDomain.SetPrincipalPolicy(PrincipalPolicy.WindowsPrincipal);
            WindowsPrincipal currentUser = Thread.CurrentPrincipal as WindowsPrincipal;
            MessageBox.Show("Bonjour " + currentUser.Identity.Name);

            Project = new Library.Project();
            Application.EnableVisualStyles();
            Application.SetCompatibleTextRenderingDefault(false);
            Application.Run(new Forms.ChooseCulture());
            Application.Run(new Forms.Main());
        }
 static void Main(string[] args)
 {
     Project = new Library.Project();
     if (args.Length == 1 &&
            File.Exists(args[0]) &&
            Path.GetExtension(args[0]) == ".smpx")
     {
         Project = Library.Project.Load(args[0]);
     }
     Application.EnableVisualStyles();
     Application.SetCompatibleTextRenderingDefault(false);
     Application.Run(new Forms.Main());
 }
        static void Main(string[] args)
        {
            AppDomain.CurrentDomain.SetPrincipalPolicy(PrincipalPolicy.WindowsPrincipal);
            WindowsPrincipal currentUser = Thread.CurrentPrincipal as WindowsPrincipal;
            MessageBox.Show("Bonjour " + currentUser.Identity.Name);

            Project = new Library.Project();
            if (args.Length == 1 && File.Exists(args[0]) && Path.GetExtension(args[0]) == ".smpx")
            {
                Project = Library.Project.Load(args[0]);
            }

            Application.EnableVisualStyles();
            Application.SetCompatibleTextRenderingDefault(false);
            Application.Run(new Forms.GDISamples());
            Application.Run(new Forms.ChooseCulture());
            Application.Run(new Forms.Main());
        }
 public ProjectException(Project project)
     : base()
 {
     this.Project = project;
 }
 public ProjectException(Project project, string message, Exception innerException)
     : base(message, innerException)
 {
     this.Project = project;
 }
 public ProjectException(Project project, string message)
     : base(message)
 {
     this.Project = project;
 }