public EventFileScanner(string Game_Path, Memory_Scanner memory_scanner, VibrationEvents vibrationEvents) { this.Game_Path = Game_Path; this.vibrationEvents = vibrationEvents; memory_scanner.AnimationEvent += MemoryScanner_AnimationEvent; for (int i = 0; i < RunningAnimationEvents.Length; i++) { RunningAnimationEvents[i] = new List <Running_Event>(); } }
public void SetMemoryEvents(Memory_Scanner memory_Scanner) { if (this.memory_Scanner != null) { this.memory_Scanner.AnimationTimeResetted -= On_Animation_Timer_Reset; this.memory_Scanner.GamePaused -= On_Game_Paused; this.memory_Scanner.GameResumed -= On_Game_Resumed; } memory_Scanner.GamePaused += On_Game_Paused; memory_Scanner.GameResumed += On_Game_Resumed; memory_Scanner.AnimationTimeResetted += On_Animation_Timer_Reset; this.memory_Scanner = memory_Scanner; }
public Form_EventFileReader(string Game_Name, string Game_Path) { this.Game_Path = Game_Path; InitializeComponent(); //load presets checkBox_ShowWarnings.Checked = Properties.Settings.Default.Show_warnings; checkBox_ShowErrors.Checked = Properties.Settings.Default.Show_errors; checkBox_ShowNotifications.Checked = Properties.Settings.Default.Show_notifications; checkBox_ShowDebug.Checked = Properties.Settings.Default.Show_debug_info; vibrationEvents = new VibrationEvents(Game_Path); memory_scanner = new Memory_Scanner(Game_Name); eventFileScanner = new EventFileScanner(Game_Path, memory_scanner, vibrationEvents); RecorderOptions options = new RecorderOptions { RecorderMode = RecorderMode.Video, RecorderApi = RecorderApi.WindowsGraphicsCapture, IsThrottlingDisabled = false, IsHardwareEncodingEnabled = true, IsLowLatencyEnabled = false, IsMp4FastStartEnabled = false, IsFragmentedMp4Enabled = false, IsLogEnabled = true, LogSeverityLevel = LogLevel.Debug, LogFilePath = @"C:\Users\jpriv\Desktop\Nieuwe map\", AudioOptions = new AudioOptions { IsAudioEnabled = false, }, VideoOptions = new VideoOptions { BitrateMode = BitrateControlMode.Quality, Bitrate = 7000 * 1000, Framerate = 60, Quality = 70, IsFixedFramerate = true, EncoderProfile = H264Profile.Main } }; _rec1 = Recorder.CreateRecorder(options); _rec2 = Recorder.CreateRecorder(options); m_GlobalHook = Hook.GlobalEvents(); m_GlobalHook.OnCombination(new Dictionary <Combination, Action> { { Combination.TriggeredBy(Keys.PageUp), WaitForRecording }, }); m_GlobalHook.OnCombination(new Dictionary <Combination, Action> { { Combination.TriggeredBy(Keys.Home), WaitForContinuesRecording }, }); m_GlobalHook.OnCombination(new Dictionary <Combination, Action> { { Combination.TriggeredBy(Keys.End), StopRecording }, }); }