public static void Init() { var args = Environment.GetCommandLineArgs(); var ipcType = (IPCType)Enum.Parse(typeof(IPCType), args[2]); var launcherUri = args[3]; IPCUtil.CreateService( ipcType, typeof(InjectorService), typeof(IInjectorService), out var serviceUri ); LauncherService = IPCUtil.CreateChannel <ILauncherService>(ipcType, launcherUri); LauncherService.SendInjectorSettings(serviceUri); Harmony = new Harmony("me.failedshack.usbhelperinjector"); var assembly = Assembly.GetExecutingAssembly(); assembly.GetTypes() .Where(type => VersionSpecific.Applies(type, HelperVersion) && !(Overrides.DisableOptionalPatches && Optional.IsOptional(type)) && (!WineOnly.IsWineOnly(type) || WineCompat) ) .Do(type => Harmony.CreateClassProcessor(type).Patch()); if (WineCompat) { RenderOptions.ProcessRenderMode = RenderMode.SoftwareOnly; } }
public static void Init() { MessageBoxPatch.Replace("tp9+kFO7LOSD0AZ5zUBHrA==", Resources.Disclaimer); var factory = new ChannelFactory <ILauncherService>(new NetNamedPipeBinding(), "net.pipe://localhost/LauncherService"); LauncherService = factory.CreateChannel(); ServiceHost host = new ServiceHost(typeof(InjectorService), new Uri("net.pipe://localhost/InjectorService")); host.AddServiceEndpoint(typeof(IInjectorService), new NetNamedPipeBinding(), ""); host.Open(); LauncherService.SendInjectorSettings(); var harmony = HarmonyInstance.Create("me.failedshack.usbhelperinjector"); var assembly = Assembly.GetExecutingAssembly(); assembly.GetTypes() .Where(type => VersionSpecific.Applies(type, HelperVersion) && !(Overrides.DisableOptionalPatches && Optional.IsOptional(type))) .Do(type => { var parentMethodInfos = type.GetHarmonyMethods(); if (parentMethodInfos != null && parentMethodInfos.Count() > 0) { var info = HarmonyMethod.Merge(parentMethodInfos); var processor = new PatchProcessor(harmony, type, info); processor.Patch(); } }); }
/// <summary> /// 런처 서비스 /// </summary> private void CreateListenerService() { if (launcherService != null) { launcherService = null; } launcherService = new LauncherService(); launcherService.LauncherStatusChanged += LauncherService_LauncherStatusChanged; SvrProcessData = launcherService.SvrProcessData; }
protected static void Started() { MysqlDB.Init(new MysqlConfig(MysqlS.Default.Host, MysqlS.Default.Database, MysqlS.Default.User, MysqlS.Default.Password)); AuthService.Init(); LauncherService.Init(); Server = new TcpServer(NetworkS.Default.Ip, NetworkS.Default.Port, NetworkS.Default.MaxConnections); GameBridgeService = new GsService(); GameBridgeService.Init("TRUEPASSWORD"); Server.BeginListening(); }
public MainController(LauncherConfig config, LauncherContainer container) { this.config = config; //Dependency service = new DownloadFileServiceImpl(config); dataSource = new WebClientDataSource(config); repository = new LauncherRepositoryImpl(dataSource, service, config); //UseCases checkUpdate = new CheckUpdateImpl(repository); openLink = new OpenLinkImpl(); startGame = new StartGameImpl(repository); Container = container; }
public static void Init() { MessageBoxPatch.Replace("tp9+kFO7LOSD0AZ5zUBHrA==", Resources.Disclaimer); var factory = new ChannelFactory <ILauncherService>(new NetNamedPipeBinding(), "net.pipe://localhost/LauncherService"); LauncherService = factory.CreateChannel(); ServiceHost host = new ServiceHost(typeof(InjectorService), new Uri("net.pipe://localhost/InjectorService")); host.AddServiceEndpoint(typeof(IInjectorService), new NetNamedPipeBinding(), ""); host.Open(); Task.Run(async() => await LauncherService.SendInjectorSettings()); }
public LauncherMain() { InitializeComponent(); loginServerIp = Properties.Settings.Default.LoginServerIP; loginServerPort = Properties.Settings.Default.LoginServerPort; service = new LauncherService(); if (service.IsServerOn()) { Enable(); } else { Disable(); } }
/// <summary> /// Invoked when the application is launched normally by the end user. Other entry points /// will be used such as when the application is launched to open a specific file. /// </summary> /// <param name="e">Details about the launch request and process.</param> protected override void OnLaunched(LaunchActivatedEventArgs e) { DispatcherHelper.Initialize(); var rootFrame = Window.Current.Content as Frame; ServiceLocator.Current.GetInstance <LocalizationService>().UpdateCulture(); // Do not repeat app initialization when the Window already has content, // just ensure that the window is active if (rootFrame == null) { // Create a Frame to act as the navigation context and navigate to the first page rootFrame = new Frame(); rootFrame.NavigationFailed += OnNavigationFailed; e.SplashScreen.Dismissed += (sender, args) => { var loadState = (e.PreviousExecutionState != ApplicationExecutionState.Terminated); Task.Factory.StartNew(() => { ServiceLocator.Current .GetInstance <MainViewModel>().Initialize(loadState); }, TaskCreationOptions.LongRunning); }; Window.Current.Content = rootFrame; } if (rootFrame.Content == null) { // When the navigation stack isn't restored navigate to the first page, // configuring the new page by passing required information as a navigation // parameter rootFrame.Navigate(typeof(MainPage), e.Arguments); } LauncherService.ParseArguments(e.Arguments); // Ensure the current window is active Window.Current.Activate(); if (e.PreviousExecutionState == ApplicationExecutionState.NotRunning || e.PreviousExecutionState == ApplicationExecutionState.ClosedByUser) { ServiceLocator.Current.GetInstance <ReviewAppService>().AppLaunched(); } }
public static void Init() { var factory = new ChannelFactory <ILauncherService>(new NetNamedPipeBinding(), "net.pipe://localhost/LauncherService"); LauncherService = factory.CreateChannel(); ServiceHost host = new ServiceHost(typeof(InjectorService), new Uri("net.pipe://localhost/InjectorService")); host.AddServiceEndpoint(typeof(IInjectorService), new NetNamedPipeBinding(), ""); host.Open(); LauncherService.SendInjectorSettings(); Harmony = new Harmony("me.failedshack.usbhelperinjector"); var assembly = Assembly.GetExecutingAssembly(); assembly.GetTypes() .Where(type => VersionSpecific.Applies(type, HelperVersion) && !(Overrides.DisableOptionalPatches && Optional.IsOptional(type))) .Do(type => Harmony.CreateClassProcessor(type).Patch()); }
static void RunAutomatedLauncher(string[] args) { mLog.DebugFormat("Starting automated launcher with args {0}", PrintArgs(args)); int port; if (args.Length < 2) { LogError("Port wasn't specified. Launcher can't start"); return; } if (!int.TryParse(args[1], out port)) { LogError(string.Format( "Invalid port '{0}' specified. Launcher can't start", args[1])); return; } string ipToBind = args.Length == 3 ? args[2] : string.Empty; if (!Configurator.ConfigureRemoting(port, ipToBind)) { LogError(string.Format( "Error configuring remoting in port '{0}'. Launcher can't start", args[1])); return; } LauncherService automated = new LauncherService(ipToBind, port); ObjRef objRef = RemotingServices.Marshal(automated, "AutomatedLauncher"); Console.WriteLine(START_MESSAGE_PATTERN, "started ok"); while (!automated.CanExit) { System.Threading.Thread.Sleep(200); } }
public static void Init() { var args = Environment.GetCommandLineArgs(); var ipcType = (IPCType)Enum.Parse(typeof(IPCType), args[2]); var launcherUri = args[3]; IPCUtil.CreateService( ipcType, typeof(InjectorService), typeof(IInjectorService), out var serviceUri ); LauncherService = IPCUtil.CreateChannel <ILauncherService>(ipcType, launcherUri); LauncherService.SendInjectorSettings(serviceUri); Harmony = new Harmony("me.failedshack.usbhelperinjector"); var assembly = Assembly.GetExecutingAssembly(); assembly.GetTypes() .Where(type => VersionSpecific.Applies(type, HelperVersion) && !(Overrides.DisableOptionalPatches && Optional.IsOptional(type)) && (!WineOnly.IsWineOnly(type) || WineCompat) ) .Do(type => Harmony.CreateClassProcessor(type).Patch()); if (WineCompat) { RenderOptions.ProcessRenderMode = RenderMode.SoftwareOnly; } NusGrabberFormPatch.Shown += (form, e) => { FF player = null; var button = new OnOffButton() { OnImage = Resources.AudioOn, OffImage = Resources.AudioOff, State = PlayMusic }; button.StateChanged += (sender, e1) => { // avoid preloading ffplay // TODO: make this not so hackish if (player == null) { if (!button.State) { return; } player = FF.Play("-loop 0 -nodisp loop.ogg"); } player.Pause = !button.State; LauncherService.SetPlayMusic(button.State); }; var toolWindow = ((Form)form).Controls.Find("toolWindow5", true)[0]; toolWindow.Controls.Add(button); button.BringToFront(); }; }
public LauncherRepositoryImpl(LauncherDatasource launcherDataSource, LauncherService service, LauncherConfig config) { this.datasource = launcherDataSource; this.service = service; this.config = config; }