private async void btnRecord_Click(object sender, EventArgs e) { if (_fusionService == null || _loading) { return; } if (_session == null) { await ClearLogsAsync(); SetOverlayState(OverlayState.Recording); _session = new FusionSession(_fusionService); _session.Start(); btnSession.Enabled = false; } else { _session.End(); await LoadLogsAsync(_session.Store.Path); _session = null; } }
private async void btnRecord_Click(object sender, EventArgs e) { if (_fusionService == null || _loading) { return; } if (_session == null) { await ClearLogsAsync(); SetOverlayState(OverlayState.Recording); _session = new FusionSession(_fusionService); _session.Start(); btnImport.Enabled = false; btnExport.Enabled = false; } else { _session.End(); await LoadLogsAsync(_session.Store.Path); _session = null; } btnRecord.Text = _session == null ? "Record" : "Stop"; btnRecord.ImageOptions.SvgImage = _session == null ? Properties.Resources.Capture : Properties.Resources.Stop; }