Esempio n. 1
0
 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 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 },
            });
        }