Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Removing VS2010 solution upgrade folders

  • Loading branch information...
commit e8336aba865861eab6966cb344371761ff9f8bde 1 parent 1c1f956
@davenicoll davenicoll authored
Showing with 0 additions and 4,980 deletions.
  1. +0 −77 Backup/ClassRegistry.cs
  2. +0 −60 Backup/Config/Config.Boxcar.cs
  3. +0 −67 Backup/Config/Config.Growl.cs
  4. +0 −42 Backup/Config/Config.Notifications.cs
  5. +0 −43 Backup/Config/Config.Prowl.cs
  6. +0 −81 Backup/Config/Config.Twitter.cs
  7. +0 −113 Backup/Config/Config.cs
  8. +0 −50 Backup/Notifications/Boxcar/Boxcar.cs
  9. +0 −74 Backup/Notifications/Growl/Growl.cs
  10. +0 −94 Backup/Notifications/Prowl/Prowl.cs
  11. +0 −53 Backup/Notifications/Twitter/Twitter.cs
  12. +0 −364 Backup/Notifications/Twitter/oAuth.cs
  13. +0 −275 Backup/Notifications/Twitter/oAuthTwitter.cs
  14. +0 −299 Backup/Program.cs
  15. +0 −38 Backup/Properties/AssemblyInfo.cs
  16. +0 −114 Backup/Properties/Resources.Designer.cs
  17. +0 −142 Backup/Properties/Resources.resx
  18. +0 −308 Backup/Properties/Settings.Designer.cs
  19. +0 −78 Backup/Properties/Settings.settings
  20. BIN  Backup/Resources/un_icon.ico
  21. BIN  Backup/Resources/un_icon_systray.ico
  22. BIN  Backup/Resources/utorrent_icon.png
  23. BIN  Backup/Resources/utorrent_icon_added.png
  24. BIN  Backup/Resources/utorrent_icon_complete.png
  25. BIN  Backup/Resources/utorrent_icon_error.png
  26. +0 −28 Backup/Settings.cs
  27. +0 −825 Backup/SettingsForm.Designer.cs
  28. +0 −195 Backup/SettingsForm.cs
  29. +0 −120 Backup/SettingsForm.resx
  30. +0 −61 Backup/Utilities.cs
  31. +0 −210 Backup/WebUIAPI/TorrentFile.cs
  32. +0 −34 Backup/WebUIAPI/WebUIAPI.Actions.cs
  33. +0 −75 Backup/WebUIAPI/WebUIAPI.Codes.cs
  34. +0 −42 Backup/WebUIAPI/WebUIAPI.Events.cs
  35. +0 −274 Backup/WebUIAPI/WebUIAPI.cs
  36. +0 −91 Backup/app.config
  37. +0 −20 Backup/uTorrent Notifier - VS2008.sln
  38. +0 −194 Backup/uTorrent Notifier.csproj
  39. +0 −207 _UpgradeReport_Files/UpgradeReport.css
  40. +0 −232 _UpgradeReport_Files/UpgradeReport.xslt
  41. BIN  _UpgradeReport_Files/UpgradeReport_Minus.gif
  42. BIN  _UpgradeReport_Files/UpgradeReport_Plus.gif
