public void Run()
        {
            while (true)
            {
                try
                {
                    switch (_view.ShowMenu(LoggedUser != null))
                    {
                    case ActionResult.Login:
                        Login();
                        break;

                    case ActionResult.Logout:
                        Logout();
                        break;

                    case ActionResult.Register:
                        Register();
                        break;

                    default:
                        return;
                    }
                }
                catch (Exception exception)
                {
                    _view.ShowError(exception.Message);
                    _view.Sleep();
                }
            }
        }
Beispiel #2
0
        public void ImportHookingSettings(Stream exportedHookingSettings)
        {
            try
            {
                var importedSettings = HookingSettings.FromXml(exportedHookingSettings);
                _hookingSettings.AddRulesFrom(importedSettings);
            }
            catch
            {
                _view.ShowError("Cannot import hooking settings. The file is invalid.");
                return;
            }

            var processes = ProcessFilter.ForInvalidProcesses(_platformBits).Filter(_spyManager.RunningProcesses());

            _hookLoader.LoadHooksOn(processes);
        }