Пример #1
0
        private void OnProcessEnded(object sender, InjectorLauncher.OnProcessStatusEventArgs e)
        {
            Dispatcher.Invoke(new ThreadStart(() =>
            {
                if (((Config)DataContext).Injection.ProcessDetectionMode == ProcessDetectionMode.ProcessId)
                {
                    // Stop polling for the dead process
                    TALauncher.UnsetTarget();
                }

                SetStatus(LauncherStatus.READY_TO_LAUNCH);
            }));
        }
Пример #2
0
        private void OnProcessLaunched(object sender, InjectorLauncher.OnProcessStatusEventArgs e)
        {
            Dispatcher.Invoke(new ThreadStart(() =>
            {
                Config config = DataContext as Config;
                // If the config is set to only consider injection by process ID, only change state if we launched it
                if (config.Injection.ProcessDetectionMode == ProcessDetectionMode.ProcessId && e.ProcessId != lastLaunchedProcessId)
                {
                    return;
                }

                if (config.Injection.IsAutomatic)
                {
                    SetStatus(LauncherStatus.WAITING_TO_INJECT);
                    AutoInjectTimer.Interval = config.Injection.AutoInjectTimer * 1000;
                    AutoInjectTimer.Start();
                }
                else
                {
                    SetStatus(LauncherStatus.READY_TO_INJECT);
                }
            }));
        }