From de4b8e66fd9b5c91d0b764461bcd3e8f71317512 Mon Sep 17 00:00:00 2001 From: jwallet Date: Sat, 15 Sep 2018 11:55:23 -0400 Subject: [PATCH] FAQ and Analytics added (#48) - added FAQ for troubleshooting - added Analytics - fixed app crashing by locking audio controls --- EspionSpotify/Analytics.cs | 67 +++ EspionSpotify/App.config | 3 + .../AudioSessions/SpotifyAudioSession.cs | 18 +- EspionSpotify/Controls/MetroTile.cs | 76 ++++ EspionSpotify/EspionSpotify.csproj | 8 + EspionSpotify/Models/SpotifyWindowInfo.cs | 2 +- EspionSpotify/Properties/Settings.Designer.cs | 12 + EspionSpotify/Properties/Settings.settings | 3 + EspionSpotify/Spotify/SpotifyStatus.cs | 2 +- EspionSpotify/english.Designer.cs | 99 +++++ EspionSpotify/english.resx | 44 ++ EspionSpotify/french.resx | 44 ++ EspionSpotify/french1.Designer.cs | 99 +++++ EspionSpotify/frmEspionSpotify.Designer.cs | 387 +++++++++++++++--- EspionSpotify/frmEspionSpotify.cs | 117 +++++- 15 files changed, 912 insertions(+), 69 deletions(-) create mode 100644 EspionSpotify/Analytics.cs create mode 100644 EspionSpotify/Controls/MetroTile.cs diff --git a/EspionSpotify/Analytics.cs b/EspionSpotify/Analytics.cs new file mode 100644 index 00000000..2ec67616 --- /dev/null +++ b/EspionSpotify/Analytics.cs @@ -0,0 +1,67 @@ +using System; +using System.Collections.Generic; +using System.Globalization; +using System.Net.Http; +using System.Threading.Tasks; + +namespace EspionSpotify +{ + public class Analytics + { + private const string url = "https://www.google-analytics.com/collect"; + private const string tid = "UA-125662919-1"; + + private readonly HttpClient client = new HttpClient(); + private readonly string cid; + private readonly string cm; + private readonly string ul; + private readonly string cs; + + public DateTime LastRequest { get; set; } = new DateTime(); + public string LastAction { get; set; } = string.Empty; + + public Analytics(string clientId, string version) + { + cid = clientId; + cm = version; + ul = CultureInfo.CurrentCulture.Name; + cs = Environment.OSVersion.ToString(); + } + + public static string GenerateCID() + { + return Guid.NewGuid().ToString(); + } + + public async Task LogAction(string action) + { + if (LastAction.Equals(action) && DateTime.Now - LastRequest < TimeSpan.FromMinutes(5)) return false; + + var data = new Dictionary + { + { "v", "1" }, + { "tid", tid }, // App id + { "t", "pageview" }, // Analytics type + { "cid", cid }, // Client id + { "cm", cm }, // Campaign medium, App version + { "av", cm }, // App version + { "cn", "Spytify" }, // Campaign name + { "an", "Spytify" }, // App name + { "cs", cs}, // Campaign source, OS Version + { "ul", ul }, // User Language + { "dh", "jwallet.github.io/spy-spotify" }, // Document host + { "dl", $"/{action}" }, // Document link + { "dt", action }, // Document title + { "cd", action } // Screen name + }; + + var content = new FormUrlEncodedContent(data); + var resp = await client.PostAsync(url, content); + + LastAction = action; + LastRequest = DateTime.Now; + + return resp.IsSuccessStatusCode; + } + } +} diff --git a/EspionSpotify/App.config b/EspionSpotify/App.config index b99d14a2..cf6d88f6 100644 --- a/EspionSpotify/App.config +++ b/EspionSpotify/App.config @@ -55,6 +55,9 @@ False + + + diff --git a/EspionSpotify/AudioSessions/SpotifyAudioSession.cs b/EspionSpotify/AudioSessions/SpotifyAudioSession.cs index d46ebc1b..bdc19cfa 100644 --- a/EspionSpotify/AudioSessions/SpotifyAudioSession.cs +++ b/EspionSpotify/AudioSessions/SpotifyAudioSession.cs @@ -44,12 +44,15 @@ public bool IsSpotifyCurrentlyPlaying() var spotifySoundValue = 0.0; Thread.Sleep(_sleepValue); - foreach (var audioSession in _spotifyAudioSessionControls) + lock (_spotifyAudioSessionControls) { - var soundValue = Math.Round(audioSession.AudioMeterInformation.MasterPeakValue * 100.0, 1); - if (soundValue == 0.0) continue; + foreach (var audioSession in _spotifyAudioSessionControls) + { + var soundValue = Math.Round(audioSession.AudioMeterInformation.MasterPeakValue * 100.0, 1); + if (soundValue == 0.0) continue; - spotifySoundValue = soundValue; + spotifySoundValue = soundValue; + } } samples.Add(spotifySoundValue); @@ -60,9 +63,12 @@ public bool IsSpotifyCurrentlyPlaying() public void SetSpotifyToMute(bool mute) { - foreach (var audioSession in _spotifyAudioSessionControls) + lock (_spotifyAudioSessionControls) { - audioSession.SimpleAudioVolume.Mute = mute; + foreach (var audioSession in _spotifyAudioSessionControls) + { + audioSession.SimpleAudioVolume.Mute = mute; + } } } diff --git a/EspionSpotify/Controls/MetroTile.cs b/EspionSpotify/Controls/MetroTile.cs new file mode 100644 index 00000000..b3eb5150 --- /dev/null +++ b/EspionSpotify/Controls/MetroTile.cs @@ -0,0 +1,76 @@ +using System; +using System.Collections.Generic; +using System.Drawing; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using System.Windows.Forms; + +namespace EspionSpotify.Controls +{ + public class MetroTile : MetroFramework.Controls.MetroTile + { + private bool _isFocused = false; + private bool _isHovered = false; + + protected override void OnPaintForeground(PaintEventArgs e) + { + base.OnPaintForeground(e); + + Color color = Color.FromArgb(175, 240, 200); + + if (_isHovered || _isFocused) + { + color = Color.FromArgb(30, 215, 96); + } + + using (Pen p = new Pen(color)) + { + p.Width = 3; + Rectangle borderRect = new Rectangle(1, 1, Width - 3, Height - 3); + e.Graphics.DrawRectangle(p, borderRect); + } + } + protected override void OnGotFocus(EventArgs e) + { + _isFocused = true; + Invalidate(); + + base.OnGotFocus(e); + } + + protected override void OnLostFocus(EventArgs e) + { + _isFocused = false; + _isHovered = false; + + Invalidate(); + base.OnLostFocus(e); + } + + protected override void OnLeave(EventArgs e) + { + Task.Run(async () => + { + await Task.Delay(150); + base.OnLeave(e); + }); + } + + protected override void OnMouseEnter(EventArgs e) + { + _isHovered = true; + Invalidate(); + + base.OnMouseEnter(e); + } + + protected override void OnMouseLeave(EventArgs e) + { + _isHovered = false; + Invalidate(); + + base.OnMouseLeave(e); + } + } +} diff --git a/EspionSpotify/EspionSpotify.csproj b/EspionSpotify/EspionSpotify.csproj index f7120b77..b7f4f4ab 100644 --- a/EspionSpotify/EspionSpotify.csproj +++ b/EspionSpotify/EspionSpotify.csproj @@ -133,6 +133,10 @@ + + False + ..\..\..\..\..\..\Program Files (x86)\Microsoft Visual Studio\2017\Professional\MSBuild\Microsoft\Microsoft.NET.Build.Extensions\net461\lib\System.Net.Http.dll + @@ -146,9 +150,13 @@ + Component + + Component + Component diff --git a/EspionSpotify/Models/SpotifyWindowInfo.cs b/EspionSpotify/Models/SpotifyWindowInfo.cs index d3dc9354..fecfd142 100644 --- a/EspionSpotify/Models/SpotifyWindowInfo.cs +++ b/EspionSpotify/Models/SpotifyWindowInfo.cs @@ -11,6 +11,6 @@ public class SpotifyWindowInfo public string WindowTitle { get; set; } public bool IsPlaying { get; set; } - public bool IsTitledSpotify() => WindowTitle?.ToLowerInvariant().Equals("spotify") ?? false; + public bool IsTitledSpotify { get => WindowTitle?.ToLowerInvariant().Equals("spotify") ?? false; } } } diff --git a/EspionSpotify/Properties/Settings.Designer.cs b/EspionSpotify/Properties/Settings.Designer.cs index dba5503e..a4cdb0a2 100644 --- a/EspionSpotify/Properties/Settings.Designer.cs +++ b/EspionSpotify/Properties/Settings.Designer.cs @@ -202,5 +202,17 @@ public bool RecordUnknownTrackTypeEnabled { this["RecordUnknownTrackTypeEnabled"] = value; } } + + [global::System.Configuration.UserScopedSettingAttribute()] + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.Configuration.DefaultSettingValueAttribute("")] + public string AnalyticsCID { + get { + return ((string)(this["AnalyticsCID"])); + } + set { + this["AnalyticsCID"] = value; + } + } } } diff --git a/EspionSpotify/Properties/Settings.settings b/EspionSpotify/Properties/Settings.settings index 95b92aaa..d60cecbd 100644 --- a/EspionSpotify/Properties/Settings.settings +++ b/EspionSpotify/Properties/Settings.settings @@ -47,5 +47,8 @@ False + + + \ No newline at end of file diff --git a/EspionSpotify/Spotify/SpotifyStatus.cs b/EspionSpotify/Spotify/SpotifyStatus.cs index 9cf94847..6b26e35d 100644 --- a/EspionSpotify/Spotify/SpotifyStatus.cs +++ b/EspionSpotify/Spotify/SpotifyStatus.cs @@ -48,7 +48,7 @@ private void SetSongInfo(ref SpotifyWindowInfo spotifyWindowInfo) Track = new Track { Ad = isAd && isPlaying, - Playing = isPlaying || !spotifyWindowInfo.IsTitledSpotify(), + Playing = isPlaying || !spotifyWindowInfo.IsTitledSpotify, Artist = GetTitleTag(tags, 1), Title = GetTitleTag(tags, 2), TitleExtended = GetTitleTag(tags, 3), diff --git a/EspionSpotify/english.Designer.cs b/EspionSpotify/english.Designer.cs index 62c1a640..f9f9b2fe 100644 --- a/EspionSpotify/english.Designer.cs +++ b/EspionSpotify/english.Designer.cs @@ -132,6 +132,15 @@ internal static string cbOptLangFr { } } + /// + /// Looks up a localized string similar to Use Audacity (a free editor for audio files) to cut the audio part that you want to remove and export it back to the same audio type. Spytify cannot guarantee that an ad or a track will be detected correctly since it's based on a bit of information available in the Spotify process that is not always accurate.. + /// + internal static string lblAdAndTrackOverlapOnRecordedTrack { + get { + return ResourceManager.GetString("lblAdAndTrackOverlapOnRecordedTrack", resourceCulture); + } + } + /// /// Looks up a localized string similar to Group every artist songs inside their own folder. /// @@ -159,6 +168,24 @@ internal static string lblAds { } } + /// + /// Looks up a localized string similar to Spotify detected that you tried to disable ads using Spytify feature "Disable Ads". Disable this setting and restart both apps.. + /// + internal static string lblAdsPlayAndStop { + get { + return ResourceManager.GetString("lblAdsPlayAndStop", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Spytify disables most apps when the recording session starts. Make sure to disable Windows 10 notifcation sound coming from apps in "Notifications and actions settings" and all other apps in the "Volume Mixer". Only Spotify and Spytify should not be muted.. + /// + internal static string lblBackgroundNoiceRecordedOnTrack { + get { + return ResourceManager.GetString("lblBackgroundNoiceRecordedOnTrack", resourceCulture); + } + } + /// /// Looks up a localized string similar to Audio quality:. /// @@ -276,6 +303,15 @@ internal static string lblRecordUnknownTrackType { } } + /// + /// Looks up a localized string similar to Spotify looks for local music files before playing a track. If it finds one with the same meta data that the current song, it will play the local one instead. Cut track means that you started recording this track once and you ended the session too early. Just delete these incomplete tracks in your music directory to solve your issue.. + /// + internal static string lblSpotifyTrackCut { + get { + return ResourceManager.GetString("lblSpotifyTrackCut", resourceCulture); + } + } + /// /// Looks up a localized string similar to Spy:. /// @@ -285,6 +321,15 @@ internal static string lblSpy { } } + /// + /// Looks up a localized string similar to Podcast, audio book and any other uncommon track type are detected as an ad. Also, Spotify don't return Spyitfy the right info when you switch between radios, playlists and albums, resulting in a track detected as an ad. Spytify cannot guarantee that a track will be detected correctly since it's based on a bit of information available in the Spotify process that is not always accurate.. + /// + internal static string lblTrackDetectedAsAd { + get { + return ResourceManager.GetString("lblTrackDetectedAsAd", resourceCulture); + } + } + /// /// Looks up a localized string similar to Ad. /// @@ -501,6 +546,15 @@ internal static string tabAdvanced { } } + /// + /// Looks up a localized string similar to F.A.Q.. + /// + internal static string tabFAQ { + get { + return ResourceManager.GetString("tabFAQ", resourceCulture); + } + } + /// /// Looks up a localized string similar to Spy. /// @@ -563,5 +617,50 @@ internal static string tipStopSying { return ResourceManager.GetString("tipStopSying", resourceCulture); } } + + /// + /// Looks up a localized string similar to Ads and tracks overlap at the beginning/end of recorded tracks.. + /// + internal static string tlAdAndTrackOverlapOnRecordedTrack { + get { + return ResourceManager.GetString("tlAdAndTrackOverlapOnRecordedTrack", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Spotify plays an ad then it pause/play every second.. + /// + internal static string tlAdsPlayAndStop { + get { + return ResourceManager.GetString("tlAdsPlayAndStop", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Background noice/sound was recorded on the saved track file.. + /// + internal static string tlBackgroundNoiceRecordedOnTrack { + get { + return ResourceManager.GetString("tlBackgroundNoiceRecordedOnTrack", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Spotify only plays a bit of a track, it cuts after some seconds.. + /// + internal static string tlSpotifyTrackCut { + get { + return ResourceManager.GetString("tlSpotifyTrackCut", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Tracks are detected as an ad.. + /// + internal static string tlTrackDetectedAsAd { + get { + return ResourceManager.GetString("tlTrackDetectedAsAd", resourceCulture); + } + } } } diff --git a/EspionSpotify/english.resx b/EspionSpotify/english.resx index 4e52d23c..6bf5827d 100644 --- a/EspionSpotify/english.resx +++ b/EspionSpotify/english.resx @@ -341,4 +341,48 @@ Stop spying interface + + Use Audacity (a free editor for audio files) to cut the audio part that you want to remove and export it back to the same audio type. Spytify cannot guarantee that an ad or a track will be detected correctly since it's based on a bit of information available in the Spotify process that is not always accurate. + interface + + + Spotify detected that you tried to disable ads using Spytify feature "Disable Ads". Disable this setting and restart both apps. + interface + + + Spytify disables most apps when the recording session starts. Make sure to disable Windows 10 notifcation sound coming from apps in "Notifications and actions settings" and all other apps in the "Volume Mixer". Only Spotify and Spytify should not be muted. + interface + + + Spotify looks for local music files before playing a track. If it finds one with the same meta data that the current song, it will play the local one instead. Cut track means that you started recording this track once and you ended the session too early. Just delete these incomplete tracks in your music directory to solve your issue. + interface + + + Podcast, audio book and any other uncommon track type are detected as an ad. Also, Spotify don't return Spyitfy the right info when you switch between radios, playlists and albums, resulting in a track detected as an ad. Spytify cannot guarantee that a track will be detected correctly since it's based on a bit of information available in the Spotify process that is not always accurate. + interface + + + F.A.Q. + interface + + + Ads and tracks overlap at the beginning/end of recorded tracks. + interface + + + Spotify plays an ad then it pause/play every second. + interface + + + Background noice/sound was recorded on the saved track file. + interface + + + Spotify only plays a bit of a track, it cuts after some seconds. + interface + + + Tracks are detected as an ad. + interface + \ No newline at end of file diff --git a/EspionSpotify/french.resx b/EspionSpotify/french.resx index b6a4f524..dff99f68 100644 --- a/EspionSpotify/french.resx +++ b/EspionSpotify/french.resx @@ -341,4 +341,48 @@ Arrêter l'espionnage interface + + Utilisez Audacity (un éditeur gratuit pour fichiers audio) pour couper les parties audio que vous voulez retirer. Spytify ne peut garantir qu'une annonce ou la prochaine piste audio sera détectée correctement puisqu'il se base sur peu d'informations disponible dans le processus de Spotify qui ne sont pas toujours précises. + interface + + + Spotify a détecté que vous avez essayé de désactiver les annonces en utilisant la fonctionnalité "Désactiver les publicités" de Spytify. Désactiver ce paramètre et redémarrer les deux applications. + interface + + + Spytify désative la plupart des applications quand la session d'enregistrement débute. Soyez certain de désactiver les notifications sonore de Windows 10 provenant des applications dans "Paramètres de notification et d'action" et tout autre application dans le "Mélangeur de volume". Seulement Spotify et Spytify ne doivent pas être à muet. + interface + + + Spotify recherche les fichiers de musique localement avant de jouer une piste audio, si il en trouve une avec les méta données que la piste audio courante, il jouera la piste audio local à la place. Des pistes audio coupées signifient que vous avez, une fois, commencer une session d'enregistrement et l'avez terminé trop tôt. Il faut juste supprimer les pistes audio incomplètes dans votre répertoire de musique pour résoudre le problème. + interface + + + Podcast, livre audio et tout autre piste de type non commun sont détectés en tant que publicité. Également, Spotify ne retourne pas les bonnes informations à Spytify lorsque vous basculez entre radios, listes de lecture ou albums, résultant en une piste audio détectée en tant que publicté. Spytify ne peut garantir qu'une piste audio sera détectée correctement puisqu'il se base sur peu d'informations disponible dans le processus de Spotify qui ne sont pas toujours précises. + interface + + + F.A.Q. + interface + + + Annonces et pistes audio chevauchent au début/fin d'une piste audio enregistrée. + interface + + + Spotify joue une annonce puis il pause/joue à chaque seconde. + interface + + + Du son/bruit d'arrière fond a été enregistré dans le fichier de la piste audio. + interface + + + Spotify joue seulement un bout d'une piste audio, ça coupe après quelques secondes. + interface + + + Pistes audio sont détectées en tant que publicité + interface + \ No newline at end of file diff --git a/EspionSpotify/french1.Designer.cs b/EspionSpotify/french1.Designer.cs index 3d8651e1..de32abfb 100644 --- a/EspionSpotify/french1.Designer.cs +++ b/EspionSpotify/french1.Designer.cs @@ -132,6 +132,15 @@ internal static string cbOptLangFr { } } + /// + /// Looks up a localized string similar to Utilisez Audacity (un éditeur gratuit pour fichiers audio) pour couper les parties audio que vous voulez retirer. Spytify ne peut garantir qu'une annonce ou la prochaine piste audio sera détectée correctement puisqu'il se base sur peu d'informations disponible dans le processus de Spotify qui ne sont pas toujours précises.. + /// + internal static string lblAdAndTrackOverlapOnRecordedTrack { + get { + return ResourceManager.GetString("lblAdAndTrackOverlapOnRecordedTrack", resourceCulture); + } + } + /// /// Looks up a localized string similar to Regrouper les chansons d'un même artiste dans un dossier au nom de l'artiste. /// @@ -159,6 +168,24 @@ internal static string lblAds { } } + /// + /// Looks up a localized string similar to Spotify a détecté que vous avez essayé de désactiver les annonces en utilisant la fonctionnalité "Désactiver les publicités" de Spytify. Désactiver ce paramètre et redémarrer les deux applications.. + /// + internal static string lblAdsPlayAndStop { + get { + return ResourceManager.GetString("lblAdsPlayAndStop", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Spytify désative la plupart des applications quand la session d'enregistrement débute. Soyez certain de désactiver les notifications sonore de Windows 10 provenant des applications dans "Paramètres de notification et d'action" et tout autre application dans le "Mélangeur de volume". Seulement Spotify et Spytify ne doivent pas être à muet.. + /// + internal static string lblBackgroundNoiceRecordedOnTrack { + get { + return ResourceManager.GetString("lblBackgroundNoiceRecordedOnTrack", resourceCulture); + } + } + /// /// Looks up a localized string similar to Qualité audio:. /// @@ -276,6 +303,15 @@ internal static string lblRecordUnknownTrackType { } } + /// + /// Looks up a localized string similar to Spotify recherche les fichiers de musique localement avant de jouer une piste audio, si il en trouve une avec les méta données que la piste audio courante, il jouera la piste audio local à la place. Des pistes audio coupées signifient que vous avez, une fois, commencer une session d'enregistrement et l'avez terminé trop tôt. Il faut juste supprimer les pistes audio incomplètes dans votre répertoire de musique pour résoudre le problème.. + /// + internal static string lblSpotifyTrackCut { + get { + return ResourceManager.GetString("lblSpotifyTrackCut", resourceCulture); + } + } + /// /// Looks up a localized string similar to Espion:. /// @@ -285,6 +321,15 @@ internal static string lblSpy { } } + /// + /// Looks up a localized string similar to Podcast, livre audio et tout autre piste de type non commun sont détectés en tant que publicité. Également, Spotify ne retourne pas les bonnes informations à Spytify lorsque vous basculez entre radios, listes de lecture ou albums, résultant en une piste audio détectée en tant que publicté. Spytify ne peut garantir qu'une piste audio sera détectée correctement puisqu'il se base sur peu d'informations disponible dans le processus de Spotify qui ne sont pas toujours précises.. + /// + internal static string lblTrackDetectedAsAd { + get { + return ResourceManager.GetString("lblTrackDetectedAsAd", resourceCulture); + } + } + /// /// Looks up a localized string similar to Annonce. /// @@ -501,6 +546,15 @@ internal static string tabAdvanced { } } + /// + /// Looks up a localized string similar to F.A.Q.. + /// + internal static string tabFAQ { + get { + return ResourceManager.GetString("tabFAQ", resourceCulture); + } + } + /// /// Looks up a localized string similar to Espion. /// @@ -563,5 +617,50 @@ internal static string tipStopSying { return ResourceManager.GetString("tipStopSying", resourceCulture); } } + + /// + /// Looks up a localized string similar to Annonces et pistes audio chevauchent au début/fin d'une piste audio enregistrée.. + /// + internal static string tlAdAndTrackOverlapOnRecordedTrack { + get { + return ResourceManager.GetString("tlAdAndTrackOverlapOnRecordedTrack", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Spotify joue une annonce puis il pause/joue à chaque seconde.. + /// + internal static string tlAdsPlayAndStop { + get { + return ResourceManager.GetString("tlAdsPlayAndStop", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Du son/bruit d'arrière fond a été enregistré dans le fichier de la piste audio.. + /// + internal static string tlBackgroundNoiceRecordedOnTrack { + get { + return ResourceManager.GetString("tlBackgroundNoiceRecordedOnTrack", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Spotify joue seulement un bout d'une piste audio, ça coupe après quelques secondes.. + /// + internal static string tlSpotifyTrackCut { + get { + return ResourceManager.GetString("tlSpotifyTrackCut", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Pistes audio sont détectées en tant que publicité. + /// + internal static string tlTrackDetectedAsAd { + get { + return ResourceManager.GetString("tlTrackDetectedAsAd", resourceCulture); + } + } } } diff --git a/EspionSpotify/frmEspionSpotify.Designer.cs b/EspionSpotify/frmEspionSpotify.Designer.cs index a6c0d08c..4d499a8c 100644 --- a/EspionSpotify/frmEspionSpotify.Designer.cs +++ b/EspionSpotify/frmEspionSpotify.Designer.cs @@ -42,7 +42,6 @@ private void InitializeComponent() this.lnkClear = new MetroFramework.Controls.MetroLink(); this.lblSoundCard = new MetroFramework.Controls.MetroLabel(); this.lblVolume = new MetroFramework.Controls.MetroLabel(); - this.tbVolumeWin = new EspionSpotify.Controls.MetroTrackBar(); this.iconVolume = new MetroFramework.Controls.MetroPanel(); this.rtbLog = new System.Windows.Forms.RichTextBox(); this.tableLayoutPanel3 = new System.Windows.Forms.TableLayoutPanel(); @@ -57,10 +56,7 @@ private void InitializeComponent() this.lnkPath = new MetroFramework.Controls.MetroLink(); this.txtPath = new MetroFramework.Controls.MetroTextBox(); this.tableLayoutPanel12 = new System.Windows.Forms.TableLayoutPanel(); - this.cbBitRate = new EspionSpotify.Controls.MetroComboBox(); - this.cbLanguage = new EspionSpotify.Controls.MetroComboBox(); this.tableLayoutPanel9 = new System.Windows.Forms.TableLayoutPanel(); - this.tbMinTime = new EspionSpotify.Controls.MetroTrackBar(); this.lblMinTime = new MetroFramework.Controls.MetroLabel(); this.lblFormat = new MetroFramework.Controls.MetroLabel(); this.lblMinLength = new MetroFramework.Controls.MetroLabel(); @@ -96,9 +92,25 @@ private void InitializeComponent() this.lblNumFiles = new MetroFramework.Controls.MetroLabel(); this.lblAddFolders = new MetroFramework.Controls.MetroLabel(); this.lblNumTracks = new MetroFramework.Controls.MetroLabel(); + this.tabFAQ = new MetroFramework.Controls.MetroTabPage(); + this.tableLayoutPanel2 = new System.Windows.Forms.TableLayoutPanel(); + this.lblTrackDetectedAsAd = new System.Windows.Forms.Label(); + this.lblBackgroundNoiceRecordedOnTrack = new System.Windows.Forms.Label(); + this.lblAdAndTrackOverlapOnRecordedTrack = new System.Windows.Forms.Label(); + this.lblAdsPlayAndStop = new System.Windows.Forms.Label(); + this.lblSpotifyTrackCut = new System.Windows.Forms.Label(); this.lnkSpy = new MetroFramework.Controls.MetroLink(); this.tip = new MetroFramework.Components.MetroToolTip(); this.timer1 = new System.Windows.Forms.Timer(this.components); + this.tbVolumeWin = new EspionSpotify.Controls.MetroTrackBar(); + this.cbBitRate = new EspionSpotify.Controls.MetroComboBox(); + this.cbLanguage = new EspionSpotify.Controls.MetroComboBox(); + this.tbMinTime = new EspionSpotify.Controls.MetroTrackBar(); + this.tlSpotifyTrackCut = new EspionSpotify.Controls.MetroTile(); + this.tlAdsPlayAndStop = new EspionSpotify.Controls.MetroTile(); + this.tlAdAndTrackOverlapOnRecordedTrack = new EspionSpotify.Controls.MetroTile(); + this.tlBackgroundNoiceRecordedOnTrack = new EspionSpotify.Controls.MetroTile(); + this.tlTrackDetectedAsAd = new EspionSpotify.Controls.MetroTile(); this.tcMenu.SuspendLayout(); this.tabRecord.SuspendLayout(); this.tableLayoutPanel4.SuspendLayout(); @@ -116,6 +128,8 @@ private void InitializeComponent() this.tableLayoutPanel11.SuspendLayout(); this.tableLayoutPanel14.SuspendLayout(); this.tableLayoutPanel7.SuspendLayout(); + this.tabFAQ.SuspendLayout(); + this.tableLayoutPanel2.SuspendLayout(); this.SuspendLayout(); // // folderBrowserDialog @@ -129,12 +143,13 @@ private void InitializeComponent() this.tcMenu.Controls.Add(this.tabRecord); this.tcMenu.Controls.Add(this.tabSettings); this.tcMenu.Controls.Add(this.tabAdvanced); + this.tcMenu.Controls.Add(this.tabFAQ); this.tcMenu.Dock = System.Windows.Forms.DockStyle.Fill; this.tcMenu.HotTrack = true; this.tcMenu.ItemSize = new System.Drawing.Size(100, 34); this.tcMenu.Location = new System.Drawing.Point(20, 60); this.tcMenu.Name = "tcMenu"; - this.tcMenu.SelectedIndex = 1; + this.tcMenu.SelectedIndex = 3; this.tcMenu.Size = new System.Drawing.Size(760, 380); this.tcMenu.Style = MetroFramework.MetroColorStyle.Green; this.tcMenu.TabIndex = 30; @@ -255,19 +270,6 @@ private void InitializeComponent() this.lblVolume.Text = "000%"; this.lblVolume.TextAlign = System.Drawing.ContentAlignment.MiddleCenter; // - // tbVolumeWin - // - this.tbVolumeWin.BackColor = System.Drawing.Color.Transparent; - this.tbVolumeWin.Cursor = System.Windows.Forms.Cursors.Default; - this.tbVolumeWin.Dock = System.Windows.Forms.DockStyle.Fill; - this.tbVolumeWin.Location = new System.Drawing.Point(83, 3); - this.tbVolumeWin.Name = "tbVolumeWin"; - this.tbVolumeWin.Size = new System.Drawing.Size(138, 23); - this.tbVolumeWin.TabIndex = 11; - this.tbVolumeWin.Value = 0; - this.tbVolumeWin.ValueChanged += new System.EventHandler(this.TbVolumeWin_ValueChanged); - this.tbVolumeWin.MouseHover += new System.EventHandler(this.Focus_Hover); - // // iconVolume // this.iconVolume.BackgroundImage = global::EspionSpotify.Properties.Resources.volmute; @@ -504,33 +506,6 @@ private void InitializeComponent() this.tableLayoutPanel12.Size = new System.Drawing.Size(614, 29); this.tableLayoutPanel12.TabIndex = 37; // - // cbBitRate - // - this.cbBitRate.Dock = System.Windows.Forms.DockStyle.Fill; - this.cbBitRate.FormattingEnabled = true; - this.cbBitRate.ItemHeight = 23; - this.cbBitRate.Location = new System.Drawing.Point(0, 0); - this.cbBitRate.Margin = new System.Windows.Forms.Padding(0); - this.cbBitRate.Name = "cbBitRate"; - this.cbBitRate.Size = new System.Drawing.Size(614, 29); - this.cbBitRate.Style = MetroFramework.MetroColorStyle.Green; - this.cbBitRate.TabIndex = 37; - this.cbBitRate.UseSelectable = true; - this.cbBitRate.SelectedIndexChanged += new System.EventHandler(this.CbBitRate_SelectedIndexChanged); - this.cbBitRate.MouseHover += new System.EventHandler(this.Focus_Hover); - // - // cbLanguage - // - this.cbLanguage.Dock = System.Windows.Forms.DockStyle.Fill; - this.cbLanguage.FormattingEnabled = true; - this.cbLanguage.ItemHeight = 23; - this.cbLanguage.Location = new System.Drawing.Point(133, 163); - this.cbLanguage.Name = "cbLanguage"; - this.cbLanguage.Size = new System.Drawing.Size(614, 29); - this.cbLanguage.TabIndex = 44; - this.cbLanguage.UseSelectable = true; - this.cbLanguage.SelectedIndexChanged += new System.EventHandler(this.CbLanguage_SelectedIndexChanged); - // // tableLayoutPanel9 // this.tableLayoutPanel9.ColumnCount = 2; @@ -550,21 +525,6 @@ private void InitializeComponent() this.tableLayoutPanel9.Size = new System.Drawing.Size(614, 29); this.tableLayoutPanel9.TabIndex = 11; // - // tbMinTime - // - this.tbMinTime.BackColor = System.Drawing.Color.Transparent; - this.tbMinTime.Cursor = System.Windows.Forms.Cursors.Default; - this.tbMinTime.Dock = System.Windows.Forms.DockStyle.Fill; - this.tbMinTime.Location = new System.Drawing.Point(42, 3); - this.tbMinTime.Maximum = 24; - this.tbMinTime.Name = "tbMinTime"; - this.tbMinTime.Size = new System.Drawing.Size(569, 23); - this.tbMinTime.TabIndex = 17; - this.tbMinTime.Text = "metroTrackBar1"; - this.tbMinTime.Value = 6; - this.tbMinTime.ValueChanged += new System.EventHandler(this.TbMinTime_ValueChanged); - this.tbMinTime.MouseHover += new System.EventHandler(this.Focus_Hover); - // // lblMinTime // this.lblMinTime.AutoSize = true; @@ -1071,6 +1031,136 @@ private void InitializeComponent() this.lblNumTracks.Text = "LBL_ADD_NUMBERS_AS_TRACK"; this.lblNumTracks.TextAlign = System.Drawing.ContentAlignment.MiddleLeft; // + // tabFAQ + // + this.tabFAQ.Controls.Add(this.tableLayoutPanel2); + this.tabFAQ.HorizontalScrollbarBarColor = true; + this.tabFAQ.HorizontalScrollbarHighlightOnWheel = false; + this.tabFAQ.HorizontalScrollbarSize = 10; + this.tabFAQ.Location = new System.Drawing.Point(4, 38); + this.tabFAQ.Name = "tabFAQ"; + this.tabFAQ.Padding = new System.Windows.Forms.Padding(3); + this.tabFAQ.Size = new System.Drawing.Size(752, 338); + this.tabFAQ.TabIndex = 3; + this.tabFAQ.Text = "TAB_FAQ"; + this.tabFAQ.VerticalScrollbarBarColor = true; + this.tabFAQ.VerticalScrollbarHighlightOnWheel = false; + this.tabFAQ.VerticalScrollbarSize = 10; + // + // tableLayoutPanel2 + // + this.tableLayoutPanel2.AutoScroll = true; + this.tableLayoutPanel2.BackColor = System.Drawing.Color.White; + this.tableLayoutPanel2.ColumnCount = 1; + this.tableLayoutPanel2.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Percent, 100F)); + this.tableLayoutPanel2.Controls.Add(this.tlSpotifyTrackCut, 0, 0); + this.tableLayoutPanel2.Controls.Add(this.tlAdsPlayAndStop, 0, 2); + this.tableLayoutPanel2.Controls.Add(this.tlAdAndTrackOverlapOnRecordedTrack, 0, 4); + this.tableLayoutPanel2.Controls.Add(this.tlBackgroundNoiceRecordedOnTrack, 0, 6); + this.tableLayoutPanel2.Controls.Add(this.tlTrackDetectedAsAd, 0, 8); + this.tableLayoutPanel2.Controls.Add(this.lblTrackDetectedAsAd, 0, 9); + this.tableLayoutPanel2.Controls.Add(this.lblBackgroundNoiceRecordedOnTrack, 0, 7); + this.tableLayoutPanel2.Controls.Add(this.lblAdAndTrackOverlapOnRecordedTrack, 0, 5); + this.tableLayoutPanel2.Controls.Add(this.lblAdsPlayAndStop, 0, 3); + this.tableLayoutPanel2.Controls.Add(this.lblSpotifyTrackCut, 0, 1); + this.tableLayoutPanel2.Dock = System.Windows.Forms.DockStyle.Fill; + this.tableLayoutPanel2.Location = new System.Drawing.Point(3, 3); + this.tableLayoutPanel2.Name = "tableLayoutPanel2"; + this.tableLayoutPanel2.RowCount = 11; + this.tableLayoutPanel2.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Absolute, 40F)); + this.tableLayoutPanel2.RowStyles.Add(new System.Windows.Forms.RowStyle()); + this.tableLayoutPanel2.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Absolute, 40F)); + this.tableLayoutPanel2.RowStyles.Add(new System.Windows.Forms.RowStyle()); + this.tableLayoutPanel2.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Absolute, 40F)); + this.tableLayoutPanel2.RowStyles.Add(new System.Windows.Forms.RowStyle()); + this.tableLayoutPanel2.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Absolute, 40F)); + this.tableLayoutPanel2.RowStyles.Add(new System.Windows.Forms.RowStyle()); + this.tableLayoutPanel2.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Absolute, 40F)); + this.tableLayoutPanel2.RowStyles.Add(new System.Windows.Forms.RowStyle()); + this.tableLayoutPanel2.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Percent, 100F)); + this.tableLayoutPanel2.Size = new System.Drawing.Size(746, 332); + this.tableLayoutPanel2.TabIndex = 2; + // + // lblTrackDetectedAsAd + // + this.lblTrackDetectedAsAd.AutoSize = true; + this.lblTrackDetectedAsAd.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(30)))), ((int)(((byte)(215)))), ((int)(((byte)(96))))); + this.lblTrackDetectedAsAd.Dock = System.Windows.Forms.DockStyle.Fill; + this.lblTrackDetectedAsAd.Font = new System.Drawing.Font("Segoe UI", 8.25F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.lblTrackDetectedAsAd.ForeColor = System.Drawing.Color.White; + this.lblTrackDetectedAsAd.Location = new System.Drawing.Point(0, 352); + this.lblTrackDetectedAsAd.Margin = new System.Windows.Forms.Padding(0); + this.lblTrackDetectedAsAd.Name = "lblTrackDetectedAsAd"; + this.lblTrackDetectedAsAd.Padding = new System.Windows.Forms.Padding(5, 5, 5, 20); + this.lblTrackDetectedAsAd.Size = new System.Drawing.Size(746, 38); + this.lblTrackDetectedAsAd.TabIndex = 5; + this.lblTrackDetectedAsAd.Text = "TRACK_DETECTED_AS_AN_AD"; + this.lblTrackDetectedAsAd.Visible = false; + // + // lblBackgroundNoiceRecordedOnTrack + // + this.lblBackgroundNoiceRecordedOnTrack.AutoSize = true; + this.lblBackgroundNoiceRecordedOnTrack.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(30)))), ((int)(((byte)(215)))), ((int)(((byte)(96))))); + this.lblBackgroundNoiceRecordedOnTrack.Dock = System.Windows.Forms.DockStyle.Fill; + this.lblBackgroundNoiceRecordedOnTrack.Font = new System.Drawing.Font("Segoe UI", 8.25F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.lblBackgroundNoiceRecordedOnTrack.ForeColor = System.Drawing.Color.White; + this.lblBackgroundNoiceRecordedOnTrack.Location = new System.Drawing.Point(0, 274); + this.lblBackgroundNoiceRecordedOnTrack.Margin = new System.Windows.Forms.Padding(0); + this.lblBackgroundNoiceRecordedOnTrack.Name = "lblBackgroundNoiceRecordedOnTrack"; + this.lblBackgroundNoiceRecordedOnTrack.Padding = new System.Windows.Forms.Padding(5, 5, 5, 20); + this.lblBackgroundNoiceRecordedOnTrack.Size = new System.Drawing.Size(746, 38); + this.lblBackgroundNoiceRecordedOnTrack.TabIndex = 5; + this.lblBackgroundNoiceRecordedOnTrack.Text = "BACKGROUND_NOICE_RECORDED_ON_TRACK"; + this.lblBackgroundNoiceRecordedOnTrack.Visible = false; + // + // lblAdAndTrackOverlapOnRecordedTrack + // + this.lblAdAndTrackOverlapOnRecordedTrack.AutoSize = true; + this.lblAdAndTrackOverlapOnRecordedTrack.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(30)))), ((int)(((byte)(215)))), ((int)(((byte)(96))))); + this.lblAdAndTrackOverlapOnRecordedTrack.Dock = System.Windows.Forms.DockStyle.Fill; + this.lblAdAndTrackOverlapOnRecordedTrack.Font = new System.Drawing.Font("Segoe UI", 8.25F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.lblAdAndTrackOverlapOnRecordedTrack.ForeColor = System.Drawing.Color.White; + this.lblAdAndTrackOverlapOnRecordedTrack.Location = new System.Drawing.Point(0, 196); + this.lblAdAndTrackOverlapOnRecordedTrack.Margin = new System.Windows.Forms.Padding(0); + this.lblAdAndTrackOverlapOnRecordedTrack.Name = "lblAdAndTrackOverlapOnRecordedTrack"; + this.lblAdAndTrackOverlapOnRecordedTrack.Padding = new System.Windows.Forms.Padding(5, 5, 5, 20); + this.lblAdAndTrackOverlapOnRecordedTrack.Size = new System.Drawing.Size(746, 38); + this.lblAdAndTrackOverlapOnRecordedTrack.TabIndex = 5; + this.lblAdAndTrackOverlapOnRecordedTrack.Text = "AD_AND_TRACK_OVERLAP_ON_RECORDED_TRACK"; + this.lblAdAndTrackOverlapOnRecordedTrack.Visible = false; + // + // lblAdsPlayAndStop + // + this.lblAdsPlayAndStop.AutoSize = true; + this.lblAdsPlayAndStop.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(30)))), ((int)(((byte)(215)))), ((int)(((byte)(96))))); + this.lblAdsPlayAndStop.Dock = System.Windows.Forms.DockStyle.Fill; + this.lblAdsPlayAndStop.Font = new System.Drawing.Font("Segoe UI", 8.25F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.lblAdsPlayAndStop.ForeColor = System.Drawing.Color.White; + this.lblAdsPlayAndStop.Location = new System.Drawing.Point(0, 118); + this.lblAdsPlayAndStop.Margin = new System.Windows.Forms.Padding(0); + this.lblAdsPlayAndStop.Name = "lblAdsPlayAndStop"; + this.lblAdsPlayAndStop.Padding = new System.Windows.Forms.Padding(5, 5, 5, 20); + this.lblAdsPlayAndStop.Size = new System.Drawing.Size(746, 38); + this.lblAdsPlayAndStop.TabIndex = 5; + this.lblAdsPlayAndStop.Text = "ADS_PLAY_AND_STOP"; + this.lblAdsPlayAndStop.Visible = false; + // + // lblSpotifyTrackCut + // + this.lblSpotifyTrackCut.AutoSize = true; + this.lblSpotifyTrackCut.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(30)))), ((int)(((byte)(215)))), ((int)(((byte)(96))))); + this.lblSpotifyTrackCut.Dock = System.Windows.Forms.DockStyle.Fill; + this.lblSpotifyTrackCut.Font = new System.Drawing.Font("Segoe UI", 8.25F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.lblSpotifyTrackCut.ForeColor = System.Drawing.Color.White; + this.lblSpotifyTrackCut.Location = new System.Drawing.Point(0, 40); + this.lblSpotifyTrackCut.Margin = new System.Windows.Forms.Padding(0); + this.lblSpotifyTrackCut.Name = "lblSpotifyTrackCut"; + this.lblSpotifyTrackCut.Padding = new System.Windows.Forms.Padding(5, 5, 5, 20); + this.lblSpotifyTrackCut.Size = new System.Drawing.Size(746, 38); + this.lblSpotifyTrackCut.TabIndex = 5; + this.lblSpotifyTrackCut.Text = "TRACKS_ARE_CUT_ON_SPOTIFY"; + this.lblSpotifyTrackCut.Visible = false; + // // lnkSpy // this.lnkSpy.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right))); @@ -1099,6 +1189,168 @@ private void InitializeComponent() this.timer1.Interval = 1000; this.timer1.Tick += new System.EventHandler(this.Timer1_Tick); // + // tbVolumeWin + // + this.tbVolumeWin.BackColor = System.Drawing.Color.Transparent; + this.tbVolumeWin.Cursor = System.Windows.Forms.Cursors.Default; + this.tbVolumeWin.Dock = System.Windows.Forms.DockStyle.Fill; + this.tbVolumeWin.Location = new System.Drawing.Point(83, 3); + this.tbVolumeWin.Name = "tbVolumeWin"; + this.tbVolumeWin.Size = new System.Drawing.Size(138, 23); + this.tbVolumeWin.TabIndex = 11; + this.tbVolumeWin.Value = 0; + this.tbVolumeWin.ValueChanged += new System.EventHandler(this.TbVolumeWin_ValueChanged); + this.tbVolumeWin.MouseHover += new System.EventHandler(this.Focus_Hover); + // + // cbBitRate + // + this.cbBitRate.Dock = System.Windows.Forms.DockStyle.Fill; + this.cbBitRate.FormattingEnabled = true; + this.cbBitRate.ItemHeight = 23; + this.cbBitRate.Location = new System.Drawing.Point(0, 0); + this.cbBitRate.Margin = new System.Windows.Forms.Padding(0); + this.cbBitRate.Name = "cbBitRate"; + this.cbBitRate.Size = new System.Drawing.Size(614, 29); + this.cbBitRate.Style = MetroFramework.MetroColorStyle.Green; + this.cbBitRate.TabIndex = 37; + this.cbBitRate.UseSelectable = true; + this.cbBitRate.SelectedIndexChanged += new System.EventHandler(this.CbBitRate_SelectedIndexChanged); + this.cbBitRate.MouseHover += new System.EventHandler(this.Focus_Hover); + // + // cbLanguage + // + this.cbLanguage.Dock = System.Windows.Forms.DockStyle.Fill; + this.cbLanguage.FormattingEnabled = true; + this.cbLanguage.ItemHeight = 23; + this.cbLanguage.Location = new System.Drawing.Point(133, 163); + this.cbLanguage.Name = "cbLanguage"; + this.cbLanguage.Size = new System.Drawing.Size(614, 29); + this.cbLanguage.TabIndex = 44; + this.cbLanguage.UseSelectable = true; + this.cbLanguage.SelectedIndexChanged += new System.EventHandler(this.CbLanguage_SelectedIndexChanged); + // + // tbMinTime + // + this.tbMinTime.BackColor = System.Drawing.Color.Transparent; + this.tbMinTime.Cursor = System.Windows.Forms.Cursors.Default; + this.tbMinTime.Dock = System.Windows.Forms.DockStyle.Fill; + this.tbMinTime.Location = new System.Drawing.Point(42, 3); + this.tbMinTime.Maximum = 24; + this.tbMinTime.Name = "tbMinTime"; + this.tbMinTime.Size = new System.Drawing.Size(569, 23); + this.tbMinTime.TabIndex = 17; + this.tbMinTime.Text = "metroTrackBar1"; + this.tbMinTime.Value = 6; + this.tbMinTime.ValueChanged += new System.EventHandler(this.TbMinTime_ValueChanged); + this.tbMinTime.MouseHover += new System.EventHandler(this.Focus_Hover); + // + // tlSpotifyTrackCut + // + this.tlSpotifyTrackCut.ActiveControl = null; + this.tlSpotifyTrackCut.BackColor = System.Drawing.Color.White; + this.tlSpotifyTrackCut.Dock = System.Windows.Forms.DockStyle.Fill; + this.tlSpotifyTrackCut.Location = new System.Drawing.Point(0, 2); + this.tlSpotifyTrackCut.Margin = new System.Windows.Forms.Padding(0, 2, 0, 0); + this.tlSpotifyTrackCut.Name = "tlSpotifyTrackCut"; + this.tlSpotifyTrackCut.PaintTileCount = false; + this.tlSpotifyTrackCut.Size = new System.Drawing.Size(746, 38); + this.tlSpotifyTrackCut.Style = MetroFramework.MetroColorStyle.Green; + this.tlSpotifyTrackCut.TabIndex = 0; + this.tlSpotifyTrackCut.Text = "TRACKS_ARE_CUT_ON_SPOTIFY"; + this.tlSpotifyTrackCut.TileTextFontSize = MetroFramework.MetroTileTextSize.Small; + this.tlSpotifyTrackCut.TileTextFontWeight = MetroFramework.MetroTileTextWeight.Regular; + this.tlSpotifyTrackCut.UseCustomBackColor = true; + this.tlSpotifyTrackCut.UseCustomForeColor = true; + this.tlSpotifyTrackCut.UseSelectable = true; + this.tlSpotifyTrackCut.Click += new System.EventHandler(this.TlSpotifyTrackCut_Click); + this.tlSpotifyTrackCut.Leave += new System.EventHandler(this.TlSpotifyTrackCut_Leave); + // + // tlAdsPlayAndStop + // + this.tlAdsPlayAndStop.ActiveControl = null; + this.tlAdsPlayAndStop.BackColor = System.Drawing.Color.White; + this.tlAdsPlayAndStop.Dock = System.Windows.Forms.DockStyle.Fill; + this.tlAdsPlayAndStop.Location = new System.Drawing.Point(0, 80); + this.tlAdsPlayAndStop.Margin = new System.Windows.Forms.Padding(0, 2, 0, 0); + this.tlAdsPlayAndStop.Name = "tlAdsPlayAndStop"; + this.tlAdsPlayAndStop.PaintTileCount = false; + this.tlAdsPlayAndStop.Size = new System.Drawing.Size(746, 38); + this.tlAdsPlayAndStop.Style = MetroFramework.MetroColorStyle.Green; + this.tlAdsPlayAndStop.TabIndex = 1; + this.tlAdsPlayAndStop.Text = "ADS_PLAY_AND_STOP"; + this.tlAdsPlayAndStop.TileTextFontSize = MetroFramework.MetroTileTextSize.Small; + this.tlAdsPlayAndStop.TileTextFontWeight = MetroFramework.MetroTileTextWeight.Regular; + this.tlAdsPlayAndStop.UseCustomBackColor = true; + this.tlAdsPlayAndStop.UseCustomForeColor = true; + this.tlAdsPlayAndStop.UseSelectable = true; + this.tlAdsPlayAndStop.Click += new System.EventHandler(this.TlAdsPlayAndStop_Click); + this.tlAdsPlayAndStop.Leave += new System.EventHandler(this.TlAdsPlayAndStop_Leave); + // + // tlAdAndTrackOverlapOnRecordedTrack + // + this.tlAdAndTrackOverlapOnRecordedTrack.ActiveControl = null; + this.tlAdAndTrackOverlapOnRecordedTrack.BackColor = System.Drawing.Color.White; + this.tlAdAndTrackOverlapOnRecordedTrack.Dock = System.Windows.Forms.DockStyle.Fill; + this.tlAdAndTrackOverlapOnRecordedTrack.Location = new System.Drawing.Point(0, 158); + this.tlAdAndTrackOverlapOnRecordedTrack.Margin = new System.Windows.Forms.Padding(0, 2, 0, 0); + this.tlAdAndTrackOverlapOnRecordedTrack.Name = "tlAdAndTrackOverlapOnRecordedTrack"; + this.tlAdAndTrackOverlapOnRecordedTrack.PaintTileCount = false; + this.tlAdAndTrackOverlapOnRecordedTrack.Size = new System.Drawing.Size(746, 38); + this.tlAdAndTrackOverlapOnRecordedTrack.Style = MetroFramework.MetroColorStyle.Green; + this.tlAdAndTrackOverlapOnRecordedTrack.TabIndex = 2; + this.tlAdAndTrackOverlapOnRecordedTrack.Tag = "test test test"; + this.tlAdAndTrackOverlapOnRecordedTrack.Text = "AD_AND_TRACK_OVERLAP_ON_RECORDED_TRACK"; + this.tlAdAndTrackOverlapOnRecordedTrack.TileTextFontSize = MetroFramework.MetroTileTextSize.Small; + this.tlAdAndTrackOverlapOnRecordedTrack.TileTextFontWeight = MetroFramework.MetroTileTextWeight.Regular; + this.tlAdAndTrackOverlapOnRecordedTrack.UseCustomBackColor = true; + this.tlAdAndTrackOverlapOnRecordedTrack.UseCustomForeColor = true; + this.tlAdAndTrackOverlapOnRecordedTrack.UseSelectable = true; + this.tlAdAndTrackOverlapOnRecordedTrack.Click += new System.EventHandler(this.TlAdAndTrackOverlapOnRecordedTrack_Click); + this.tlAdAndTrackOverlapOnRecordedTrack.Leave += new System.EventHandler(this.TlAdAndTrackOverlapOnRecordedTrack_Leave); + // + // tlBackgroundNoiceRecordedOnTrack + // + this.tlBackgroundNoiceRecordedOnTrack.ActiveControl = null; + this.tlBackgroundNoiceRecordedOnTrack.BackColor = System.Drawing.Color.White; + this.tlBackgroundNoiceRecordedOnTrack.Dock = System.Windows.Forms.DockStyle.Fill; + this.tlBackgroundNoiceRecordedOnTrack.Location = new System.Drawing.Point(0, 236); + this.tlBackgroundNoiceRecordedOnTrack.Margin = new System.Windows.Forms.Padding(0, 2, 0, 0); + this.tlBackgroundNoiceRecordedOnTrack.Name = "tlBackgroundNoiceRecordedOnTrack"; + this.tlBackgroundNoiceRecordedOnTrack.PaintTileCount = false; + this.tlBackgroundNoiceRecordedOnTrack.Size = new System.Drawing.Size(746, 38); + this.tlBackgroundNoiceRecordedOnTrack.Style = MetroFramework.MetroColorStyle.Green; + this.tlBackgroundNoiceRecordedOnTrack.TabIndex = 3; + this.tlBackgroundNoiceRecordedOnTrack.Text = "BACKGROUND_NOICE_RECORDED_ON_TRACK"; + this.tlBackgroundNoiceRecordedOnTrack.TileTextFontSize = MetroFramework.MetroTileTextSize.Small; + this.tlBackgroundNoiceRecordedOnTrack.TileTextFontWeight = MetroFramework.MetroTileTextWeight.Regular; + this.tlBackgroundNoiceRecordedOnTrack.UseCustomBackColor = true; + this.tlBackgroundNoiceRecordedOnTrack.UseCustomForeColor = true; + this.tlBackgroundNoiceRecordedOnTrack.UseSelectable = true; + this.tlBackgroundNoiceRecordedOnTrack.Click += new System.EventHandler(this.TlBackgroundNoiceRecordedOnTrack_Click); + this.tlBackgroundNoiceRecordedOnTrack.Leave += new System.EventHandler(this.TlBackgroundNoiceRecordedOnTrack_Leave); + // + // tlTrackDetectedAsAd + // + this.tlTrackDetectedAsAd.ActiveControl = null; + this.tlTrackDetectedAsAd.BackColor = System.Drawing.Color.White; + this.tlTrackDetectedAsAd.CausesValidation = false; + this.tlTrackDetectedAsAd.Dock = System.Windows.Forms.DockStyle.Fill; + this.tlTrackDetectedAsAd.Location = new System.Drawing.Point(0, 314); + this.tlTrackDetectedAsAd.Margin = new System.Windows.Forms.Padding(0, 2, 0, 0); + this.tlTrackDetectedAsAd.Name = "tlTrackDetectedAsAd"; + this.tlTrackDetectedAsAd.PaintTileCount = false; + this.tlTrackDetectedAsAd.Size = new System.Drawing.Size(746, 38); + this.tlTrackDetectedAsAd.Style = MetroFramework.MetroColorStyle.Green; + this.tlTrackDetectedAsAd.TabIndex = 4; + this.tlTrackDetectedAsAd.Text = "TRACK_DETECTED_AS_AN_AD"; + this.tlTrackDetectedAsAd.TileTextFontSize = MetroFramework.MetroTileTextSize.Small; + this.tlTrackDetectedAsAd.TileTextFontWeight = MetroFramework.MetroTileTextWeight.Regular; + this.tlTrackDetectedAsAd.UseCustomBackColor = true; + this.tlTrackDetectedAsAd.UseCustomForeColor = true; + this.tlTrackDetectedAsAd.UseSelectable = true; + this.tlTrackDetectedAsAd.Click += new System.EventHandler(this.TlTrackDetectedAsAd_Click); + this.tlTrackDetectedAsAd.Leave += new System.EventHandler(this.TlTrackDetectedAsAd_Leave); + // // FrmEspionSpotify // this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F); @@ -1144,6 +1396,9 @@ private void InitializeComponent() this.tableLayoutPanel14.PerformLayout(); this.tableLayoutPanel7.ResumeLayout(false); this.tableLayoutPanel7.PerformLayout(); + this.tabFAQ.ResumeLayout(false); + this.tableLayoutPanel2.ResumeLayout(false); + this.tableLayoutPanel2.PerformLayout(); this.ResumeLayout(false); } @@ -1216,6 +1471,18 @@ private void InitializeComponent() private System.Windows.Forms.TableLayoutPanel tableLayoutPanel14; private MetroLabel lblMuteAds; private MetroToggle tgMuteAds; + private MetroTabPage tabFAQ; + private System.Windows.Forms.TableLayoutPanel tableLayoutPanel2; + private EspionSpotify.Controls.MetroTile tlAdsPlayAndStop; + private EspionSpotify.Controls.MetroTile tlAdAndTrackOverlapOnRecordedTrack; + private EspionSpotify.Controls.MetroTile tlBackgroundNoiceRecordedOnTrack; + private Controls.MetroTile tlSpotifyTrackCut; + private Controls.MetroTile tlTrackDetectedAsAd; + private System.Windows.Forms.Label lblTrackDetectedAsAd; + private System.Windows.Forms.Label lblBackgroundNoiceRecordedOnTrack; + private System.Windows.Forms.Label lblAdAndTrackOverlapOnRecordedTrack; + private System.Windows.Forms.Label lblAdsPlayAndStop; + private System.Windows.Forms.Label lblSpotifyTrackCut; } } diff --git a/EspionSpotify/frmEspionSpotify.cs b/EspionSpotify/frmEspionSpotify.cs index b70f14a1..007bc18d 100644 --- a/EspionSpotify/frmEspionSpotify.cs +++ b/EspionSpotify/frmEspionSpotify.cs @@ -13,6 +13,8 @@ using EspionSpotify.Models; using EspionSpotify.Enums; using EspionSpotify.AudioSessions; +using System.Reflection; +using System.Threading.Tasks; namespace EspionSpotify { @@ -21,6 +23,7 @@ public sealed partial class FrmEspionSpotify : MetroForm private readonly IMainAudioSession _audioSession; private Watcher _watcher; private UserSettings _userSettings; + private Analytics _analytics; public static ResourceManager Rm; public static FrmEspionSpotify Instance; @@ -42,6 +45,14 @@ public FrmEspionSpotify() Settings.Default.Save(); } + if (Settings.Default.AnalyticsCID.Equals(string.Empty)) + { + Settings.Default.AnalyticsCID = Analytics.GenerateCID(); + Settings.Default.Save(); + } + _analytics = new Analytics(Settings.Default.AnalyticsCID, Assembly.GetExecutingAssembly().GetName().Version.ToString()); + Task.Run(async () => await _analytics.LogAction("launch")); + var indexLanguage = Settings.Default.Language; var indexBitRate = Settings.Default.Bitrate; @@ -109,6 +120,7 @@ private void SetLanguage(LanguageType languageType) tabRecord.Text = Rm.GetString($"tabRecord"); tabSettings.Text = Rm.GetString($"tabSettings"); tabAdvanced.Text = Rm.GetString($"tabAdvanced"); + tabFAQ.Text = Rm.GetString($"tabFAQ"); lblPath.Text = Rm.GetString($"lblPath"); lblBitRate.Text = Rm.GetString($"lblBitRate"); @@ -128,6 +140,17 @@ private void SetLanguage(LanguageType languageType) lblRecorder.Text = Rm.GetString($"lblRecorder"); lblRecordUnknownTrackType.Text = Rm.GetString($"lblRecordUnknownTrackType"); + tlSpotifyTrackCut.Text = Rm.GetString($"tlSpotifyTrackCut"); + lblSpotifyTrackCut.Text = Rm.GetString($"lblSpotifyTrackCut"); + tlAdsPlayAndStop.Text = Rm.GetString($"tlAdsPlayAndStop"); + lblAdsPlayAndStop.Text = Rm.GetString($"lblAdsPlayAndStop"); + tlAdAndTrackOverlapOnRecordedTrack.Text = Rm.GetString($"tlAdAndTrackOverlapOnRecordedTrack"); + lblAdAndTrackOverlapOnRecordedTrack.Text = Rm.GetString($"lblAdAndTrackOverlapOnRecordedTrack"); + tlBackgroundNoiceRecordedOnTrack.Text = Rm.GetString($"tlBackgroundNoiceRecordedOnTrack"); + lblBackgroundNoiceRecordedOnTrack.Text = Rm.GetString($"lblBackgroundNoiceRecordedOnTrack"); + tlTrackDetectedAsAd.Text = Rm.GetString($"tlTrackDetectedAsAd"); + lblTrackDetectedAsAd.Text = Rm.GetString($"lblTrackDetectedAsAd"); + tip.SetToolTip(lnkClear, Rm.GetString($"tipClear")); tip.SetToolTip(lnkSpy, Rm.GetString($"tipStartSpying")); tip.SetToolTip(lnkDirectory, Rm.GetString($"tipDirectory")); @@ -183,14 +206,17 @@ public void UpdateIconSpotify(bool isSpotifyPlaying, bool isRecording = false) if (isRecording) { iconSpotify.BackgroundImage = Resources.record; + Task.Run(async () => await _analytics.LogAction("record")); } else if (isSpotifyPlaying) { iconSpotify.BackgroundImage = Resources.play; + Task.Run(async () => await _analytics.LogAction("play")); } else { iconSpotify.BackgroundImage = Resources.pause; + Task.Run(async () => await _analytics.LogAction("pause")); } } @@ -204,7 +230,7 @@ public void UpdatePlayingTitle(string text) lblPlayingTitle.Text = text; } - + public void WriteIntoConsole(string text) { if (rtbLog.InvokeRequired) @@ -290,17 +316,20 @@ private void LnkSpy_Click(object sender, EventArgs e) tcMenu.SelectedIndex = 0; StartRecording(); lnkSpy.Image = Resources.off; + Task.Run(async () => await _analytics.LogAction("recording-session?status=started")); } else { StopRecording(); lnkSpy.Image = Resources.on; + Task.Run(async () => await _analytics.LogAction("recording-session?status=ended")); } } private void LnkClear_Click(object sender, EventArgs e) { rtbLog.Text = ""; + Task.Run(async () => await _analytics.LogAction("clear-console")); } private void Timer1_Tick(object sender, EventArgs e) @@ -317,6 +346,7 @@ private void RbFormat_CheckedChanged(object sender, EventArgs e) _userSettings.MediaFormat = rb != null && rb.Tag.ToString() == "mp3" ? MediaFormat.Mp3 : MediaFormat.Wav; Settings.Default.MediaFormat = (rbMp3.Checked ? 0 : 1); Settings.Default.Save(); + Task.Run(async () => await _analytics.LogAction($"media-format?type={rb.Tag}")); } private void TgRecordUnkownTrackType_CheckedChanged(object sender, EventArgs e) @@ -329,6 +359,8 @@ private void TgRecordUnkownTrackType_CheckedChanged(object sender, EventArgs e) { tgMuteAds.Checked = false; } + + Task.Run(async () => await _analytics.LogAction($"record-unknown-type?enabled={tgRecordUnkownTrackType.Checked}")); } private void TgDisableAds_CheckedChanged(object sender, EventArgs e) @@ -345,6 +377,7 @@ private void TgDisableAds_Click(object sender, EventArgs e) { tgDisableAds.Checked = !tgDisableAds.Checked; } + Task.Run(async () => await _analytics.LogAction($"disable-ads?enabled={tgDisableAds.Checked}")); } private void TgMuteAds_CheckedChanged(object sender, EventArgs e) @@ -352,6 +385,7 @@ private void TgMuteAds_CheckedChanged(object sender, EventArgs e) _userSettings.MuteAdsEnabled = tgMuteAds.Checked; Settings.Default.MuteAdsEnabled = tgMuteAds.Checked; Settings.Default.Save(); + Task.Run(async () => await _analytics.LogAction($"mute-ads?enabled={tgMuteAds.Checked}")); } private void TgEndingSongDelay_CheckedChanged(object sender, EventArgs e) @@ -359,6 +393,7 @@ private void TgEndingSongDelay_CheckedChanged(object sender, EventArgs e) _userSettings.EndingTrackDelayEnabled = tgEndingSongDelay.Checked; Settings.Default.EndingSongDelayEnabled = tgEndingSongDelay.Checked; Settings.Default.Save(); + Task.Run(async () => await _analytics.LogAction($"delay-on-ending-song?enabled={tgEndingSongDelay.Checked}")); } private void TgAddFolders_CheckedChanged(object sender, EventArgs e) @@ -366,6 +401,7 @@ private void TgAddFolders_CheckedChanged(object sender, EventArgs e) _userSettings.GroupByFoldersEnabled = tgAddFolders.Checked; Settings.Default.GroupByFoldersEnabled = tgAddFolders.Checked; Settings.Default.Save(); + Task.Run(async () => await _analytics.LogAction($"group-by-folders?enabled={tgAddFolders.Checked}")); } private void TgAddSeparators_CheckedChanged(object sender, EventArgs e) @@ -373,6 +409,7 @@ private void TgAddSeparators_CheckedChanged(object sender, EventArgs e) _userSettings.TrackTitleSeparator = tgAddSeparators.Checked ? "_" : " "; Settings.Default.TrackTitleSeparatorEnabled = tgAddSeparators.Checked; Settings.Default.Save(); + Task.Run(async () => await _analytics.LogAction($"track-title-separator?enabled={tgAddSeparators.Checked}")); } private void TgNumFiles_CheckedChanged(object sender, EventArgs e) @@ -380,6 +417,7 @@ private void TgNumFiles_CheckedChanged(object sender, EventArgs e) _userSettings.OrderNumberInfrontOfFileEnabled = tgNumFiles.Checked; Settings.Default.OrderNumberInfrontOfFileEnabled = tgNumFiles.Checked; Settings.Default.Save(); + Task.Run(async () => await _analytics.LogAction($"order-number-in-front-of-files?enabled={tgNumFiles.Checked}")); } private void TgNumTracks_CheckedChanged(object sender, EventArgs e) @@ -387,6 +425,7 @@ private void TgNumTracks_CheckedChanged(object sender, EventArgs e) _userSettings.OrderNumberInMediaTagEnabled = tgNumTracks.Checked; Settings.Default.OrderNumberInMediaTagEnabled = tgNumTracks.Checked; Settings.Default.Save(); + Task.Run(async () => await _analytics.LogAction($"order-number-in-media-tags?enabled={tgNumTracks.Checked}")); } private void FrmEspionSpotify_FormClosing(object sender, FormClosingEventArgs e) @@ -400,6 +439,7 @@ private void FrmEspionSpotify_FormClosing(object sender, FormClosingEventArgs e) MessageBoxIcon.Question) != DialogResult.Yes) return; Watcher.Running = false; Thread.Sleep(1000); + Task.Run(async () => await _analytics.LogAction("exit")); Close(); } @@ -420,6 +460,7 @@ private void TxtPath_TextChanged(object sender, EventArgs e) _userSettings.OutputPath = txtPath.Text; Settings.Default.Directory = txtPath.Text; Settings.Default.Save(); + Task.Run(async () => await _analytics.LogAction("set-output-folder")); } private void CbBitRate_SelectedIndexChanged(object sender, EventArgs e) @@ -427,6 +468,7 @@ private void CbBitRate_SelectedIndexChanged(object sender, EventArgs e) _userSettings.Bitrate = ((KeyValuePair)cbBitRate.SelectedItem).Key; Settings.Default.Bitrate = cbBitRate.SelectedIndex; Settings.Default.Save(); + Task.Run(async () => await _analytics.LogAction($"bitrate?selected={cbBitRate.SelectedValue}")); } private void LnkNumMinus_Click(object sender, EventArgs e) @@ -459,6 +501,7 @@ private void LnkDirectory_Click(object sender, EventArgs e) { System.Diagnostics.Process.Start("explorer.exe", txtPath.Text); } + Task.Run(async () => await _analytics.LogAction("open-output-folder")); } private void TbMinTime_ValueChanged(object sender, EventArgs e) @@ -469,6 +512,7 @@ private void TbMinTime_ValueChanged(object sender, EventArgs e) lblMinTime.Text = min + @":" + sec.ToString("00"); Settings.Default.MinimumRecordedLengthSeconds = tbMinTime.Value * 5; Settings.Default.Save(); + Task.Run(async () => await _analytics.LogAction($"minimum-media-time?value={tbMinTime.Value}")); } private void TbVolumeWin_ValueChanged(object sender, EventArgs e) @@ -493,6 +537,8 @@ private void TbVolumeWin_ValueChanged(object sender, EventArgs e) { if (iconVolume.BackgroundImage != Resources.volup) iconVolume.BackgroundImage = Resources.volup; } + + Task.Run(async () => await _analytics.LogAction("volume")); } private void Focus_Hover(object sender, EventArgs e) @@ -508,12 +554,14 @@ private void CbLanguage_SelectedIndexChanged(object sender, EventArgs e) var language = (LanguageType)cbLanguage.SelectedIndex; SetLanguage(language); + Task.Run(async () => await _analytics.LogAction($"language?selected={cbLanguage.SelectedValue}")); } private void TcMenu_SelectedIndexChanged(object sender, EventArgs e) { Settings.Default.TabNo = tcMenu.SelectedIndex; Settings.Default.Save(); + Task.Run(async () => await _analytics.LogAction($"tab?selected={tcMenu.SelectedTab}")); } private static bool ManageSpotifyAds(bool isToggled) @@ -522,5 +570,72 @@ private static bool ManageSpotifyAds(bool isToggled) ? ManageHosts.DisableAds(ManageHosts.HostsSystemPath) : ManageHosts.EnableAds(ManageHosts.HostsSystemPath); } + + private void ShowHideLabel(Label label) + { + if (label.Visible) + { + label.Hide(); + } + else + { + label.Show(); + } + } + + private void TlTrackDetectedAsAd_Leave(object sender, EventArgs e) + { + lblTrackDetectedAsAd.Hide(); + } + + private void TlTrackDetectedAsAd_Click(object sender, EventArgs e) + { + ShowHideLabel(lblTrackDetectedAsAd); + Task.Run(async () => await _analytics.LogAction($"faq?selected=track-detected-as-ad")); + } + + private void TlBackgroundNoiceRecordedOnTrack_Leave(object sender, EventArgs e) + { + lblBackgroundNoiceRecordedOnTrack.Hide(); + } + + private void TlBackgroundNoiceRecordedOnTrack_Click(object sender, EventArgs e) + { + ShowHideLabel(lblBackgroundNoiceRecordedOnTrack); + Task.Run(async () => await _analytics.LogAction($"faq?selected=background-noice-recorded-on-track")); + } + + private void TlAdAndTrackOverlapOnRecordedTrack_Leave(object sender, EventArgs e) + { + lblAdAndTrackOverlapOnRecordedTrack.Hide(); + } + + private void TlAdAndTrackOverlapOnRecordedTrack_Click(object sender, EventArgs e) + { + ShowHideLabel(lblAdAndTrackOverlapOnRecordedTrack); + Task.Run(async () => await _analytics.LogAction($"faq?selected=ad-and-track-overlap")); + } + + private void TlAdsPlayAndStop_Leave(object sender, EventArgs e) + { + lblAdsPlayAndStop.Hide(); + } + + private void TlAdsPlayAndStop_Click(object sender, EventArgs e) + { + ShowHideLabel(lblAdsPlayAndStop); + Task.Run(async () => await _analytics.LogAction($"faq?selected=ads-play-and-stop")); + } + + private void TlSpotifyTrackCut_Leave(object sender, EventArgs e) + { + lblSpotifyTrackCut.Hide(); + } + + private void TlSpotifyTrackCut_Click(object sender, EventArgs e) + { + ShowHideLabel(lblSpotifyTrackCut); + Task.Run(async () => await _analytics.LogAction($"faq?selected=spotify-track-cut")); + } } }