//Evan will have to support me and my cat once this gets released into the public. private static void Main(string[] args) { var ulterius = new Ulterius(); ulterius.Start(); }
public void Start() { _ulterius = new Ulterius(); _ulterius.Start(true); HandleMonitor(); var hardware = new HardwareSurvey(); hardware.Setup(true); Console.ReadLine(); }
//Evan will have to support me and my cat once this gets released into the public. private static void Main(string[] args) { if (!Debugger.IsAttached) { ExceptionHandler.AddGlobalHandlers(); Console.WriteLine("Exception Handlers Attached"); } if (System.Diagnostics.Process.GetProcessesByName(System.IO.Path.GetFileNameWithoutExtension(System.Reflection.Assembly.GetEntryAssembly().Location)).Count() > 1) return; ProfileOptimization.SetProfileRoot(AppEnvironment.DataPath); ProfileOptimization.StartProfile("Startup.Profile"); if (args.Length > 0) { HostFactory.Run(x => //1 { x.Service<UlteriusAgent>(s => //2 { s.ConstructUsing(name => new UlteriusAgent()); //3 s.WhenStarted(tc => tc.Start()); //4 s.WhenStopped(tc => tc.Stop()); s.WhenSessionChanged((se, e, id) => { se.HandleEvent(e, id); }); //5 }); x.RunAsLocalSystem(); //6 x.EnableSessionChanged(); x.SetDescription("The server that powers Ulterius"); //7 x.SetDisplayName("Ulterius Server"); //8 x.SetServiceName("UlteriusServer"); //9 }); } else { var ulterius = new Ulterius(); ulterius.Start(); var hardware = new HardwareSurvey(); hardware.Setup(); if (Tools.RunningPlatform() == Tools.Platform.Windows) { UlteriusTray.ShowTray(); } else { Console.ReadKey(true); } } }
//Evan will have to support me and my cat once this gets released into the public. private static void Main(string[] args) { if (System.Diagnostics.Process.GetProcessesByName(System.IO.Path.GetFileNameWithoutExtension(System.Reflection.Assembly.GetEntryAssembly().Location)).Count() > 1) { return; } ProfileOptimization.SetProfileRoot(AppEnvironment.DataPath); ProfileOptimization.StartProfile("Startup.Profile"); if (args.Length > 0) { HostFactory.Run(x => //1 { x.Service <UlteriusAgent>(s => //2 { s.ConstructUsing(name => new UlteriusAgent()); //3 s.WhenStarted(tc => tc.Start()); //4 s.WhenStopped(tc => tc.Stop()); s.WhenSessionChanged((se, e, id) => { se.HandleEvent(e, id); }); //5 }); x.RunAsLocalSystem(); //6 x.EnableSessionChanged(); x.SetDescription("The server that powers Ulterius"); //7 x.SetDisplayName("Ulterius Server"); //8 x.SetServiceName("UlteriusServer"); //9 }); } else { var ulterius = new Ulterius(); ulterius.Start(); var hardware = new HardwareSurvey(); hardware.Setup(); if (Tools.RunningPlatform() == Tools.Platform.Windows) { UlteriusTray.ShowTray(); } else { Console.ReadKey(true); } } }
//Evan will have to support me and my cat once this gets released into the public. private static void Main(string[] args) { ProfileOptimization.SetProfileRoot(AppEnvironment.DataPath); ProfileOptimization.StartProfile("Startup.Profile"); var ulterius = new Ulterius(); ulterius.Start(); var hardware = new HardwareSurvey(); hardware.Setup(); //TODO Gdk tray icons if (Tools.RunningPlatform() == Tools.Platform.Windows) { UlteriusTray.ShowTray(); } else { Console.ReadKey(true); } }
private static void Main(string[] args) { //Fix screensize issues for Screen Share if (Environment.OSVersion.Version.Major >= 6) { SetProcessDPIAware(); } HideWindow(); try { if (Process.GetProcessesByName(Path.GetFileNameWithoutExtension(Assembly.GetEntryAssembly().Location)) .Count() > 1) { return; } if (!Directory.Exists(AppEnvironment.DataPath)) { Directory.CreateDirectory(AppEnvironment.DataPath); } if (!Debugger.IsAttached) { ExceptionHandler.AddGlobalHandlers(); Console.WriteLine("Exception Handlers Attached"); } ProfileOptimization.SetProfileRoot(AppEnvironment.DataPath); ProfileOptimization.StartProfile("Startup.Profile"); var ulterius = new Ulterius(); ulterius.Start(); Console.ReadKey(); } catch (Exception ex) { Console.WriteLine("Something unexpected occured"); Console.WriteLine(ex.Message); Console.WriteLine(ex.StackTrace); } }
private static void Main(string[] args) { //Fix screensize issues for Screen Share if (Environment.OSVersion.Version.Major >= 6) { SetProcessDPIAware(); } HideWindow(); try { if ( Process.GetProcessesByName(Path.GetFileNameWithoutExtension(Assembly.GetEntryAssembly().Location)) .Count() > 1) { return; } ProfileOptimization.SetProfileRoot(AppEnvironment.DataPath); ProfileOptimization.StartProfile("Startup.Profile"); if (args.Length > 0) { HostFactory.Run(x => //1 { x.Service <UlteriusAgent>(s => //2 { s.ConstructUsing(name => new UlteriusAgent()); //3 s.WhenStarted(tc => tc.Start()); //4 s.WhenStopped(tc => tc.Stop()); s.WhenSessionChanged((se, e, id) => { se.HandleEvent(e, id); }); //5 }); x.RunAsLocalSystem(); //6 x.EnableSessionChanged(); x.EnableServiceRecovery(r => { r.RestartService(1); }); x.SetDescription("The server that powers Ulterius"); //7 x.SetDisplayName("Ulterius Server"); //8 x.SetServiceName("UlteriusServer"); //9 }); } else { var ulterius = new Ulterius(); ulterius.Start(); var hardware = new HardwareSurvey(); hardware.Setup(); if (Tools.RunningPlatform() == Tools.Platform.Windows) { UlteriusTray.ShowTray(); } else { Console.ReadKey(true); } } } catch { Console.WriteLine("Something unexpected occured"); } }