示例#1
0
        static void Main(string[] args)
        {
            Application.EnableVisualStyles();
            Application.SetCompatibleTextRenderingDefault(false);



            _runtime = new AfterglowRuntime();

            //_runtime.Setup = new AfterglowSetup();
            //Profile p = new Profile();
            //p.Setup = _runtime.Setup;
            ////_runtime.Setup.ConfiguredPostProcessPlugins.Add(new ColourCorrectionPostProcess() { DisplayName = "frank" });
            ////_runtime.Setup.Profiles.Add(_runtime.Settings.Profiles.FirstOrDefault());
            //_runtime.Settings.Profiles.ToList().ForEach(a => _runtime.Setup.ConfiguredLightSetupPlugins.Add(a.OLDLightSetupPlugin));
            //_runtime.Settings.Profiles.ToList().ForEach(a => _runtime.Setup.ConfiguredCapturePlugins.Add(a.OLDCapturePlugin));
            //_runtime.Settings.Profiles.ToList().ForEach(a => _runtime.Setup.ConfiguredColourExtractionPlugins.Add(a.OLDColourExtractionPlugin));
            //_runtime.Settings.Profiles.ToList().ForEach(a => _runtime.Setup.ConfiguredPostProcessPlugins.AddRange(a.OLDPostProcessPlugins));
            //_runtime.Settings.Profiles.ToList().ForEach(a => _runtime.Setup.ConfiguredOutputPlugins.AddRange(a.OLDOutputPlugins));

            //Profile profile = new Profile();
            //profile.LightSetupPlugins.AddRange(_runtime.Setup.DefaultLightSetupPlugins());
            //profile.CapturePlugins.AddRange(_runtime.Setup.DefaultCapturePlugins());
            //profile.ColourExtractionPlugins.AddRange(_runtime.Setup.DefaultColourExtractionPlugins());
            //profile.PostProcessPlugins.AddRange(_runtime.Setup.DefaultPostProcessPlugins());
            //profile.OutputPlugins.AddRange(_runtime.Setup.DefaultOutputPlugins());
            //_runtime.Setup.Profiles.Add(profile);
            //_runtime.Setup.ConfiguredLightSetupPlugins.Add(.FirstOrDefault().OLDPostProcessPlugins.FirstOrDefault());
            //_runtime.Save();
            Application.Run(new Forms.MainForm(_runtime));
        }
示例#2
0
 public SettingsForm(AfterglowRuntime runtime, MainForm mainForm)
 {
     this._runtime  = runtime;
     this._mainForm = mainForm;
     InitializeComponent();
     LoadTreeView();
 }
示例#3
0
 public BaseRecord(ITable storage, ILogger logger, AfterglowRuntime runtime)
 {
     this.Table   = storage;
     this.Id      = storage.Id;
     this.Runtime = runtime;
     this.Logger  = logger;
     SaveToStorage(() => this.Type, this.Type);
 }
示例#4
0
        static void Main(string[] args)
        {
            Application.EnableVisualStyles();
            Application.SetCompatibleTextRenderingDefault(false);

            Afterglow.Log.Log4NetProxy logger = new Log4NetProxy(log4net.LogManager.GetLogger("LoggingSystem"));

            Afterglow.Storage.NiniDatabase storage = new NiniDatabase("Afterglow.ini");
            _runtime = new AfterglowRuntime(storage, logger, new Loader.PluginLoader());

            Application.Run(new Forms.MainForm(_runtime));
        }
示例#5
0
        static void Main(string[] args)
        {
            try
            {
                Console.WriteLine("Loading Afterglow settings...");
                _runtime = new AfterglowRuntime();

                if (_runtime == null || _runtime.Setup == null)
                {
                    AfterglowRuntime.Logger.Fatal("Afterglow settings could not be loaded.");
                    return;
                }
                Console.WriteLine("Afterglow runtime loaded.");

                Console.WriteLine("Starting Afterglow site...");

                StartOptions startOptions = new StartOptions();
                startOptions.Urls.Add(string.Format("http://localhost:{0}", _runtime.Setup.Port));
                startOptions.Urls.Add(string.Format("http://{0}:{1}", Environment.MachineName.ToLower(), _runtime.Setup.Port));
                foreach (IPAddress addr in Dns.GetHostAddresses(Dns.GetHostName()))
                {
                    if (addr.AddressFamily == System.Net.Sockets.AddressFamily.InterNetwork)
                    {
                        startOptions.Urls.Add(string.Format("http://{0}:{1}", addr, _runtime.Setup.Port));
                    }
                }

                using (WebApp.Start <AppHost>(startOptions))
                {
                    foreach (string url in startOptions.Urls)
                    {
                        Console.WriteLine("Afterglow running on host {0}", url);
                    }

                    Console.WriteLine("Press <enter> to exit.");
                    Console.ReadLine();
                }
            }
            catch (Exception ex)
            {
                AfterglowRuntime.Logger.Fatal(ex, "Application Error");
            }
            finally
            {
                AfterglowRuntime.Logger.Info("Exit Application");
            }
        }
示例#6
0
 public DebugOutput(ITable table, Afterglow.Core.Log.ILogger logger, AfterglowRuntime runtime)
     : base(table, logger, runtime)
 {
 }
示例#7
0
 public MainForm(AfterglowRuntime _runtime)
 {
     this._runtime = _runtime;
     InitializeComponent();
 }
示例#8
0
 public BasePlugin(ITable table, Log.ILogger logger, AfterglowRuntime runtime)
     : base(table, logger, runtime)
 {
 }
 public AverageColourExtraction(ITable table, Afterglow.Core.Log.ILogger logger, AfterglowRuntime runtime)
     : base(table, logger, runtime)
 {
 }
示例#10
0
 public ColourCorrectionPostProcess(ITable table, Afterglow.Core.Log.ILogger logger, AfterglowRuntime runtime)
     : base(table, logger, runtime)
 {
 }
示例#11
0
 public Direct3DCapture(ITable table, Afterglow.Core.Log.ILogger logger, AfterglowRuntime runtime)
     : base(table, logger, runtime)
 {
 }
示例#12
0
 public AfterglowSettingsUserControl(AfterglowRuntime _runtime)
 {
     InitializeComponent();
     this._runtime = _runtime;
 }
示例#13
0
 public BasicLightSetup(ITable table, Afterglow.Core.Log.ILogger logger, AfterglowRuntime runtime)
     : base(table, logger, runtime)
 {
 }
示例#14
0
 public CopyScreenCapture(ITable table, Afterglow.Core.Log.ILogger logger, AfterglowRuntime runtime)
     : base(table, logger, runtime)
 {
     SetupCaptureCorrectionTypes();
 }
示例#15
0
 public BasePlugin(ITable table, Log.ILogger logger, AfterglowRuntime runtime)
     : base(table, logger, runtime)
 {
 }