View
77 Backup/ClassRegistry.cs
@@ -1,77 +0,0 @@
-using System;
-using System.Collections.Generic;
-using System.Linq;
-using System.Text;
-
-namespace uTorrentNotifier
-{
- public class ClassRegistry : IDisposable
- {
- private WebUIAPI _webuiapi;
- private Config _config;
- private Prowl _prowl;
- private Growl _growl;
- private Twitter _twitter;
- private Boxcar _boxcar;
-
- public ClassRegistry()
- {
- this._config = new Config();
- this._webuiapi = new WebUIAPI(this._config);
- this._prowl = new Prowl(this._config.Prowl);
- this._growl = new Growl(this._config.Growl);
- this._twitter = new Twitter(this._config.Twitter);
- this._boxcar = new Boxcar(this._config.Boxcar);
- }
-
- public Config Config
- {
- get { return this._config; }
- set { this._config = value; }
- }
- public WebUIAPI uTorrent
- {
- get { return this._webuiapi; }
- }
-
- public Prowl Prowl
- {
- get { return this._prowl; }
- }
-
- public Growl Growl
- {
- get { return this._growl; }
- }
-
- public Twitter Twitter
- {
- get { return this._twitter; }
- }
-
- public Boxcar Boxcar
- {
- get { return this._boxcar; }
- }
-
- public static Version Version
- {
- get { return System.Reflection.Assembly.GetExecutingAssembly().GetName().Version; }
- }
-
- protected virtual void Dispose(bool disposing)
- {
- if (disposing)
- {
- this._webuiapi.Dispose();
- }
- }
-
- public void Dispose()
- {
- Dispose(true);
- GC.SuppressFinalize(this);
- }
-
- }
-}
View
60 Backup/Config/Config.Boxcar.cs
@@ -1,60 +0,0 @@
-using System;
-using System.Collections.Generic;
-using System.Linq;
-using System.Text;
-using System.Security.Cryptography;
-
-namespace uTorrentNotifier
-{
- public partial class Config
- {
- public class BoxcarConfig
- {
- private bool _Enable = false;
- private string _APIKey = String.Empty;
- private string _Email = String.Empty;
-
- public BoxcarConfig()
- {
- this._Email = Properties.Settings.Default.BoxcarEmail;
- this._APIKey = Properties.Settings.Default.BoxcarAPIKey;
- this._Enable = Properties.Settings.Default.BoxcarEnable;
- }
-
- public bool Enable
- {
- get { return this._Enable; }
- set
- {
- Properties.Settings.Default.BoxcarEnable = value;
- this._Enable = value;
- }
- }
-
- public string APIKey
- {
- get { return this._APIKey; }
- set
- {
- Properties.Settings.Default.BoxcarAPIKey = value;
- this._APIKey = value;
- }
- }
-
- public string Email
- {
- get { return this._Email; }
- set
- {
- Properties.Settings.Default.BoxcarEmail = value;
- this._Email = value;
- }
- }
-
- public string MD5Email
- {
- get { return BitConverter.ToString(new MD5CryptoServiceProvider().ComputeHash(Encoding.UTF8.GetBytes(this._Email))).Replace("-", "").ToLower(); }
- }
- }
- }
-}
View
67 Backup/Config/Config.Growl.cs
@@ -1,67 +0,0 @@
-using System;
-using System.Collections.Generic;
-using System.Linq;
-using System.Text;
-
-namespace uTorrentNotifier
-{
- public partial class Config
- {
- public class GrowlConfig
- {
- private string _Password = String.Empty;
- private string _Host = String.Empty;
- private string _Port = String.Empty;
-
- private bool _Enable = false;
-
- public GrowlConfig()
- {
- this._Password = Properties.Settings.Default.GrowlPassword;
- this._Host = Properties.Settings.Default.GrowlHost;
- this._Port = Properties.Settings.Default.GrowlPort;
- this._Enable = Properties.Settings.Default.GrowlEnable;
- }
-
- public string Password
- {
- get { return this._Password; }
- set
- {
- Properties.Settings.Default.GrowlPassword = value;
- this._Password = value;
- }
- }
-
- public string Host
- {
- get { return this._Host; }
- set
- {
- Properties.Settings.Default.GrowlHost = value;
- this._Host = value;
- }
- }
-
- public string Port
- {
- get { return this._Port; }
- set
- {
- Properties.Settings.Default.GrowlPort = value;
- this._Port = value;
- }
- }
-
- public bool Enable
- {
- get { return this._Enable; }
- set
- {
- Properties.Settings.Default.GrowlEnable = value;
- this._Enable = value;
- }
- }
- }
- }
-}
View
42 Backup/Config/Config.Notifications.cs
@@ -1,42 +0,0 @@
-using System;
-using System.Collections.Generic;
-using System.Linq;
-using System.Text;
-
-namespace uTorrentNotifier
-{
- public partial class Config
- {
- public class NotificationsConfig
- {
- private bool _DownloadComplete = true;
- private bool _TorrentAdded = true;
-
- public NotificationsConfig()
- {
- this._TorrentAdded = Properties.Settings.Default.Notification_TorrentAdded;
- this._DownloadComplete = Properties.Settings.Default.Notification_DownloadComplete;
- }
-
- public bool DownloadComplete
- {
- get { return this._DownloadComplete; }
- set
- {
- Properties.Settings.Default.Notification_DownloadComplete = value;
- this._DownloadComplete= value;
- }
- }
-
- public bool TorrentAdded
- {
- get { return this._TorrentAdded; }
- set
- {
- Properties.Settings.Default.Notification_TorrentAdded = value;
- this._TorrentAdded = value;
- }
- }
- }
- }
-}
View
43 Backup/Config/Config.Prowl.cs
@@ -1,43 +0,0 @@
-using System;
-using System.Collections.Generic;
-using System.Linq;
-using System.Text;
-
-namespace uTorrentNotifier
-{
- public partial class Config
- {
- public class ProwlConfig
- {
- private string _ApiKey = String.Empty;
-
- private bool _Enable = false;
-
- public ProwlConfig()
- {
- this._ApiKey = Properties.Settings.Default.ProwlAPIKey;
- this._Enable = Properties.Settings.Default.ProwlEnable;
- }
-
- public string ApiKey
- {
- get { return this._ApiKey; }
- set
- {
- Properties.Settings.Default.ProwlAPIKey = value;
- this._ApiKey = value;
- }
- }
-
- public bool Enable
- {
- get { return this._Enable; }
- set
- {
- Properties.Settings.Default.ProwlEnable = value;
- this._Enable = value;
- }
- }
- }
- }
-}
View
81 Backup/Config/Config.Twitter.cs
@@ -1,81 +0,0 @@
-using System;
-using System.Collections.Generic;
-using System.Linq;
-using System.Text;
-
-namespace uTorrentNotifier
-{
- public partial class Config
- {
- public class TwitterConfig
- {
- private string _ConsumerKey = String.Empty;
- private string _ConsumerSecret = String.Empty;
- private string _Token = String.Empty;
- private string _TokenSecret = String.Empty;
- private string _Pin = String.Empty;
-
- private bool _Enable = false;
-
- public TwitterConfig()
- {
- this._ConsumerKey = Properties.Settings.Default.TwitterConsumerKey;
- this._ConsumerSecret = Properties.Settings.Default.TwitterConsumerSecret;
- this._Token = Properties.Settings.Default.TwitterToken;
- this._TokenSecret = Properties.Settings.Default.TwitterTokenSecret;
- this._Pin = Properties.Settings.Default.TwitterPIN;
- this._Enable = Properties.Settings.Default.TwitterEnable;
- }
-
- public string ConsumerKey
- {
- get { return this._ConsumerKey; }
- }
-
- public string ConsumerSecret
- {
- get { return this._ConsumerSecret; }
- }
-
- public string Token
- {
- get { return this._Token; }
- set
- {
- Properties.Settings.Default.TwitterToken = value;
- this._Token = value;
- }
- }
-
- public string TokenSecret
- {
- get { return this._TokenSecret; }
- set
- {
- Properties.Settings.Default.TwitterTokenSecret = value;
- this._TokenSecret = value;
- }
- }
-
- public string Pin
- {
- get { return this._Pin; }
- set
- {
- Properties.Settings.Default.TwitterPIN = value;
- this._Pin = value;
- }
- }
-
- public bool Enable
- {
- get { return this._Enable; }
- set
- {
- Properties.Settings.Default.TwitterEnable = value;
- this._Enable = value;
- }
- }
- }
- }
-}
View
113 Backup/Config/Config.cs
@@ -1,113 +0,0 @@
-using System;
-using System.Collections.Generic;
-using System.Linq;
-using System.Text;
-
-namespace uTorrentNotifier
-{
- public partial class Config
- {
- public const string LatestVersion = "http://ejholmes.github.com/uTorrent-Notifier/latest";
- public const string LatestDownload = "http://github.com/downloads/ejholmes/uTorrent-Notifier/setup.exe";
- private string _Uri = String.Empty;
- private string _UserName = String.Empty;
- private string _Password = String.Empty;
-
- private bool _RunOnStartup = false;
- private bool _ShowBalloonTips = true;
- private bool _CheckForUpdates = false;
-
- public ProwlConfig Prowl = new ProwlConfig();
- public GrowlConfig Growl = new GrowlConfig();
- public TwitterConfig Twitter = new TwitterConfig();
- public BoxcarConfig Boxcar = new BoxcarConfig();
- public NotificationsConfig Notifications = new NotificationsConfig();
-
- public Config()
- {
- this._Uri = Properties.Settings.Default.URI;
- this._UserName = Properties.Settings.Default.UserName;
- this._Password = Properties.Settings.Default.Password;
- this._RunOnStartup = Properties.Settings.Default.RunOnStartup;
- this._ShowBalloonTips = Properties.Settings.Default.ShowBalloonTips;
- this._CheckForUpdates = Properties.Settings.Default.CheckForUpdates;
- }
-
- public void Save()
- {
- /* Save registry info only if we're changing the value */
- if (this._RunOnStartup != Properties.Settings.Default.RunOnStartup)
- {
- Microsoft.Win32.RegistryKey key =
- Microsoft.Win32.Registry.CurrentUser.OpenSubKey("SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\Run", true);
-
- if (this._RunOnStartup)
- key.SetValue(Properties.Resources.Name, System.Windows.Forms.Application.ExecutablePath.ToString());
- else
- key.DeleteValue(Properties.Resources.Name, false);
-
- Properties.Settings.Default.RunOnStartup = this._RunOnStartup;
- }
- Properties.Settings.Default.Save();
- }
-
- public string Uri
- {
- get { return this._Uri; }
- set
- {
- string uri = value.TrimEnd('/');
-
- Properties.Settings.Default.URI = uri;
- this._Uri = uri;
- }
- }
- public string UserName
- {
- get { return this._UserName; }
- set
- {
- Properties.Settings.Default.UserName = value;
- this._UserName = value;
- }
- }
- public string Password
- {
- get { return this._Password; }
- set
- {
- Properties.Settings.Default.Password = value;
- this._Password = value;
- }
- }
-
- public bool RunOnStartup
- {
- get { return this._RunOnStartup; }
- set
- {
- this._RunOnStartup = value;
- }
- }
-
- public bool ShowBalloonTips
- {
- get { return this._ShowBalloonTips; }
- set
- {
- Properties.Settings.Default.ShowBalloonTips = value;
- this._ShowBalloonTips = value;
- }
- }
-
- public bool CheckForUpdates
- {
- get { return this._CheckForUpdates; }
- set
- {
- Properties.Settings.Default.CheckForUpdates = value;
- this._CheckForUpdates = value;
- }
- }
- }
-}
View
50 Backup/Notifications/Boxcar/Boxcar.cs
@@ -1,50 +0,0 @@
-using System;
-using System.Collections.Generic;
-using System.Linq;
-using System.Text;
-using System.Net;
-using System.IO;
-using System.Web;
-
-namespace uTorrentNotifier
-{
- public class Boxcar
- {
- private string _uri = "http://boxcar.io";
- private Config.BoxcarConfig BoxcarConfig;
-
- public Boxcar(Config.BoxcarConfig boxcarConfig)
- {
- this.BoxcarConfig = boxcarConfig;
- }
-
- public void Add(string message)
- {
- if (String.IsNullOrEmpty(this.BoxcarConfig.APIKey))
- return;
- try
- {
- string url = this._uri + "/devices/providers/" + this.BoxcarConfig.APIKey + "/notifications";
-
- WebClient client = new WebClient();
- client.Headers.Add("user-agent", "uTorrent Notifier");
- client.UploadData(url, Encoding.ASCII.GetBytes("email=" + this.BoxcarConfig.MD5Email + "&notification[message]=" + message.Replace(" ", "+")));
- }
- catch (WebException)
- {
- /* User probably isn't subscribed to the provider yet */
- this.SendInvite();
- this.Add(message);
- }
- }
-
- public void SendInvite()
- {
- string url = this._uri + "/devices/providers/" + this.BoxcarConfig.APIKey + "/notifications/subscribe";
-
- WebClient client = new WebClient();
- client.Headers.Add("user-agent", "uTorrent Notifier");
- client.UploadData(url, Encoding.ASCII.GetBytes("email=" + this.BoxcarConfig.MD5Email));
- }
- }
-}
View
74 Backup/Notifications/Growl/Growl.cs
@@ -1,74 +0,0 @@
-using System;
-using System.Drawing;
-using System.Globalization;
-using uTorrentNotifier.Properties;
-using Growl.Connector;
-using Growl.CoreLibrary;
-
-namespace uTorrentNotifier
-{
- public enum GrowlNotificationType
- {
- InfoAdded,
- InfoComplete,
- Error
- }
-
- public class Growl
- {
- private Config.GrowlConfig GrowlConfig;
-
- // growl connector
- private GrowlConnector growl;
-
- // registered growl application
- private Application application;
-
- // growl notification levels
- private NotificationType added;
- private NotificationType complete;
- private NotificationType error;
-
- public Growl(Config.GrowlConfig growlConfig)
- {
- this.GrowlConfig = growlConfig;
- RegisterApplication();
- }
-
- public void Add(GrowlNotificationType type, string message)
- {
- Notification notification = null;
-
- if (type == GrowlNotificationType.Error)
- notification = new Notification(application.Name, "error", null, "Login Error", message);
- else
- notification = new Notification(application.Name, (type == GrowlNotificationType.InfoAdded ? "Added" : "Complete"), null, (type == GrowlNotificationType.InfoAdded ? "Torrent Added" : "Torrent Downloaded"), message);
-
- growl.Notify(notification);
- }
-
- private void RegisterApplication()
- {
- if (string.IsNullOrEmpty(GrowlConfig.Host))
- growl = new GrowlConnector(GrowlConfig.Password);
- else
- growl = new GrowlConnector(GrowlConfig.Password, GrowlConfig.Host, int.Parse(GrowlConfig.Port, CultureInfo.CurrentCulture));
-
- growl.EncryptionAlgorithm = Cryptography.SymmetricAlgorithmType.PlainText;
-
- application = new Application("uTorrent Notifier");
- application.Icon = GetIconData(Resources.utorrent_icon);
-
- added = new NotificationType("Added", "Torrent Added", GetIconData(Resources.utorrent_icon_added), true);
- complete = new NotificationType("Complete", "Download Complete", GetIconData(Resources.utorrent_icon_complete), true);
- error = new NotificationType("Error", "uTorrent Error", GetIconData(Resources.utorrent_icon_error), true);
-
- growl.Register(application, new NotificationType[] { added, complete, error });
- }
-
- private static BinaryData GetIconData(Bitmap Icon)
- {
- return new BinaryData((byte[])System.ComponentModel.TypeDescriptor.GetConverter(Icon).ConvertTo(Icon, typeof(byte[])));
- }
- }
-}
View
94 Backup/Notifications/Prowl/Prowl.cs
@@ -1,94 +0,0 @@
-using System;
-using System.Collections.Generic;
-using System.Linq;
-using System.Text;
-using System.Net;
-using System.IO;
-using System.Web;
-
-using ExtensionMethods;
-
-namespace uTorrentNotifier
-{
- public class Prowl
- {
-
- public enum Priority
- {
- VeryLow = -2,
- Moderate = -1,
- Normal = 0,
- High = 1,
- Emergency = 2
- }
- private string _uri = "https://prowl.weks.net/publicapi/";
- private string _application = "uTorrent Notifier";
- private string _description = "";
- private string _providerKey = "";
-
- private Priority _priority = Priority.Normal;
-
- private Config.ProwlConfig ProwlConfig;
-
- List<KeyValuePair<string, string>> defaults = new List<KeyValuePair<string,string>>();
-
- public Prowl(Config.ProwlConfig prowlConfig)
- {
- this.ProwlConfig = prowlConfig;
- defaults.Add(new KeyValuePair<string, string>("providerkey", this._providerKey));
- defaults.Add(new KeyValuePair<string, string>("priority", this._priority.ToString()));
- defaults.Add(new KeyValuePair<string, string>("application", this._application));
- defaults.Add(new KeyValuePair<string, string>("description", this._description));
- }
-
- public void Add(string message, List<KeyValuePair<string, string>> options)
- {
- defaults.Add(new KeyValuePair<string, string>("apikey", this.ProwlConfig.ApiKey));
-
- List<KeyValuePair<string, string>> data = new List<KeyValuePair<string, string>>();
-
- data.AddRange(options);
- data = data.Merge(defaults);
- data.Add(new KeyValuePair<string, string>("event", message));
-
- this._api("add", data);
- }
-
- public void Add(string message, string description)
- {
- List<KeyValuePair<string, string>> opts = new List<KeyValuePair<string, string>>();
- opts.Add(new KeyValuePair<string, string>("description", description));
-
- this.Add(message, opts);
- }
-
- public void Add(string message)
- {
- this.Add(message, new List<KeyValuePair<string, string>>());
- }
-
- private void _api(string method, List<KeyValuePair<string, string>> data)
- {
- StringBuilder sb = new StringBuilder();
-
- foreach (KeyValuePair<string, string> kv in data)
- {
- if (sb.Length > 0)
- sb.Append("&");
-
- sb.Append(HttpUtility.UrlEncode(kv.Key));
- sb.Append("=");
- sb.Append(HttpUtility.UrlEncode(kv.Value));
- }
-
- string url = this._uri + method + "?" + sb.ToString();
-
- WebRequest request = WebRequest.Create(url);
- ((HttpWebRequest)request).UserAgent = "uTorrent Notifier";
- request.ContentType = "appication/x-www-form-urlencoded";
- request.Method = "POST";
-
- request.GetResponse();
- }
- }
-}
View
53 Backup/Notifications/Twitter/Twitter.cs
@@ -1,53 +0,0 @@
-using System;
-using System.Collections.Generic;
-using System.Linq;
-using System.Text;
-using System.Net;
-using System.IO;
-using System.Web;
-using System.Threading;
-using System.ComponentModel;
-
-using ExtensionMethods;
-
-namespace uTorrentNotifier
-{
- public class Twitter
- {
- private Config.TwitterConfig TwitterConfig;
- private oAuthTwitter oAuth;
-
- public Twitter(Config.TwitterConfig twitterConfig)
- {
- this.TwitterConfig = twitterConfig;
- }
-
- public void Update(string message)
- {
- BackgroundWorker bw = new BackgroundWorker();
- bw.WorkerReportsProgress = false;
- bw.WorkerSupportsCancellation = false;
- bw.DoWork += new DoWorkEventHandler(bw_Update);
- bw.RunWorkerAsync(message);
- }
-
- void bw_Update(object sender, DoWorkEventArgs e)
- {
- oAuth = new oAuthTwitter();
- oAuth.ConsumerKey = TwitterConfig.ConsumerKey;
- oAuth.ConsumerSecret = TwitterConfig.ConsumerSecret;
- oAuth.Token = TwitterConfig.Token;
- oAuth.TokenSecret = TwitterConfig.TokenSecret;
-
- string tweet = HttpUtility.UrlEncode(e.Argument.ToString());
-
- if (tweet.Length > 140) tweet = tweet.Substring(0, 140);
-
- oAuth.oAuthWebRequest(
- oAuthTwitter.Method.Post,
- "http://twitter.com/statuses/update.xml",
- "status=" + tweet
- );
- }
- }
-}
View
364 Backup/Notifications/Twitter/oAuth.cs
@@ -1,364 +0,0 @@
-using System;
-using System.Security.Cryptography;
-using System.Collections.Generic;
-using System.Text;
-using System.Web;
-
-namespace uTorrentNotifier
-{
- public class OAuthBase
- {
-
- /// <summary>
- /// Provides a predefined set of algorithms that are supported officially by the protocol
- /// </summary>
- public enum SignatureTypes
- {
- HMACSHA1,
- Plaintext,
- RSASHA1
- }
-
- /// <summary>
- /// Provides an internal structure to sort the query parameter
- /// </summary>
- protected class QueryParameter
- {
- private string name = null;
- private string value = null;
-
- public QueryParameter(string name, string value)
- {
- this.name = name;
- this.value = value;
- }
-
- public string Name
- {
- get { return name; }
- }
-
- public string Value
- {
- get { return value; }
- }
- }
-
- /// <summary>
- /// Comparer class used to perform the sorting of the query parameters
- /// </summary>
- protected class QueryParameterComparer : IComparer<QueryParameter>
- {
-
- #region IComparer<QueryParameter> Members
-
- public int Compare(QueryParameter x, QueryParameter y)
- {
- if (x.Name == y.Name)
- {
- return string.Compare(x.Value, y.Value);
- }
- else
- {
- return string.Compare(x.Name, y.Name);
- }
- }
-
- #endregion
- }
-
- protected const string OAuthVersion = "1.0";
- protected const string OAuthParameterPrefix = "oauth_";
-
- //
- // List of know and used oauth parameters' names
- //
- protected const string OAuthConsumerKeyKey = "oauth_consumer_key";
- protected const string OAuthCallbackKey = "oauth_callback";
- protected const string OAuthVersionKey = "oauth_version";
- protected const string OAuthSignatureMethodKey = "oauth_signature_method";
- protected const string OAuthSignatureKey = "oauth_signature";
- protected const string OAuthTimestampKey = "oauth_timestamp";
- protected const string OAuthNonceKey = "oauth_nonce";
- protected const string OAuthTokenKey = "oauth_token";
- protected const string OAuthTokenSecretKey = "oauth_token_secret";
- protected const string OAuthVerifierKey = "oauth_verifier"; // JDevlin
-
- protected const string HMACSHA1SignatureType = "HMAC-SHA1";
- protected const string PlaintextSignatureType = "PLAINTEXT";
- protected const string RSASHA1SignatureType = "RSA-SHA1";
-
- protected Random random = new Random();
-
- protected string unreservedChars = "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789-_.~";
-
- /// <summary>
- /// Helper function to compute a hash value
- /// </summary>
- /// <param name="hashAlgorithm">The hashing algoirhtm used. If that algorithm needs some initialization, like HMAC and its derivatives, they should be initialized prior to passing it to this function</param>
- /// <param name="data">The data to hash</param>
- /// <returns>a Base64 string of the hash value</returns>
- private string ComputeHash(HashAlgorithm hashAlgorithm, string data)
- {
- if (hashAlgorithm == null)
- {
- throw new ArgumentNullException("hashAlgorithm");
- }
-
- if (string.IsNullOrEmpty(data))
- {
- throw new ArgumentNullException("data");
- }
-
- byte[] dataBuffer = System.Text.Encoding.ASCII.GetBytes(data);
- byte[] hashBytes = hashAlgorithm.ComputeHash(dataBuffer);
-
- return Convert.ToBase64String(hashBytes);
- }
-
- /// <summary>
- /// Internal function to cut out all non oauth query string parameters (all parameters not begining with "oauth_")
- /// </summary>
- /// <param name="parameters">The query string part of the Url</param>
- /// <returns>A list of QueryParameter each containing the parameter name and value</returns>
- private List<QueryParameter> GetQueryParameters(string parameters)
- {
- if (parameters.StartsWith("?"))
- {
- parameters = parameters.Remove(0, 1);
- }
-
- List<QueryParameter> result = new List<QueryParameter>();
-
- if (!string.IsNullOrEmpty(parameters))
- {
- string[] p = parameters.Split('&');
- foreach (string s in p)
- {
- // jmd: don't strip out oauth_verifier
- if (!string.IsNullOrEmpty(s) && !s.StartsWith(OAuthParameterPrefix))
- {
- if (s.IndexOf('=') > -1)
- {
- string[] temp = s.Split('=');
- result.Add(new QueryParameter(temp[0], temp[1]));
- }
- else
- {
- result.Add(new QueryParameter(s, string.Empty));
- }
- }
- }
- }
-
- return result;
- }
-
- /// <summary>
- /// This is a different Url Encode implementation since the default .NET one outputs the percent encoding in lower case.
- /// While this is not a problem with the percent encoding spec, it is used in upper case throughout OAuth
- /// </summary>
- /// <param name="value">The value to Url encode</param>
- /// <returns>Returns a Url encoded string</returns>
- protected string UrlEncode(string value)
- {
- StringBuilder result = new StringBuilder();
-
- foreach (char symbol in value)
- {
- if (unreservedChars.IndexOf(symbol) != -1)
- {
- result.Append(symbol);
- }
- else
- {
- result.Append('%' + String.Format("{0:X2}", (int)symbol));
- }
- }
-
- return result.ToString();
- }
-
- /// <summary>
- /// Normalizes the request parameters according to the spec
- /// </summary>
- /// <param name="parameters">The list of parameters already sorted</param>
- /// <returns>a string representing the normalized parameters</returns>
- protected string NormalizeRequestParameters(IList<QueryParameter> parameters)
- {
- StringBuilder sb = new StringBuilder();
- QueryParameter p = null;
- for (int i = 0; i < parameters.Count; i++)
- {
- p = parameters[i];
- sb.AppendFormat("{0}={1}", p.Name, p.Value);
-
- if (i < parameters.Count - 1)
- {
- sb.Append("&");
- }
- }
-
- return sb.ToString();
- }
-
- /// <summary>
- /// Generate the signature base that is used to produce the signature
- /// </summary>
- /// <param name="url">The full url that needs to be signed including its non OAuth url parameters</param>
- /// <param name="consumerKey">The consumer key</param>
- /// <param name="token">The token, if available. If not available pass null or an empty string</param>
- /// <param name="tokenSecret">The token secret, if available. If not available pass null or an empty string</param>
- /// <param name="httpMethod">The http method used. Must be a valid HTTP method verb (POST,GET,PUT, etc)</param>
- /// <param name="signatureType">The signature type. To use the default values use <see cref="OAuthBase.SignatureTypes">OAuthBase.SignatureTypes</see>.</param>
- /// <returns>The signature base</returns>
- public string GenerateSignatureBase(Uri url, string consumerKey, string token, string tokenSecret, string httpMethod, string timestamp, string nonce, string pin, string signatureType, out string normalizedUrl, out string normalizedRequestParameters)
- {
- if (token == null)
- {
- token = string.Empty;
- }
-
- if (tokenSecret == null)
- {
- tokenSecret = string.Empty;
- }
-
- if (string.IsNullOrEmpty(consumerKey))
- {
- throw new ArgumentNullException("consumerKey");
- }
-
- if (string.IsNullOrEmpty(httpMethod))
- {
- throw new ArgumentNullException("httpMethod");
- }
-
- if (string.IsNullOrEmpty(signatureType))
- {
- throw new ArgumentNullException("signatureType");
- }
-
- normalizedUrl = null;
- normalizedRequestParameters = null;
-
- List<QueryParameter> parameters = GetQueryParameters(url.Query);
- parameters.Add(new QueryParameter(OAuthVersionKey, OAuthVersion));
- parameters.Add(new QueryParameter(OAuthNonceKey, nonce));
- parameters.Add(new QueryParameter(OAuthTimestampKey, timestamp));
- parameters.Add(new QueryParameter(OAuthSignatureMethodKey, signatureType));
- parameters.Add(new QueryParameter(OAuthConsumerKeyKey, consumerKey));
-
- if (!string.IsNullOrEmpty(token))
- {
- parameters.Add(new QueryParameter(OAuthTokenKey, token));
- }
-
- // JDevlin: support for PIN-based auth
- if (!String.IsNullOrEmpty(pin))
- {
- parameters.Add(new QueryParameter(OAuthVerifierKey, pin));
- }
-
- parameters.Sort(new QueryParameterComparer());
-
- normalizedUrl = string.Format("{0}://{1}", url.Scheme, url.Host);
- if (!((url.Scheme == "http" && url.Port == 80) || (url.Scheme == "https" && url.Port == 443)))
- {
- normalizedUrl += ":" + url.Port;
- }
-
- normalizedUrl += url.AbsolutePath;
- normalizedRequestParameters = NormalizeRequestParameters(parameters);
-
- StringBuilder signatureBase = new StringBuilder();
- signatureBase.AppendFormat("{0}&", httpMethod.ToUpper());
- signatureBase.AppendFormat("{0}&", UrlEncode(normalizedUrl));
- signatureBase.AppendFormat("{0}", UrlEncode(normalizedRequestParameters));
-
- return signatureBase.ToString();
- }
-
- /// <summary>
- /// Generate the signature value based on the given signature base and hash algorithm
- /// </summary>
- /// <param name="signatureBase">The signature based as produced by the GenerateSignatureBase method or by any other means</param>
- /// <param name="hash">The hash algorithm used to perform the hashing. If the hashing algorithm requires initialization or a key it should be set prior to calling this method</param>
- /// <returns>A base64 string of the hash value</returns>
- public string GenerateSignatureUsingHash(string signatureBase, HashAlgorithm hash)
- {
- return ComputeHash(hash, signatureBase);
- }
-
- /// <summary>
- /// Generates a signature using the HMAC-SHA1 algorithm
- /// </summary>
- /// <param name="url">The full url that needs to be signed including its non OAuth url parameters</param>
- /// <param name="consumerKey">The consumer key</param>
- /// <param name="consumerSecret">The consumer seceret</param>
- /// <param name="token">The token, if available. If not available pass null or an empty string</param>
- /// <param name="tokenSecret">The token secret, if available. If not available pass null or an empty string</param>
- /// <param name="httpMethod">The http method used. Must be a valid HTTP method verb (POST,GET,PUT, etc)</param>
- /// <returns>A base64 string of the hash value</returns>
- public string GenerateSignature(Uri url, string consumerKey, string consumerSecret, string token, string tokenSecret, string httpMethod, string timestamp, string nonce, /* JDevlin*/ string pin, out string normalizedUrl, out string normalizedRequestParameters)
- {
- return GenerateSignature(url, consumerKey, consumerSecret, token, tokenSecret, httpMethod, timestamp, nonce, pin, SignatureTypes.HMACSHA1, out normalizedUrl, out normalizedRequestParameters);
- }
-
- /// <summary>
- /// Generates a signature using the specified signatureType
- /// </summary>
- /// <param name="url">The full url that needs to be signed including its non OAuth url parameters</param>
- /// <param name="consumerKey">The consumer key</param>
- /// <param name="consumerSecret">The consumer seceret</param>
- /// <param name="token">The token, if available. If not available pass null or an empty string</param>
- /// <param name="tokenSecret">The token secret, if available. If not available pass null or an empty string</param>
- /// <param name="httpMethod">The http method used. Must be a valid HTTP method verb (POST,GET,PUT, etc)</param>
- /// <param name="signatureType">The type of signature to use</param>
- /// <returns>A base64 string of the hash value</returns>
- public string GenerateSignature(Uri url, string consumerKey, string consumerSecret, string token, string tokenSecret, string httpMethod, string timestamp, string nonce, string pin /*JDevlin*/, SignatureTypes signatureType, out string normalizedUrl, out string normalizedRequestParameters)
- {
- normalizedUrl = null;
- normalizedRequestParameters = null;
-
- switch (signatureType)
- {
- case SignatureTypes.Plaintext:
- return HttpUtility.UrlEncode(string.Format("{0}&{1}", consumerSecret, tokenSecret));
- case SignatureTypes.HMACSHA1:
- string signatureBase = GenerateSignatureBase(url, consumerKey, token, tokenSecret, httpMethod, timestamp, nonce, pin, HMACSHA1SignatureType, out normalizedUrl, out normalizedRequestParameters);
-
- HMACSHA1 hmacsha1 = new HMACSHA1();
- hmacsha1.Key = Encoding.ASCII.GetBytes(string.Format("{0}&{1}", UrlEncode(consumerSecret), string.IsNullOrEmpty(tokenSecret) ? "" : UrlEncode(tokenSecret)));
-
- return GenerateSignatureUsingHash(signatureBase, hmacsha1);
- case SignatureTypes.RSASHA1:
- throw new NotImplementedException();
- default:
- throw new ArgumentException("Unknown signature type", "signatureType");
- }
- }
-
- /// <summary>
- /// Generate the timestamp for the signature
- /// </summary>
- /// <returns></returns>
- public virtual string GenerateTimestamp()
- {
- // Default implementation of UNIX time of the current UTC time
- TimeSpan ts = DateTime.UtcNow - new DateTime(1970, 1, 1, 0, 0, 0, 0);
- return Convert.ToInt64(ts.TotalSeconds).ToString();
- }
-
- /// <summary>
- /// Generate a nonce
- /// </summary>
- /// <returns></returns>
- public virtual string GenerateNonce()
- {
- // Just a simple implementation of a random number between 123400 and 9999999
- return random.Next(123400, 9999999).ToString();
- }
-
- }
-}
View
275 Backup/Notifications/Twitter/oAuthTwitter.cs
@@ -1,275 +0,0 @@
-using System;
-using System.Data;
-using System.Configuration;
-using System.Web;
-//using System.Web.Security;
-using System.Net;
-using System.IO;
-using System.Collections.Specialized;
-
-namespace uTorrentNotifier
-{
- public class oAuthTwitter : OAuthBase
- {
- public enum Method { Get, Post };
- public const string RequestToken = "http://twitter.com/oauth/request_token";
- public const string Authorize = "http://twitter.com/oauth/authorize";
- public const string AccessToken = "http://twitter.com/oauth/access_token";
-
- private string _consumerKey = "";
- private string _consumerSecret = "";
- private string _token = "";
- private string _tokenSecret = "";
- private string _pin = ""; // JDevlin
-
- // JMD: this property should not have a dependency on the Settings file.
- public string ConsumerKey
- {
- get
- {
- //if (_consumerKey == null || _consumerKey.Length == 0)
- //{
- // _consumerKey = Settings1.Default.consumerKey;
- //}
- return _consumerKey;
- }
- set { _consumerKey = value; }
- }
-
- // JMD: this property should not have a dependency on the Settings file.
- public string ConsumerSecret {
- get {
- //if (_consumerSecret.Length == 0)
- //{
- // _consumerSecret = Settings1.Default.consumerSecret;
- //}
- return _consumerSecret;
- }
- set { _consumerSecret = value; }
- }
-
- public string OAuthToken { get; set; }
- public string Token { get { return _token; } set { _token = value; } }
- public string Pin { get { return _pin; } set { _pin = value; } }
- public string TokenSecret { get { return _tokenSecret; } set { _tokenSecret = value; } }
-
- /// <summary>
- /// Get the link to Twitter's authorization page for this application.
- /// </summary>
- /// <returns>The url with a valid request token, or a null string.</returns>
- public string AuthorizationLinkGet()
- {
- string ret = null;
-
- // First let's get a REQUEST token.
- string response = oAuthWebRequest(Method.Get, RequestToken, String.Empty);
- if (response.Length > 0)
- {
- //response contains token and token secret. We only need the token.
- NameValueCollection qs = HttpUtility.ParseQueryString(response);
- if (qs["oauth_token"] != null)
- {
- OAuthToken = qs["oauth_token"]; // tuck this away for later
- ret = Authorize + "?oauth_token=" + qs["oauth_token"];// +"&oauth_callback=oob";
- }
- }
- return ret;
- }
-
- /// <summary>
- /// Exchange the request token for an access token.
- /// </summary>
- /// <param name="authToken">The oauth_token is supplied by Twitter's authorization page following the callback.</param>
- public void AccessTokenGet(string authToken, string pin)
- {
- this.Token = authToken;
- this._pin = pin; // JDevlin
-
- string response = oAuthWebRequest(Method.Get, AccessToken, String.Empty);
-
- if (response.Length > 0)
- {
- //Store the Token and Token Secret
- NameValueCollection qs = HttpUtility.ParseQueryString(response);
- if (qs["oauth_token"] != null)
- {
- this.Token = qs["oauth_token"];
- }
- if (qs["oauth_token_secret"] != null)
- {
- this.TokenSecret = qs["oauth_token_secret"];
- }
- }
- }
-
- /// <summary>
- /// Submit a web request using oAuth.
- /// </summary>
- /// <param name="method">GET or POST</param>
- /// <param name="url">The full url, including the querystring.</param>
- /// <param name="postData">Data to post (querystring format)</param>
- /// <returns>The web server response.</returns>
- public string oAuthWebRequest(Method method, string url, string postData)
- {
- string outUrl = "";
- string querystring = "";
- string ret = "";
-
-
- //Setup postData for signing.
- //Add the postData to the querystring.
- if (method == Method.Post)
- {
- if (postData.Length > 0)
- {
- //Decode the parameters and re-encode using the oAuth UrlEncode method.
- NameValueCollection qs = HttpUtility.ParseQueryString(postData);
- postData = "";
- foreach (string key in qs.AllKeys)
- {
- if (postData.Length > 0)
- {
- postData += "&";
- }
- qs[key] = HttpUtility.UrlDecode(qs[key]);
- qs[key] = this.UrlEncode(qs[key]);
- postData += key + "=" + qs[key];
-
- }
- if (url.IndexOf("?") > 0)
- {
- url += "&";
- }
- else
- {
- url += "?";
- }
- url += postData;
- }
- }
- else if (method == Method.Get && !String.IsNullOrEmpty(postData))
- {
- url += "?" + postData;
- }
-
- Uri uri = new Uri(url);
-
- string nonce = this.GenerateNonce();
- string timeStamp = this.GenerateTimestamp();
-
- //Generate Signature
- string sig = this.GenerateSignature(uri,
- this.ConsumerKey,
- this.ConsumerSecret,
- this.Token,
- this.TokenSecret,
- method.ToString(),
- timeStamp,
- nonce,
- this.Pin,
- out outUrl,
- out querystring);
-
- querystring += "&oauth_signature=" + HttpUtility.UrlEncode(sig);
-
- //Convert the querystring to postData
- if (method == Method.Post)
- {
- postData = querystring;
- querystring = "";
- }
-
- if (querystring.Length > 0)
- {
- outUrl += "?";
- }
-
- ret = WebRequest(method, outUrl + querystring, postData);
-
- return ret;
- }
-
- /// <summary>
- /// Web Request Wrapper
- /// </summary>
- /// <param name="method">Http Method</param>
- /// <param name="url">Full url to the web resource</param>
- /// <param name="postData">Data to post in querystring format</param>
- /// <returns>The web server response.</returns>
- public string WebRequest(Method method, string url, string postData)
- {
- HttpWebRequest webRequest = null;
- StreamWriter requestWriter = null;
- string responseData = "";
-
- webRequest = System.Net.WebRequest.Create(url) as HttpWebRequest;
- webRequest.Method = method.ToString();
- webRequest.ServicePoint.Expect100Continue = false;
- //webRequest.UserAgent = "Identify your application please.";
- //webRequest.Timeout = 20000;
-
- if (method == Method.Post)
- {
- webRequest.ContentType = "application/x-www-form-urlencoded";
-
- //POST the data.
- requestWriter = new StreamWriter(webRequest.GetRequestStream());
- try
- {
- requestWriter.Write(postData);
- }
- catch
- {
- throw;
- }
- finally
- {
- requestWriter.Close();
- requestWriter = null;
- }
- }
-
- responseData = WebResponseGet(webRequest);
-
- webRequest = null;
-
- return responseData;
-
- }
-
- /// <summary>
- /// Process the web response.
- /// </summary>
- /// <param name="webRequest">The request object.</param>
- /// <returns>The response data.</returns>
- public string WebResponseGet(HttpWebRequest webRequest)
- {
- StreamReader responseReader = null;
- string responseData = "";
-
- try
- {
- responseReader = new StreamReader(webRequest.GetResponse().GetResponseStream());
- responseData = responseReader.ReadToEnd();
- }
- catch
- {
- throw;
- }
- finally
- {
- webRequest.GetResponse().GetResponseStream().Close();
- responseReader.Close();
- responseReader = null;
- }
-
- return responseData;
- }
-
- // JMD: added for convenience. Reset the state of the oAuthTwitter object.
- public void Reset()
- {
- ConsumerKey = ConsumerSecret = OAuthToken = Token = TokenSecret = Pin = String.Empty;
- }
- }
-}
View
299 Backup/Program.cs
@@ -1,299 +0,0 @@
-using System;
-using System.Collections;
-using System.Collections.Generic;
-using System.ComponentModel;
-using System.Data;
-using System.Drawing;
-using System.Linq;
-using System.Text;
-using System.Windows.Forms;
-using System.Security.Principal;
-using System.Diagnostics;
-using System.Threading;
-using System.Globalization;
-
-using Newtonsoft.Json;
-using Newtonsoft.Json.Linq;
-
-[assembly:CLSCompliant(true)]
-namespace uTorrentNotifier
-{
- public class Program : Form
- {
- [STAThread]
- public static void Main()
- {
- Application.EnableVisualStyles();
- Application.SetCompatibleTextRenderingDefault(false);
- Application.Run(new Program());
- }
-
- private NotifyIcon _trayIcon;
- private ContextMenu _trayMenu;
- private MenuItem _miStartAll;
- private MenuItem _miPauseAll;
- private MenuItem _menuItem2;
- private MenuItem _miSettings;
- private MenuItem _menuItem1;
- private MenuItem _miClose;
-
- private SettingsForm settingsForm;
-
- private ClassRegistry ClassRegistry;
-
- public Program()
- {
- bool firstRun = false;
- InitializeComponent();
-
- if (Properties.Settings.Default.FirstRun)
- {
- Properties.Settings.Default.Upgrade();
- Properties.Settings.Default.Reload();
- Properties.Settings.Default.FirstRun = false;
- firstRun = true;
- }
- this.ClassRegistry = new ClassRegistry();
- this.settingsForm = new SettingsForm(this.ClassRegistry);
-
- if (this.ClassRegistry.Config.CheckForUpdates)
- {
- System.Threading.ThreadPool.QueueUserWorkItem(this.CheckForUpdates);
- }
- this.ClassRegistry.uTorrent.TorrentAdded += new WebUIAPI.TorrentAddedEventHandler(this.utorrent_TorrentAdded);
- this.ClassRegistry.uTorrent.DownloadComplete += new WebUIAPI.DownloadFinishedEventHandler(this.utorrent_DownloadComplete);
- this.ClassRegistry.uTorrent.WebUIError += new WebUIAPI.WebUIErrorEventHandler(this.utorrent_LogOnError);
- this.ClassRegistry.uTorrent.UpdatedList += new WebUIAPI.UpdatedListEventHandler(this.uTorrent_UpdatedList);
- this.ClassRegistry.uTorrent.Start();
-
- if (firstRun)
- this.settingsForm.Show();
- }
-
- void utorrent_LogOnError(object sender, Exception e)
- {
- if (!this.ClassRegistry.Config.Growl.Enable)
- {
- this._trayIcon.ShowBalloonTip(5000, "Login Error", e.Message, ToolTipIcon.Error);
- this._trayIcon.Text = global::uTorrentNotifier.Properties.Resources.Name + "\n" +
- "Error connecting to uTorrent";
- }
- else
- {
- this.ClassRegistry.Growl.Add(GrowlNotificationType.Error, e.Message);
- }
- }
-
- void utorrent_DownloadComplete(List<TorrentFile> finished)
- {
- if (this.ClassRegistry.Config.Notifications.DownloadComplete)
- {
- foreach (TorrentFile f in finished)
- {
- if (this.ClassRegistry.Config.Prowl.Enable)
- {
- this.ClassRegistry.Prowl.Add("Download Complete", f.Name);
- }
-
- if (this.ClassRegistry.Config.Growl.Enable)
- {
- this.ClassRegistry.Growl.Add(GrowlNotificationType.InfoComplete, f.Name);
- }
-
- if (this.ClassRegistry.Config.Twitter.Enable)
- {
- this.ClassRegistry.Twitter.Update("Downloaded " + f.Name);
- }
-
- if (this.ClassRegistry.Config.Boxcar.Enable)
- {
- this.ClassRegistry.Boxcar.Add("Download Complete: " + f.Name);
- }
-
- if (this.ClassRegistry.Config.ShowBalloonTips)
- {
- this._trayIcon.ShowBalloonTip(5000, "Download Complete", f.Name, ToolTipIcon.Info);
- }
- }
- }
- }
-
- void utorrent_TorrentAdded(List<TorrentFile> added)
- {
- if (this.ClassRegistry.Config.Notifications.TorrentAdded)
- {
- foreach (TorrentFile f in added)
- {
- if (this.ClassRegistry.Config.Prowl.Enable)
- {
- this.ClassRegistry.Prowl.Add("Torrent Added", f.Name);
- }
-
- if (this.ClassRegistry.Config.Growl.Enable)
- {
- this.ClassRegistry.Growl.Add(GrowlNotificationType.InfoAdded, f.Name);
- }
-
- if (this.ClassRegistry.Config.Twitter.Enable)
- {
- this.ClassRegistry.Twitter.Update("Added " + f.Name + " | " + Utilities.FormatBytes((long)f.Size));
- }
-
- if (this.ClassRegistry.Config.Boxcar.Enable)
- {
- this.ClassRegistry.Boxcar.Add("Torrent Added: " + f.Name);
- }
-
- if (this.ClassRegistry.Config.ShowBalloonTips)
- {
- this._trayIcon.ShowBalloonTip(5000, "Torrent Added", f.Name, ToolTipIcon.Info);
- }
- }
- }
- }
-
- void uTorrent_UpdatedList(List<TorrentFile> torrents)
- {
- int downloading = torrents.Count(n => n.StatusString == WebUIAPI.StatusString.Downloading);
- if (downloading == 1)
- {
- this._trayIcon.Text = global::uTorrentNotifier.Properties.Resources.Name + "\n" +
- downloading.ToString(CultureInfo.CurrentCulture) + " torrent downloading\n";
- }
- else
- {
- this._trayIcon.Text = global::uTorrentNotifier.Properties.Resources.Name + "\n" +
- downloading.ToString(CultureInfo.CurrentCulture) + " torrents downloading\n";
- }
- }
-
- private void Close_Click(object sender, EventArgs e)
- {
- this.Dispose();
- }
-
- private void Settings_Click(object sender, EventArgs e)
- {
- this.settingsForm.Show();
- }
-
- private void PauseAll_Click(object sender, EventArgs e)
- {
- this.ClassRegistry.uTorrent.PauseAll();
- }
-
- private void StartAll_Click(object sender, EventArgs e)
- {
- this.ClassRegistry.uTorrent.StartAll();
- }
-
- private void CheckForUpdates(object sender)
- {
- System.Net.WebClient webclient = new System.Net.WebClient();
- string latestVersion = webclient.DownloadString(Config.LatestVersion);
-
- Version latest = new Version(latestVersion);
-
- if (latest > ClassRegistry.Version)
- {
- if (MessageBox.Show("You are using version " + ClassRegistry.Version.ToString() + ". Would you like to download version " + latestVersion + "?",
- "New Version Available",
- MessageBoxButtons.YesNo,
- MessageBoxIcon.Question,
- MessageBoxDefaultButton.Button1,
- MessageBoxOptions.DefaultDesktopOnly) == DialogResult.Yes)
- {
- Process.Start(Config.LatestDownload);
- Application.Exit();
- }
- }
- }
-
- private void InitializeComponent()
- {
- //
- // StartAll
- //
- this._miStartAll = new System.Windows.Forms.MenuItem();
- this._miStartAll.Index = 0;
- this._miStartAll.Text = "Start All";
- this._miStartAll.Click += new System.EventHandler(this.StartAll_Click);
- //
- // PauseAll
- //
- this._miPauseAll = new System.Windows.Forms.MenuItem();
- this._miPauseAll.Index = 1;
- this._miPauseAll.Text = "Pause All";
- this._miPauseAll.Click += new System.EventHandler(this.PauseAll_Click);
- //
- // menuItem2
- //
- this._menuItem2 = new System.Windows.Forms.MenuItem();
- this._menuItem2.Index = 2;
- this._menuItem2.Text = "-";
- //
- // Settings
- //
- this._miSettings = new System.Windows.Forms.MenuItem();
- this._miSettings.Index = 3;
- this._miSettings.Text = "Settings";
- this._miSettings.Click += new System.EventHandler(this.Settings_Click);
- //
- // menuItem1
- //
- this._menuItem1 = new System.Windows.Forms.MenuItem();
- this._menuItem1.Index = 4;
- this._menuItem1.Text = "-";
- //
- // Close
- //
- this._miClose = new System.Windows.Forms.MenuItem();
- this._miClose.Index = 5;
- this._miClose.Text = "Exit";
- this._miClose.Click += new System.EventHandler(this.Close_Click);
-
- this._trayMenu = new ContextMenu();
- this._trayMenu.MenuItems.AddRange(new System.Windows.Forms.MenuItem[] {
- this._miStartAll,
- this._miPauseAll,
- this._menuItem2,
- this._miSettings,
- this._menuItem1,
- this._miClose});
-
- this._trayIcon = new NotifyIcon();
- this._trayIcon.Text = global::uTorrentNotifier.Properties.Resources.Name;
- this._trayIcon.Icon = global::uTorrentNotifier.Properties.Resources.un_icon_systray;
- this.Icon = global::uTorrentNotifier.Properties.Resources.un_icon;
-
- // Add menu to tray icon and show it.
- this._trayIcon.ContextMenu = this._trayMenu;
- this._trayIcon.Visible = true;
- }
-
- protected override void OnLoad(EventArgs e)
- {
- Visible = false; // Hide form window.
- ShowInTaskbar = false; // Remove from taskbar.
-
- base.OnLoad(e);
- }
-
- private void OnExit(object sender, EventArgs e)
- {
- Application.Exit();
- }
-
- protected override void Dispose(bool disposing)
- {
- if (disposing)
- {
- // Release the icon resource.
- this._trayIcon.Dispose();
- this.ClassRegistry.Dispose();
- }
-
- base.Dispose(disposing);
- }
- }
-}
View
38 Backup/Properties/AssemblyInfo.cs
@@ -1,38 +0,0 @@
-using System.Reflection;
-using System.Runtime.CompilerServices;
-using System.Runtime.InteropServices;
-using System.Resources;
-
-// General Information about an assembly is controlled through the following
-// set of attributes. Change these attribute values to modify the information
-// associated with an assembly.
-[assembly: AssemblyTitle("uTorrent Notifier")]
-[assembly: AssemblyDescription("uTorrent notification application")]
-[assembly: AssemblyConfiguration("")]
-[assembly: AssemblyCompany("")]
-[assembly: AssemblyProduct("uTorrent Notifier")]
-[assembly: AssemblyCopyright("Copyright © 2010")]
-[assembly: AssemblyTrademark("")]
-[assembly: AssemblyCulture("")]
-
-// Setting ComVisible to false makes the types in this assembly not visible
-// to COM components. If you need to access a type in this assembly from
-// COM, set the ComVisible attribute to true on that type.
-[assembly: ComVisible(false)]
-
-// The following GUID is for the ID of the typelib if this project is exposed to COM
-[assembly: Guid("580c3c33-089e-4153-80e2-00004f3761b4")]
-
-// Version information for an assembly consists of the following four values:
-//
-// Major Version
-// Minor Version
-// Build Number
-// Revision
-//
-// You can specify all the values or you can default the Build and Revision Numbers
-// by using the '*' as shown below:
-// [assembly: AssemblyVersion("1.0.*")]
-[assembly: AssemblyVersion("0.5.0.2")]
-[assembly: AssemblyFileVersion("0.5.0.2")]
-[assembly: NeutralResourcesLanguageAttribute("en-US")]
View
114 Backup/Properties/Resources.Designer.cs
@@ -1,114 +0,0 @@
-//------------------------------------------------------------------------------
-// <auto-generated>
-// This code was generated by a tool.
-// Runtime Version:2.0.50727.4927
-//
-// Changes to this file may cause incorrect behavior and will be lost if
-// the code is regenerated.
-// </auto-generated>
-//------------------------------------------------------------------------------
-
-namespace uTorrentNotifier.Properties {
- using System;
-
-
- /// <summary>
- /// A strongly-typed resource class, for looking up localized strings, etc.
- /// </summary>
- // This class was auto-generated by the StronglyTypedResourceBuilder
- // class via a tool like ResGen or Visual Studio.
- // To add or remove a member, edit your .ResX file then rerun ResGen
- // with the /str option, or rebuild your VS project.
- [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "2.0.0.0")]
- [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
- [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
- internal class Resources {
-
- private static global::System.Resources.ResourceManager resourceMan;
-
- private static global::System.Globalization.CultureInfo resourceCulture;
-
- [global::System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode")]
- internal Resources() {
- }
-
- /// <summary>
- /// Returns the cached ResourceManager instance used by this class.
- /// </summary>
- [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)]
- internal static global::System.Resources.ResourceManager ResourceManager {
- get {
- if (object.ReferenceEquals(resourceMan, null)) {
- global::System.Resources.ResourceManager temp = new global::System.Resources.ResourceManager("uTorrentNotifier.Properties.Resources", typeof(Resources).Assembly);
- resourceMan = temp;
- }
- return resourceMan;
- }
- }
-
- /// <summary>
- /// Overrides the current thread's CurrentUICulture property for all
- /// resource lookups using this strongly typed resource class.
- /// </summary>
- [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)]
- internal static global::System.Globalization.CultureInfo Culture {
- get {
- return resourceCulture;
- }
- set {
- resourceCulture = value;
- }
- }
-
- /// <summary>
- /// Looks up a localized string similar to uTorrent Notifier.
- /// </summary>
- internal static string Name {
- get {
- return ResourceManager.GetString("Name", resourceCulture);
- }
- }
-
- internal static System.Drawing.Icon un_icon {
- get {
- object obj = ResourceManager.GetObject("un_icon", resourceCulture);
- return ((System.Drawing.Icon)(obj));
- }
- }
-
- internal static System.Drawing.Icon un_icon_systray {
- get {
- object obj = ResourceManager.GetObject("un_icon_systray", resourceCulture);
- return ((System.Drawing.Icon)(obj));
- }
- }
-
- internal static System.Drawing.Bitmap utorrent_icon {
- get {
- object obj = ResourceManager.GetObject("utorrent_icon", resourceCulture);
- return ((System.Drawing.Bitmap)(obj));
- }
- }
-
- internal static System.Drawing.Bitmap utorrent_icon_added {
- get {
- object obj = ResourceManager.GetObject("utorrent_icon_added", resourceCulture);
- return ((System.Drawing.Bitmap)(obj));
- }
- }
-
- internal static System.Drawing.Bitmap utorrent_icon_complete {
- get {
- object obj = ResourceManager.GetObject("utorrent_icon_complete", resourceCulture);
- return ((System.Drawing.Bitmap)(obj));
- }
- }
-
- internal static System.Drawing.Bitmap utorrent_icon_error {
- get {
- object obj = ResourceManager.GetObject("utorrent_icon_error", resourceCulture);
- return ((System.Drawing.Bitmap)(obj));
- }
- }
- }
-}
View
142 Backup/Properties/Resources.resx
@@ -1,142 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<root>
- <!--
- Microsoft ResX Schema
-
- Version 2.0
-
- The primary goals of this format is to allow a simple XML format
- that is mostly human readable. The generation and parsing of the
- various data types are done through the TypeConverter classes
- associated with the data types.
-
- Example:
-
- ... ado.net/XML headers & schema ...
- <resheader name="resmimetype">text/microsoft-resx</resheader>
- <resheader name="version">2.0</resheader>
- <resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
- <resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
- <data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
- <data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
- <data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
- <value>[base64 mime encoded serialized .NET Framework object]</value>
- </data>
- <data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
- <value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
- <comment>This is a comment</comment>
- </data>
-
- There are any number of "resheader" rows that contain simple
- name/value pairs.
-
- Each data row contains a name, and value. The row also contains a
- type or mimetype. Type corresponds to a .NET class that support
- text/value conversion through the TypeConverter architecture.
- Classes that don't support this are serialized and stored with the
- mimetype set.
-
- The mimetype is used for serialized objects, and tells the
- ResXResourceReader how to depersist the object. This is currently not
- extensible. For a given mimetype the value must be set accordingly:
-
- Note - application/x-microsoft.net.object.binary.base64 is the format
- that the ResXResourceWriter will generate, however the reader can
- read any of the formats listed below.
-
- mimetype: application/x-microsoft.net.object.binary.base64
- value : The object must be serialized with
- : System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
- : and then encoded with base64 encoding.
-
- mimetype: application/x-microsoft.net.object.soap.base64
- value : The object must be serialized with
- : System.Runtime.Serialization.Formatters.Soap.SoapFormatter
- : and then encoded with base64 encoding.
-
- mimetype: application/x-microsoft.net.object.bytearray.base64
- value : The object must be serialized into a byte array
- : using a System.ComponentModel.TypeConverter
- : and then encoded with base64 encoding.
- -->
- <xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
- <xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
- <xsd:element name="root" msdata:IsDataSet="true">
- <xsd:complexType>
- <xsd:choice maxOccurs="unbounded">
- <xsd:element name="metadata">
- <xsd:complexType>
- <xsd:sequence>
- <xsd:element name="value" type="xsd:string" minOccurs="0" />
- </xsd:sequence>
- <xsd:attribute name="name" use="required" type="xsd:string" />
- <xsd:attribute name="type" type="xsd:string" />
- <xsd:attribute name="mimetype" type="xsd:string" />
- <xsd:attribute ref="xml:space" />
- </xsd:complexType>
- </xsd:element>
- <xsd:element name="assembly">
- <xsd:complexType>
- <xsd:attribute name="alias" type="xsd:string" />
- <xsd:attribute name="name" type="xsd:string" />
- </xsd:complexType>
- </xsd:element>
- <xsd:element name="data">
- <xsd:complexType>
- <xsd:sequence>
- <xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
- <xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
- </xsd:sequence>
- <xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" />
- <xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
- <xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
- <xsd:attribute ref="xml:space" />
- </xsd:complexType>
- </xsd:element>
- <xsd:element name="resheader">
- <xsd:complexType>
- <xsd:sequence>
- <xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
- </xsd:sequence>
- <xsd:attribute name="name" type="xsd:string" use="required" />
- </xsd:complexType>
- </xsd:element>
- </xsd:choice>
- </xsd:complexType>
- </xsd:element>
- </xsd:schema>
- <resheader name="resmimetype">
- <value>text/microsoft-resx</value>
- </resheader>
- <resheader name="version">
- <value>2.0</value>
- </resheader>
- <resheader name="reader">
- <value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
- </resheader>
- <resheader name="writer">
- <value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
- </resheader>
- <data name="Name" xml:space="preserve">
- <value>uTorrent Notifier</value>
- </data>
- <assembly alias="System.Windows.Forms" name="System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" />
- <data name="un_icon" type="System.Resources.ResXFileRef, System.Windows.Forms">
- <value>..\Resources\un_icon.ico;System.Drawing.Icon, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
- </data>
- <data name="un_icon_systray" type="System.Resources.ResXFileRef, System.Windows.Forms">
- <value>..\Resources\un_icon_systray.ico;System.Drawing.Icon, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
- </data>
- <data name="utorrent_icon" type="System.Resources.ResXFileRef, System.Windows.Forms">
- <value>..\resources\utorrent_icon.png;System.Drawing.Bitmap, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
- </data>
- <data name="utorrent_icon_added" type="System.Resources.ResXFileRef, System.Windows.Forms">
- <value>..\Resources\utorrent_icon_added.png;System.Drawing.Bitmap, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
- </data>
- <data name="utorrent_icon_complete" type="System.Resources.ResXFileRef, System.Windows.Forms">
- <value>..\Resources\utorrent_icon_complete.png;System.Drawing.Bitmap, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
- </data>
- <data name="utorrent_icon_error" type="System.Resources.ResXFileRef, System.Windows.Forms">
- <value>..\Resources\utorrent_icon_error.png;System.Drawing.Bitmap, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
- </data>
-</root>
View
308 Backup/Properties/Settings.Designer.cs
@@ -1,308 +0,0 @@
-//------------------------------------------------------------------------------
-// <auto-generated>
-// This code was generated by a tool.
-// Runtime Version:2.0.50727.4927
-//
-// Changes to this file may cause incorrect behavior and will be lost if
-// the code is regenerated.
-// </auto-generated>
-//------------------------------------------------------------------------------
-
-namespace uTorrentNotifier.Properties {
-
-
- [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
- [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.VisualStudio.Editors.SettingsDesigner.SettingsSingleFileGenerator", "9.0.0.0")]
- internal sealed partial class Settings : global::System.Configuration.ApplicationSettingsBase {
-
- private static Settings defaultInstance = ((Settings)(global::System.Configuration.ApplicationSettingsBase.Synchronized(new Settings())));
-
- public static Settings Default {
- get {
- return defaultInstance;
- }
- }
-
- [global::System.Configuration.UserScopedSettingAttribute()]
- [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
- [global::System.Configuration.DefaultSettingValueAttribute("")]
- public string UserName {
- get {
- return ((string)(this["UserName"]));
- }
- set {
- this["UserName"] = value;
- }
- }
-
- [global::System.Configuration.UserScopedSettingAttribute()]
- [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
- [global::System.Configuration.DefaultSettingValueAttribute("")]
- public string Password {
- get {
- return ((string)(this["Password"]));
- }
- set {
- this["Password"] = value;
- }
- }
-
- [global::System.Configuration.UserScopedSettingAttribute()]
- [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
- [global::System.Configuration.DefaultSettingValueAttribute("")]
- public string URI {
- get {
- return ((string)(this["URI"]));
- }
- set {
- this["URI"] = value;
- }
- }
-
- [global::System.Configuration.UserScopedSettingAttribute()]
- [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
- [global::System.Configuration.DefaultSettingValueAttribute("")]
- public string ProwlAPIKey {
- get {
- return ((string)(this["ProwlAPIKey"]));
- }
- set {
- this["ProwlAPIKey"] = value;
- }
- }
-
- [global::System.Configuration.UserScopedSettingAttribute()]
- [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
- [global::System.Configuration.DefaultSettingValueAttribute("False")]
- public bool ProwlEnable {
- get {
- return ((bool)(this["ProwlEnable"]));
- }
- set {
- this["ProwlEnable"] = value;
- }
- }
-
- [global::System.Configuration.UserScopedSettingAttribute()]
- [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
- [global::System.Configuration.DefaultSettingValueAttribute("True")]
- public bool ShowBalloonTips {
- get {
- return ((bool)(this["ShowBalloonTips"]));
- }
- set {
- this["ShowBalloonTips"] = value;
- }
- }
-
- [global::System.Configuration.UserScopedSettingAttribute()]
- [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
- [global::System.Configuration.DefaultSettingValueAttribute("False")]
- public bool RunOnStartup {
- get {
- return ((bool)(this["RunOnStartup"]));
- }
- set {
- this["RunOnStartup"] = value;
- }
- }
-
- [global::System.Configuration.UserScopedSettingAttribute()]
- [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
- [global::System.Configuration.DefaultSettingValueAttribute("True")]
- public bool Notification_TorrentAdded {
- get {
- return ((bool)(this["Notification_TorrentAdded"]));
- }
- set {
- this["Notification_TorrentAdded"] = value;
- }
- }
-
- [global::System.Configuration.UserScopedSettingAttribute()]
- [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
- [global::System.Configuration.DefaultSettingValueAttribute("True")]
- public bool Notification_DownloadComplete {
- get {
- return ((bool)(this["Notification_DownloadComplete"]));
- }
- set {
- this["Notification_DownloadComplete"] = value;
- }
- }
-
- [global::System.Configuration.UserScopedSettingAttribute()]
- [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
- [global::System.Configuration.DefaultSettingValueAttribute("True")]
- public bool FirstRun {
- get {
- return ((bool)(this["FirstRun"]));
- }
- set {
- this["FirstRun"] = value;
- }
- }
-
- [global::System.Configuration.UserScopedSettingAttribute()]
- [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
- [global::System.Configuration.DefaultSettingValueAttribute("False")]
- public bool CheckForUpdates {
- get {
- return ((bool)(this["CheckForUpdates"]));
- }
- set {
- this["CheckForUpdates"] = value;
- }
- }
-
- [global::System.Configuration.UserScopedSettingAttribute()]
- [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
- [global::System.Configuration.DefaultSettingValueAttribute("")]
- public string GrowlPassword {
- get {
- return ((string)(this["GrowlPassword"]));
- }
- set {
- this["GrowlPassword"] = value;
- }
- }
-
- [global::System.Configuration.UserScopedSettingAttribute()]
- [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
- [global::System.Configuration.DefaultSettingValueAttribute("")]
- public string GrowlHost {
- get {
- return ((string)(this["GrowlHost"]));
- }
- set {
- this["GrowlHost"] = value;
- }
- }
-
- [global::System.Configuration.UserScopedSettingAttribute()]
- [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
- [global::System.Configuration.DefaultSettingValueAttribute("23053")]
- public string GrowlPort {
- get {
- return ((string)(this["GrowlPort"]));
- }
- set {
- this["GrowlPort"] = value;
- }
- }
-
- [global::System.Configuration.UserScopedSettingAttribute()]
- [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
- [global::System.Configuration.DefaultSettingValueAttribute("False")]
- public bool GrowlEnable {
- get {
- return ((bool)(this["GrowlEnable"]));
- }
- set {
- this["GrowlEnable"] = value;
- }
- }
-
- [global::System.Configuration.UserScopedSettingAttribute()]
- [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
- [global::System.Configuration.DefaultSettingValueAttribute("")]
- public string TwitterToken {
- get {
- return ((string)(this["TwitterToken"]));
- }
- set {
- this["TwitterToken"] = value;
- }
- }
-
- [global::System.Configuration.UserScopedSettingAttribute()]
- [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
- [global::System.Configuration.DefaultSettingValueAttribute("")]
- public string TwitterTokenSecret {
- get {
- return ((string)(this["TwitterTokenSecret"]));
- }
- set {
- this["TwitterTokenSecret"] = value;
- }
- }
-
- [global::System.Configuration.ApplicationScopedSettingAttribute()]
- [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
- [global::System.Configuration.DefaultSettingValueAttribute("BKb8qNTzpN8du51E4R7Enw")]
- public string TwitterConsumerKey {
- get {
- return ((string)(this["TwitterConsumerKey"]));
- }
- }
-
- [global::System.Configuration.ApplicationScopedSettingAttribute()]
- [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
- [global::System.Configuration.DefaultSettingValueAttribute("zaA1h36ZHOD4GqrTFPyphf4WefrocvGRX6FydECmc")]
- public string TwitterConsumerSecret {
- get {
- return ((string)(this["TwitterConsumerSecret"]));
- }
- }
-
- [global::System.Configuration.UserScopedSettingAttribute()]
- [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
- [global::System.Configuration.DefaultSettingValueAttribute("")]
- public string TwitterPIN {
- get {
- return ((string)(this["TwitterPIN"]));
- }
- set {
- this["TwitterPIN"] = value;
- }
- }
-
- [global::System.Configuration.UserScopedSettingAttribute()]
- [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
- [global::System.Configuration.DefaultSettingValueAttribute("False")]
- public bool TwitterEnable {
- get {
- return ((bool)(this["TwitterEnable"]));
- }
- set {
- this["TwitterEnable"] = value;
- }
- }
-
- [global::System.Configuration.UserScopedSettingAttribute()]
- [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
- [global::System.Configuration.DefaultSettingValueAttribute("False")]
- public bool BoxcarEnable {
- get {
- return ((bool)(this["BoxcarEnable"]));
- }
- set {
- this["BoxcarEnable"] = value;
- }
- }
-
- [global::System.Configuration.UserScopedSettingAttribute()]
- [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
- [global::System.Configuration.DefaultSettingValueAttribute("")]
- public string BoxcarEmail {
- get {
- return ((string)(this["BoxcarEmail"]));
- }
- set {
- this["BoxcarEmail"] = value;
- }
- }
-
- [global::System.Configuration.UserScopedSettingAttribute()]
- [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
- [global::System.Configuration.DefaultSettingValueAttribute("")]
- public string BoxcarAPIKey {
- get {
- return ((string)(this["BoxcarAPIKey"]));
- }
- set {
- this["BoxcarAPIKey"] = value;
- }
- }
- }
-}
View
78 Backup/Properties/Settings.settings
@@ -1,78 +0,0 @@
-<?xml version='1.0' encoding='utf-8'?>
-<SettingsFile xmlns="http://schemas.microsoft.com/VisualStudio/2004/01/settings" CurrentProfile="(Default)" GeneratedClassNamespace="uTorrentNotifier.Properties" GeneratedClassName="Settings">
- <Profiles />
- <Settings>
- <Setting Name="UserName" Type="System.String" Scope="User">
- <Value Profile="(Default)" />
- </Setting>
- <Setting Name="Password" Type="System.String" Scope="User">
- <Value Profile="(Default)" />
- </Setting>
- <Setting Name="URI" Type="System.String" Scope="User">
- <Value Profile="(Default)" />
- </Setting>
- <Setting Name="ProwlAPIKey" Type="System.String" Scope="User">
- <Value Profile="(Default)" />
- </Setting>
- <Setting Name="ProwlEnable" Type="System.Boolean" Scope="User">
- <Value Profile="(Default)">False</Value>
- </Setting>
- <Setting Name="ShowBalloonTips" Type="System.Boolean" Scope="User">
- <Value Profile="(Default)">True</Value>
- </Setting>
- <Setting Name="RunOnStartup" Type="System.Boolean" Scope="User">
- <Value Profile="(Default)">False</Value>
- </Setting>
- <Setting Name="Notification_TorrentAdded" Type="System.Boolean" Scope="User">
- <Value Profile="(Default)">True</Value>
- </Setting>
- <Setting Name="Notification_DownloadComplete" Type="System.Boolean" Scope="User">
- <Value Profile="(Default)">True</Value>
- </Setting>
- <Setting Name="FirstRun" Type="System.Boolean" Scope="User">
- <Value Profile="(Default)">True</Value>
- </Setting>
- <Setting Name="CheckForUpdates" Type="System.Boolean" Scope="User">
- <Value Profile="(Default)">False</Value>
- </Setting>
- <Setting Name="GrowlPassword" Type="System.String" Scope="User">
- <Value Profile="(Default)" />
- </Setting>
- <Setting Name="GrowlHost" Type="System.String" Scope="User">
- <Value Profile="(Default)" />
- </Setting>
- <Setting Name="GrowlPort" Type="System.String" Scope="User">
- <Value Profile="(Default)">23053</Value>
- </Setting>
- <Setting Name="GrowlEnable" Type="System.Boolean" Scope="User">
- <Value Profile="(Default)">False</Value>
- </Setting>
- <Setting Name="TwitterToken" Type="System.String" Scope="User">
- <Value Profile="(Default)" />
- </Setting>
- <Setting Name="TwitterTokenSecret" Type="System.String" Scope="User">
- <Value Profile="(Default)" />
- </Setting>
- <Setting Name="TwitterConsumerKey" Type="System.String" Scope="Application">
- <Value Profile="(Default)">BKb8qNTzpN8du51E4R7Enw</Value>
- </Setting>
- <Setting Name="TwitterConsumerSecret" Type="System.String" Scope="Application">
- <Value Profile="(Default)">zaA1h36ZHOD4GqrTFPyphf4WefrocvGRX6FydECmc</Value>
- </Setting>
- <Setting Name="TwitterPIN" Type="System.String" Scope="User">
- <Value Profile="(Default)" />
- </Setting>
- <Setting Name="TwitterEnable" Type="System.Boolean" Scope="User">
- <Value Profile="(Default)">False</Value>
- </Setting>
- <Setting Name="BoxcarEnable" Type="System.Boolean" Scope="User">
- <Value Profile="(Default)">False</Value>
- </Setting>
- <Setting Name="BoxcarEmail" Type="System.String" Scope="User">
- <Value Profile="(Default)" />
- </Setting>
- <Setting Name="BoxcarAPIKey" Type="System.String" Scope="User">
- <Value Profile="(Default)" />
- </Setting>
- </Settings>
-</SettingsFile>
View
BIN  Backup/Resources/un_icon.ico
Binary file not shown
View
BIN  Backup/Resources/un_icon_systray.ico
Binary file not shown
View
BIN  Backup/Resources/utorrent_icon.png
Deleted file not rendered
View
BIN  Backup/Resources/utorrent_icon_added.png
Deleted file not rendered
View
BIN  Backup/Resources/utorrent_icon_complete.png
Deleted file not rendered
View
BIN  Backup/Resources/utorrent_icon_error.png
Deleted file not rendered
View
28 Backup/Settings.cs
@@ -1,28 +0,0 @@
-namespace uTorrentNotifier.Properties {
-
-
- // This class allows you to handle specific events on the settings class:
- // The SettingChanging event is raised before a setting's value is changed.
- // The PropertyChanged event is raised after a setting's value is changed.
- // The SettingsLoaded event is raised after the setting values are loaded.
- // The SettingsSaving event is raised before the setting values are saved.
- internal sealed partial class Settings {
-
- public Settings() {
- // // To add event handlers for saving and changing settings, uncomment the lines below:
- //
- // this.SettingChanging += this.SettingChangingEventHandler;
- //
- // this.SettingsSaving += this.SettingsSavingEventHandler;
- //
- }
-
- private void SettingChangingEventHandler(object sender, System.Configuration.SettingChangingEventArgs e) {
- // Add code to handle the SettingChangingEvent event here.
- }
-
- private void SettingsSavingEventHandler(object sender, System.ComponentModel.CancelEventArgs e) {
- // Add code to handle the SettingsSaving event here.
- }
- }
-}
View
825 Backup/SettingsForm.Designer.cs
@@ -1,825 +0,0 @@
-namespace uTorrentNotifier
-{
- partial class SettingsForm
- {
- /// <summary>
- /// Required designer variable.
- /// </summary>
- private System.ComponentModel.IContainer components = null;
-
- /// <summary>
- /// Clean up any resources being used.
- /// </summary>
- /// <param name="disposing">true if managed resources should be disposed; otherwise, false.</param>
- protected override void Dispose(bool disposing)
- {
- if (disposing && (components != null))
- {
- components.Dispose();
- }
- base.Dispose(disposing);
- }
-
- #region Windows Form Designer generated code
-
- /// <summary>
- /// Required method for Designer support - do not modify
- /// the contents of this method with the code editor.
- /// </summary>
- private void InitializeComponent()
- {
- this.groupBox1 = new System.Windows.Forms.GroupBox();
- this.tbPassword = new System.Windows.Forms.TextBox();
- this.tbUsername = new System.Windows.Forms.TextBox();
- this.lblPassword = new System.Windows.Forms.Label();
- this.lblUserName = new System.Windows.Forms.Label();
- this.groupBox2 = new System.Windows.Forms.GroupBox();
- this.label1 = new System.Windows.Forms.Label();
- this.tbWebUI_URL = new System.Windows.Forms.TextBox();
- this.btnSave = new System.Windows.Forms.Button();
- this.btnCancel = new System.Windows.Forms.Button();
- this.groupBox3 = new System.Windows.Forms.GroupBox();
- this.cbProwlEnable = new System.Windows.Forms.CheckBox();
- this.tbProwlAPIKey = new System.Windows.Forms.TextBox();
- this.lblProwlAPIKey = new System.Windows.Forms.Label();
- this.cbShowBalloonTips = new System.Windows.Forms.CheckBox();
- this.groupBox4 = new System.Windows.Forms.GroupBox();
- this.cbCheckForUpdates = new System.Windows.Forms.CheckBox();
- this.cbRunOnStartup = new System.Windows.Forms.CheckBox();
- this.tabControl1 = new System.Windows.Forms.TabControl();
- this.tpGeneral = new System.Windows.Forms.TabPage();
- this.tpProwl = new System.Windows.Forms.TabPage();
- this.tpGrowl = new System.Windows.Forms.TabPage();
- this.groupBox7 = new System.Windows.Forms.GroupBox();
- this.tbGrowlPort = new System.Windows.Forms.TextBox();
- this.lblGrowlPort = new System.Windows.Forms.Label();
- this.tbGrowlHost = new System.Windows.Forms.TextBox();
- this.lblGrowlHost = new System.Windows.Forms.Label();
- this.groupBox6 = new System.Windows.Forms.GroupBox();
- this.cbGrowlEnable = new System.Windows.Forms.CheckBox();
- this.tbGrowlPassword = new System.Windows.Forms.TextBox();
- this.lblGrowlPassword = new System.Windows.Forms.Label();
- this.tpTwitter = new System.Windows.Forms.TabPage();
- this.btnSendTestTweet = new System.Windows.Forms.Button();
- this.groupBox9 = new System.Windows.Forms.GroupBox();
- this.cbTwitterEnable = new System.Windows.Forms.CheckBox();
- this.groupBox8 = new System.Windows.Forms.GroupBox();
- this.label5 = new System.Windows.Forms.Label();
- this.btnTwitterAuthorize = new System.Windows.Forms.Button();
- this.btnStartAuthorization = new System.Windows.Forms.Button();
- this.tbTwitterPIN = new System.Windows.Forms.TextBox();
- this.label3 = new System.Windows.Forms.Label();
- this.lblTwitterPIN = new System.Windows.Forms.Label();
- this.tpBoxcar = new System.Windows.Forms.TabPage();
- this.groupBox10 = new System.Windows.Forms.GroupBox();
- this.btnBoxcarGetAPIKey = new System.Windows.Forms.Button();
- this.tbBoxcarAPIKey = new System.Windows.Forms.TextBox();
- this.lblBoxcarAPIKey = new System.Windows.Forms.Label();
- this.tbBoxcarEmail = new System.Windows.Forms.TextBox();
- this.lblBoxcarEmail = new System.Windows.Forms.Label();
- this.cbBoxcarEnable = new System.Windows.Forms.CheckBox();
- this.tpNotifications = new System.Windows.Forms.TabPage();
- this.groupBox5 = new System.Windows.Forms.GroupBox();
- this.cbProwlNotification_TorentAdded = new System.Windows.Forms.CheckBox();
- this.cbTorrentNotification_DownloadComplete = new System.Windows.Forms.CheckBox();
- this.tbAbout = new System.Windows.Forms.TabPage();
- this.richTextBox1 = new System.Windows.Forms.RichTextBox();
- this.linkLabel1 = new System.Windows.Forms.LinkLabel();
- this.lblVersion = new System.Windows.Forms.Label();
- this.label2 = new System.Windows.Forms.Label();
- this.groupBox1.SuspendLayout();
- this.groupBox2.SuspendLayout();
- this.groupBox3.SuspendLayout();
- this.groupBox4.SuspendLayout();
- this.tabControl1.SuspendLayout();
- this.tpGeneral.SuspendLayout();
- this.tpProwl.SuspendLayout();
- this.tpGrowl.SuspendLayout();
- this.groupBox7.SuspendLayout();
- this.groupBox6.SuspendLayout();
- this.tpTwitter.SuspendLayout();
- this.groupBox9.SuspendLayout();
- this.groupBox8.SuspendLayout();
- this.tpBoxcar.SuspendLayout();
- this.groupBox10.SuspendLayout();
- this.tpNotifications.SuspendLayout();
- this.groupBox5.SuspendLayout();
- this.tbAbout.SuspendLayout();
- this.SuspendLayout();
- //
- // groupBox1
- //
- this.groupBox1.Controls.Add(this.tbPassword);
- this.groupBox1.Controls.Add(this.tbUsername);
- this.groupBox1.Controls.Add(this.lblPassword);
- this.groupBox1.Controls.Add(this.lblUserName);
- this.groupBox1.Location = new System.Drawing.Point(6, 72);
- this.groupBox1.Name = "groupBox1";
- this.groupBox1.Size = new System.Drawing.Size(288, 84);
- this.groupBox1.TabIndex = 0;
- this.groupBox1.TabStop = false;
- this.groupBox1.Text = "Credentials";
- //
- // tbPassword
- //
- this.tbPassword.Location = new System.Drawing.Point(67, 56);
- this.tbPassword.Name = "tbPassword";
- this.tbPassword.Size = new System.Drawing.Size(171, 20);
- this.tbPassword.TabIndex = 2;
- this.tbPassword.UseSystemPasswordChar = true;
- //
- // tbUsername
- //
- this.tbUsername.Location = new System.Drawing.Point(67, 22);