Esempio n. 1
0
        static void Main()
        {
            try
            {
                var ac = new AppConfig();

                App app;
                if (ac.mode.ToLower() == "daemon")
                {
                    app = new DaemonApp(ac);
                    if( ac.HadErrors )
                    {
                        log.Error("Error parsing command line arguments.\n"+ac.GetUsageHelpText());
                    }
                }
                else
                if (ac.mode.ToLower() == "remotecontrolgui")
                {
                    if( ac.HadErrors )
                    {
                        MessageBox.Show( ac.GetUsageHelpText(), "Dirigent - Error parsinbg command line arguments" );
                    }

                    ac.machineId = "none";
                    app = new TrayApp(ac);
                }
                else // trayApp (the default)
                {
                    if( ac.HadErrors )
                    {
                        MessageBox.Show( ac.GetUsageHelpText(), "Dirigent - Error parsinbg command line arguments" );
                    }

                    app = new TrayApp(ac);
                }
                app.run();
            }
            catch( Exception ex )
            {
                log.Error(ex);
            }
        }
Esempio n. 2
0
 public TrayApp(AppConfig ac)
 {
     this.ac = ac;
 }
Esempio n. 3
0
 public DaemonApp(AppConfig ac)
 {
     this.ac = ac;
 }