mirror of
https://github.com/ShareX/ShareX.git
synced 2024-09-30 01:07:21 +13:00
Removed ApiKeysConfig
This commit is contained in:
parent
d2d3abd959
commit
d59e5417e9
11 changed files with 28 additions and 429 deletions
|
@ -748,7 +748,7 @@ private void tsbDestinationSettings_Click(object sender, EventArgs e)
|
|||
Program.UploaderSettingsResetEvent.WaitOne();
|
||||
}
|
||||
|
||||
using (UploadersConfigForm uploadersConfigForm = new UploadersConfigForm(Program.UploadersConfig, new UploadersAPIKeys()))
|
||||
using (UploadersConfigForm uploadersConfigForm = new UploadersConfigForm(Program.UploadersConfig))
|
||||
{
|
||||
uploadersConfigForm.ShowDialog();
|
||||
}
|
||||
|
|
|
@ -555,15 +555,15 @@ public UploadResult UploadImage(Stream stream, string fileName)
|
|||
case ImageDestination.ImageShack:
|
||||
Program.UploadersConfig.ImageShackSettings.ThumbnailWidth = Info.TaskSettings.AdvancedSettings.ThumbnailPreferredWidth;
|
||||
Program.UploadersConfig.ImageShackSettings.ThumbnailHeight = Info.TaskSettings.AdvancedSettings.ThumbnailPreferredHeight;
|
||||
imageUploader = new ImageShackUploader(ApiKeys.ImageShackKey, Program.UploadersConfig.ImageShackSettings);
|
||||
imageUploader = new ImageShackUploader(APIKeys.ImageShackKey, Program.UploadersConfig.ImageShackSettings);
|
||||
break;
|
||||
case ImageDestination.TinyPic:
|
||||
imageUploader = new TinyPicUploader(ApiKeys.TinyPicID, ApiKeys.TinyPicKey, Program.UploadersConfig.TinyPicAccountType, Program.UploadersConfig.TinyPicRegistrationCode);
|
||||
imageUploader = new TinyPicUploader(APIKeys.TinyPicID, APIKeys.TinyPicKey, Program.UploadersConfig.TinyPicAccountType, Program.UploadersConfig.TinyPicRegistrationCode);
|
||||
break;
|
||||
case ImageDestination.Imgur:
|
||||
if (Program.UploadersConfig.ImgurOAuth2Info == null)
|
||||
{
|
||||
Program.UploadersConfig.ImgurOAuth2Info = new OAuth2Info(ApiKeys.ImgurClientID, ApiKeys.ImgurClientSecret);
|
||||
Program.UploadersConfig.ImgurOAuth2Info = new OAuth2Info(APIKeys.ImgurClientID, APIKeys.ImgurClientSecret);
|
||||
}
|
||||
|
||||
imageUploader = new Imgur_v3(Program.UploadersConfig.ImgurOAuth2Info)
|
||||
|
@ -574,7 +574,7 @@ public UploadResult UploadImage(Stream stream, string fileName)
|
|||
};
|
||||
break;
|
||||
case ImageDestination.Flickr:
|
||||
imageUploader = new FlickrUploader(ApiKeys.FlickrKey, ApiKeys.FlickrSecret, Program.UploadersConfig.FlickrAuthInfo, Program.UploadersConfig.FlickrSettings);
|
||||
imageUploader = new FlickrUploader(APIKeys.FlickrKey, APIKeys.FlickrSecret, Program.UploadersConfig.FlickrAuthInfo, Program.UploadersConfig.FlickrSettings);
|
||||
break;
|
||||
case ImageDestination.Photobucket:
|
||||
imageUploader = new Photobucket(Program.UploadersConfig.PhotobucketOAuthInfo, Program.UploadersConfig.PhotobucketAccountInfo);
|
||||
|
@ -590,7 +590,7 @@ public UploadResult UploadImage(Stream stream, string fileName)
|
|||
|
||||
if (Program.UploadersConfig.TwitterOAuthInfoList != null && Program.UploadersConfig.TwitterOAuthInfoList.IsValidIndex(indexTwitpic))
|
||||
{
|
||||
imageUploader = new TwitPicUploader(ApiKeys.TwitPicKey, Program.UploadersConfig.TwitterOAuthInfoList[indexTwitpic])
|
||||
imageUploader = new TwitPicUploader(APIKeys.TwitPicKey, Program.UploadersConfig.TwitterOAuthInfoList[indexTwitpic])
|
||||
{
|
||||
TwitPicThumbnailMode = Program.UploadersConfig.TwitPicThumbnailMode,
|
||||
ShowFull = Program.UploadersConfig.TwitPicShowFull
|
||||
|
@ -602,11 +602,11 @@ public UploadResult UploadImage(Stream stream, string fileName)
|
|||
|
||||
if (Program.UploadersConfig.TwitterOAuthInfoList.IsValidIndex(indexTwitsnaps))
|
||||
{
|
||||
imageUploader = new TwitSnapsUploader(ApiKeys.TwitsnapsKey, Program.UploadersConfig.TwitterOAuthInfoList[indexTwitsnaps]);
|
||||
imageUploader = new TwitSnapsUploader(APIKeys.TwitsnapsKey, Program.UploadersConfig.TwitterOAuthInfoList[indexTwitsnaps]);
|
||||
}
|
||||
break;
|
||||
case ImageDestination.yFrog:
|
||||
YfrogOptions yFrogOptions = new YfrogOptions(ApiKeys.ImageShackKey);
|
||||
YfrogOptions yFrogOptions = new YfrogOptions(APIKeys.ImageShackKey);
|
||||
yFrogOptions.Username = Program.UploadersConfig.YFrogUsername;
|
||||
yFrogOptions.Password = Program.UploadersConfig.YFrogPassword;
|
||||
yFrogOptions.Source = Application.ProductName;
|
||||
|
@ -644,10 +644,10 @@ public UploadResult UploadText(Stream stream, string fileName)
|
|||
{
|
||||
settings.TextFormat = Info.TaskSettings.AdvancedSettings.TextFormat;
|
||||
}
|
||||
textUploader = new Pastebin(ApiKeys.PastebinKey, settings);
|
||||
textUploader = new Pastebin(APIKeys.PastebinKey, settings);
|
||||
break;
|
||||
case TextDestination.PastebinCA:
|
||||
textUploader = new Pastebin_ca(ApiKeys.PastebinCaKey, new PastebinCaSettings { TextFormat = Info.TaskSettings.AdvancedSettings.TextFormat });
|
||||
textUploader = new Pastebin_ca(APIKeys.PastebinCaKey, new PastebinCaSettings { TextFormat = Info.TaskSettings.AdvancedSettings.TextFormat });
|
||||
break;
|
||||
case TextDestination.Paste2:
|
||||
textUploader = new Paste2(new Paste2Settings { TextFormat = Info.TaskSettings.AdvancedSettings.TextFormat });
|
||||
|
@ -713,22 +713,22 @@ public UploadResult UploadFile(Stream stream, string fileName)
|
|||
Program.UploadersConfig.RapidShareFolderID);
|
||||
break;
|
||||
case FileDestination.SendSpace:
|
||||
fileUploader = new SendSpace(ApiKeys.SendSpaceKey);
|
||||
fileUploader = new SendSpace(APIKeys.SendSpaceKey);
|
||||
switch (Program.UploadersConfig.SendSpaceAccountType)
|
||||
{
|
||||
case AccountType.Anonymous:
|
||||
SendSpaceManager.PrepareUploadInfo(ApiKeys.SendSpaceKey);
|
||||
SendSpaceManager.PrepareUploadInfo(APIKeys.SendSpaceKey);
|
||||
break;
|
||||
case AccountType.User:
|
||||
SendSpaceManager.PrepareUploadInfo(ApiKeys.SendSpaceKey, Program.UploadersConfig.SendSpaceUsername, Program.UploadersConfig.SendSpacePassword);
|
||||
SendSpaceManager.PrepareUploadInfo(APIKeys.SendSpaceKey, Program.UploadersConfig.SendSpaceUsername, Program.UploadersConfig.SendSpacePassword);
|
||||
break;
|
||||
}
|
||||
break;
|
||||
case FileDestination.Minus:
|
||||
fileUploader = new Minus(Program.UploadersConfig.MinusConfig, new OAuthInfo(ApiKeys.MinusConsumerKey, ApiKeys.MinusConsumerSecret));
|
||||
fileUploader = new Minus(Program.UploadersConfig.MinusConfig, new OAuthInfo(APIKeys.MinusConsumerKey, APIKeys.MinusConsumerSecret));
|
||||
break;
|
||||
case FileDestination.Box:
|
||||
fileUploader = new Box(ApiKeys.BoxKey)
|
||||
fileUploader = new Box(APIKeys.BoxKey)
|
||||
{
|
||||
AuthToken = Program.UploadersConfig.BoxAuthToken,
|
||||
FolderID = Program.UploadersConfig.BoxFolderID,
|
||||
|
@ -738,7 +738,7 @@ public UploadResult UploadFile(Stream stream, string fileName)
|
|||
case FileDestination.Ge_tt:
|
||||
if (Program.UploadersConfig.IsActive(FileDestination.Ge_tt))
|
||||
{
|
||||
fileUploader = new Ge_tt(ApiKeys.Ge_ttKey)
|
||||
fileUploader = new Ge_tt(APIKeys.Ge_ttKey)
|
||||
{
|
||||
AccessToken = Program.UploadersConfig.Ge_ttLogin.AccessToken
|
||||
};
|
||||
|
@ -836,13 +836,13 @@ public UploadResult ShortenURL(string url)
|
|||
case UrlShortenerType.BITLY:
|
||||
if (Program.UploadersConfig.BitlyOAuth2Info == null)
|
||||
{
|
||||
Program.UploadersConfig.BitlyOAuth2Info = new OAuth2Info(ApiKeys.BitlyClientID, ApiKeys.BitlyClientSecret);
|
||||
Program.UploadersConfig.BitlyOAuth2Info = new OAuth2Info(APIKeys.BitlyClientID, APIKeys.BitlyClientSecret);
|
||||
}
|
||||
|
||||
urlShortener = new BitlyURLShortener(Program.UploadersConfig.BitlyOAuth2Info);
|
||||
break;
|
||||
case UrlShortenerType.Google:
|
||||
urlShortener = new GoogleURLShortener(Program.UploadersConfig.GoogleURLShortenerAccountType, ApiKeys.GoogleAPIKey,
|
||||
urlShortener = new GoogleURLShortener(Program.UploadersConfig.GoogleURLShortenerAccountType, APIKeys.GoogleAPIKey,
|
||||
Program.UploadersConfig.GoogleURLShortenerOAuth2Info);
|
||||
break;
|
||||
case UrlShortenerType.ISGD:
|
||||
|
|
|
@ -25,15 +25,17 @@ You should have received a copy of the GNU General Public License
|
|||
|
||||
namespace UploadersLib
|
||||
{
|
||||
public static class ApiKeys
|
||||
public static class APIKeys
|
||||
{
|
||||
// Image Uploaders
|
||||
public const string ImageShackKey = "5DEFHIMQ81951c9e786e00f21774fec39382b6ad";
|
||||
public const string TinyPicID = "e2aabb8d555322fa";
|
||||
public const string TinyPicKey = "00a68ed73ddd54da52dc2d5803fa35ee";
|
||||
/*public const string ImgurAnonymousKey = "af2fde9818ae53e7670ab52fb8ade644";
|
||||
/*
|
||||
public const string ImgurAnonymousKey = "af2fde9818ae53e7670ab52fb8ade644";
|
||||
public const string ImgurConsumerKey = "7daf4350229dc1fd8a9d5f8a2302094004fab40cf";
|
||||
public const string ImgurConsumerSecret = "6324137e9489cc561f76c372cc5efcd3";*/
|
||||
public const string ImgurConsumerSecret = "6324137e9489cc561f76c372cc5efcd3";
|
||||
*/
|
||||
public const string ImgurClientID = "d297fd441566f99";
|
||||
public const string ImgurClientSecret = "e7d67e86cafa32e313930100607c7ed953c5ad83";
|
||||
public const string FlickrKey = "fbe042faa01e6af0371b6d87be75436a";
|
||||
|
|
|
@ -1,166 +0,0 @@
|
|||
#region License Information (GPL v3)
|
||||
|
||||
/*
|
||||
ShareX - A program that allows you to take screenshots and share any file type
|
||||
Copyright (C) 2008-2014 ShareX Developers
|
||||
|
||||
This program is free software; you can redistribute it and/or
|
||||
modify it under the terms of the GNU General Public License
|
||||
as published by the Free Software Foundation; either version 2
|
||||
of the License, or (at your option) any later version.
|
||||
|
||||
This program is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with this program; if not, write to the Free Software
|
||||
Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
|
||||
|
||||
Optionally you can also view the license at <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
#endregion License Information (GPL v3)
|
||||
|
||||
using HelpersLib;
|
||||
using System.ComponentModel;
|
||||
|
||||
namespace UploadersLib
|
||||
{
|
||||
public class UploadersAPIKeys
|
||||
{
|
||||
#region Image Uploaders
|
||||
|
||||
[Category("ImageShack"), DefaultValue(ApiKeys.ImageShackKey), Description("ImageShack Key")]
|
||||
public string ImageShackKey { get; set; }
|
||||
|
||||
[Category("TinyPic"), DefaultValue(ApiKeys.TinyPicID), Description("TinyPic ID")]
|
||||
public string TinyPicID { get; set; }
|
||||
|
||||
[Category("TinyPic"), DefaultValue(ApiKeys.TinyPicKey), Description("TinyPic Key")]
|
||||
public string TinyPicKey { get; set; }
|
||||
|
||||
/*[Category("Imgur"), DefaultValue(ApiKeys.ImgurAnonymousKey), Description("Imgur Anonymous Key")]
|
||||
public string ImgurAnonymousKey { get; set; }
|
||||
|
||||
[Category("Imgur"), DefaultValue(ApiKeys.ImgurConsumerKey), Description("Imgur Consumer Key")]
|
||||
public string ImgurConsumerKey { get; set; }
|
||||
|
||||
[Category("Imgur"), DefaultValue(ApiKeys.ImgurConsumerSecret), Description("Imgur Consumer Secret")]
|
||||
public string ImgurConsumerSecret { get; set; }*/
|
||||
|
||||
[Category("Imgur"), DefaultValue(ApiKeys.ImgurClientID), Description("Imgur Client ID")]
|
||||
public string ImgurClientID { get; set; }
|
||||
|
||||
[Category("Imgur"), DefaultValue(ApiKeys.ImgurClientSecret), Description("Imgur Client Secret")]
|
||||
public string ImgurClientSecret { get; set; }
|
||||
|
||||
[Category("Flickr"), DefaultValue(ApiKeys.FlickrKey), Description("Flickr Key")]
|
||||
public string FlickrKey { get; set; }
|
||||
|
||||
[Category("Flickr"), DefaultValue(ApiKeys.FlickrSecret), Description("Flickr Secret")]
|
||||
public string FlickrSecret { get; set; }
|
||||
|
||||
[Category("Photobucket"), DefaultValue(ApiKeys.PhotobucketConsumerKey), Description("Photobucket Consumer Key")]
|
||||
public string PhotobucketConsumerKey { get; set; }
|
||||
|
||||
[Category("Photobucket"), DefaultValue(ApiKeys.PhotobucketConsumerSecret), Description("Photobucket Consumer Secret")]
|
||||
public string PhotobucketConsumerSecret { get; set; }
|
||||
|
||||
[Category("Uploadscreenshot"), DefaultValue(ApiKeys.UploadScreenshotKey), Description("Uploadscreenshot Key")]
|
||||
public string UploadScreenshotKey { get; set; }
|
||||
|
||||
[Category("ImageBam"), DefaultValue(ApiKeys.ImageBamKey), Description("ImageBam Key")]
|
||||
public string ImageBamKey { get; set; }
|
||||
|
||||
[Category("ImageBam"), DefaultValue(ApiKeys.ImageBamSecret), Description("ImageBam Secret")]
|
||||
public string ImageBamSecret { get; set; }
|
||||
|
||||
[Category("TwitSnaps"), DefaultValue(ApiKeys.TwitsnapsKey), Description("TwitSnaps Key")]
|
||||
public string TwitsnapsKey { get; set; }
|
||||
|
||||
[Category("TwitPic"), DefaultValue(ApiKeys.TwitPicKey), Description("TwitPic Key")]
|
||||
public string TwitPicKey { get; set; }
|
||||
|
||||
#endregion Image Uploaders
|
||||
|
||||
#region File Uploaders
|
||||
|
||||
[Category("Dropbox"), DefaultValue(ApiKeys.DropboxConsumerKey), Description("Dropbox Consumer Key")]
|
||||
public string DropboxConsumerKey { get; set; }
|
||||
|
||||
[Category("Dropbox"), DefaultValue(ApiKeys.DropboxConsumerSecret), Description("Dropbox Consumer Secret")]
|
||||
public string DropboxConsumerSecret { get; set; }
|
||||
|
||||
[Category("Box"), DefaultValue(ApiKeys.BoxKey), Description("Box Key")]
|
||||
public string BoxKey { get; set; }
|
||||
|
||||
[Category("Minus"), DefaultValue(ApiKeys.MinusConsumerKey), Description("Minus Consumer Secret")]
|
||||
public string MinusConsumerKey { get; set; }
|
||||
|
||||
[Category("Minus"), DefaultValue(ApiKeys.MinusConsumerSecret), Description("Minus Consumer Secret")]
|
||||
public string MinusConsumerSecret { get; set; }
|
||||
|
||||
[Category("SendSpace"), DefaultValue(ApiKeys.SendSpaceKey), Description("SendSpace Key")]
|
||||
public string SendSpaceKey { get; set; }
|
||||
|
||||
[Category("Drop.IO"), Browsable(false), DefaultValue(ApiKeys.DropIOKey), Description("Drop.IO Consumer Secret")]
|
||||
public string DropIOKey { get; set; }
|
||||
|
||||
[Category("Ge.tt"), Browsable(false), DefaultValue(ApiKeys.Ge_ttKey), Description("Ge.tt Key")]
|
||||
public string Ge_ttKey { get; set; }
|
||||
|
||||
[Category("Atlassian Jira"), DefaultValue(ApiKeys.JiraConsumerKey), Description("Atlassian Jira Consumer Key")]
|
||||
public string JiraConsumerKey { get; set; }
|
||||
|
||||
#endregion File Uploaders
|
||||
|
||||
#region Text Uploaders
|
||||
|
||||
[Category("Pastebin"), DefaultValue(ApiKeys.PastebinKey), Description("Pastebin Consumer Secret")]
|
||||
public string PastebinKey { get; set; }
|
||||
|
||||
[Category("Pastebin"), DefaultValue(ApiKeys.PastebinCaKey), Description("Pastebin Consumer Secret")]
|
||||
public string PastebinCaKey { get; set; }
|
||||
|
||||
#endregion Text Uploaders
|
||||
|
||||
#region URL Shorteners
|
||||
|
||||
[Category("bit.ly"), DefaultValue(ApiKeys.BitlyClientID), Description("bit.ly Client ID")]
|
||||
public string BitlyClientID { get; set; }
|
||||
|
||||
[Category("bit.ly"), DefaultValue(ApiKeys.BitlyClientSecret), Description("bit.ly Client Secret")]
|
||||
public string BitlyClientSecret { get; set; }
|
||||
|
||||
#endregion URL Shorteners
|
||||
|
||||
#region Other Services
|
||||
|
||||
[Category("Google"), DefaultValue(ApiKeys.GoogleClientID), Description("Google Client ID")]
|
||||
public string GoogleClientID { get; set; }
|
||||
|
||||
[Category("Google"), DefaultValue(ApiKeys.GoogleClientSecret), Description("Google Client Secret")]
|
||||
public string GoogleClientSecret { get; set; }
|
||||
|
||||
[Category("Google"), DefaultValue(ApiKeys.GoogleAPIKey), Description("Google API Key")]
|
||||
public string GoogleAPIKey { get; set; }
|
||||
|
||||
[Category("Twitter"), DefaultValue(ApiKeys.TwitterConsumerKey), Description("Twitter Consumer Secret")]
|
||||
public string TwitterConsumerKey { get; set; }
|
||||
|
||||
[Category("Twitter"), DefaultValue(ApiKeys.TwitterConsumerSecret), Description("Twitter Consumer Secret")]
|
||||
public string TwitterConsumerSecret { get; set; }
|
||||
|
||||
[Category("Picnik"), DefaultValue(ApiKeys.PicnikKey), Description("Picnik Key")]
|
||||
public string PicnikKey { get; set; }
|
||||
|
||||
#endregion Other Services
|
||||
|
||||
public UploadersAPIKeys()
|
||||
{
|
||||
this.ApplyDefaultPropertyValues();
|
||||
}
|
||||
}
|
||||
}
|
60
UploadersLib/ApiKeys/ApiKeysUI.Designer.cs
generated
60
UploadersLib/ApiKeys/ApiKeysUI.Designer.cs
generated
|
@ -1,60 +0,0 @@
|
|||
namespace UploadersLib
|
||||
{
|
||||
partial class ApiKeysUI
|
||||
{
|
||||
/// <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.pgAppConfig = new System.Windows.Forms.PropertyGrid();
|
||||
this.SuspendLayout();
|
||||
//
|
||||
// pgAppConfig
|
||||
//
|
||||
this.pgAppConfig.Dock = System.Windows.Forms.DockStyle.Fill;
|
||||
this.pgAppConfig.Location = new System.Drawing.Point(0, 0);
|
||||
this.pgAppConfig.Name = "pgAppConfig";
|
||||
this.pgAppConfig.Size = new System.Drawing.Size(568, 366);
|
||||
this.pgAppConfig.TabIndex = 1;
|
||||
//
|
||||
// ApiKeysUI
|
||||
//
|
||||
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
|
||||
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
|
||||
this.ClientSize = new System.Drawing.Size(568, 366);
|
||||
this.Controls.Add(this.pgAppConfig);
|
||||
this.MinimumSize = new System.Drawing.Size(576, 400);
|
||||
this.Name = "ApiKeysUI";
|
||||
this.Text = "ApiKeysUI";
|
||||
this.Load += new System.EventHandler(this.ApiKeysUI_Load);
|
||||
this.ResumeLayout(false);
|
||||
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
internal System.Windows.Forms.PropertyGrid pgAppConfig;
|
||||
}
|
||||
}
|
|
@ -1,44 +0,0 @@
|
|||
#region License Information (GPL v3)
|
||||
|
||||
/*
|
||||
ShareX - A program that allows you to take screenshots and share any file type
|
||||
Copyright (C) 2008-2014 ShareX Developers
|
||||
|
||||
This program is free software; you can redistribute it and/or
|
||||
modify it under the terms of the GNU General Public License
|
||||
as published by the Free Software Foundation; either version 2
|
||||
of the License, or (at your option) any later version.
|
||||
|
||||
This program is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with this program; if not, write to the Free Software
|
||||
Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
|
||||
|
||||
Optionally you can also view the license at <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
#endregion License Information (GPL v3)
|
||||
|
||||
using System;
|
||||
using System.Windows.Forms;
|
||||
|
||||
namespace UploadersLib
|
||||
{
|
||||
public partial class ApiKeysUI : Form
|
||||
{
|
||||
public ApiKeysUI(UploadersAPIKeys config)
|
||||
{
|
||||
InitializeComponent();
|
||||
pgAppConfig.SelectedObject = config;
|
||||
}
|
||||
|
||||
private void ApiKeysUI_Load(object sender, EventArgs e)
|
||||
{
|
||||
Text = Application.ProductName + " - API configurator";
|
||||
}
|
||||
}
|
||||
}
|
|
@ -1,120 +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>
|
||||
</root>
|
|
@ -41,9 +41,7 @@ public partial class UploadersConfigForm : Form
|
|||
{
|
||||
public UploadersConfig Config { get; private set; }
|
||||
|
||||
public UploadersAPIKeys APIKeys { get; private set; }
|
||||
|
||||
public UploadersConfigForm(UploadersConfig uploadersConfig, UploadersAPIKeys uploadersAPIKeys)
|
||||
public UploadersConfigForm(UploadersConfig uploadersConfig)
|
||||
{
|
||||
InitializeComponent();
|
||||
Icon = ShareXResources.Icon;
|
||||
|
@ -51,7 +49,6 @@ public UploadersConfigForm(UploadersConfig uploadersConfig, UploadersAPIKeys upl
|
|||
ControlSettings();
|
||||
CreateUserControlEvents();
|
||||
LoadSettings(uploadersConfig);
|
||||
APIKeys = uploadersAPIKeys;
|
||||
Text = "ShareX - Outputs Configuration" + (string.IsNullOrEmpty(uploadersConfig.FilePath) ? string.Empty : ": " + uploadersConfig.FilePath);
|
||||
}
|
||||
|
||||
|
@ -86,7 +83,7 @@ private void txtImageShackPassword_TextChanged(object sender, EventArgs e)
|
|||
|
||||
private void btnImageShackLogin_Click(object sender, EventArgs e)
|
||||
{
|
||||
ImageShackUploader imageShackUploader = new ImageShackUploader(ApiKeys.ImageShackKey, Config.ImageShackSettings);
|
||||
ImageShackUploader imageShackUploader = new ImageShackUploader(APIKeys.ImageShackKey, Config.ImageShackSettings);
|
||||
|
||||
try
|
||||
{
|
||||
|
|
|
@ -379,7 +379,7 @@ public void LoadSettings(UploadersConfig uploadersConfig)
|
|||
- Consumer Name: {1}
|
||||
- Public Key (without quotes): '{3}'
|
||||
|
||||
- You can now authenticate to Jira", Links.URL_WEBSITE, Application.ProductName, ApiKeys.JiraConsumerKey, Jira.PublicKey);
|
||||
- You can now authenticate to Jira", Links.URL_WEBSITE, Application.ProductName, APIKeys.JiraConsumerKey, Jira.PublicKey);
|
||||
|
||||
if (OAuthInfo.CheckOAuth(Config.JiraOAuthInfo))
|
||||
{
|
||||
|
|
|
@ -1538,7 +1538,7 @@ public void GistAuthOpen()
|
|||
{
|
||||
try
|
||||
{
|
||||
OAuth2Info oauth = new OAuth2Info(ApiKeys.GistId, ApiKeys.GistSecret);
|
||||
OAuth2Info oauth = new OAuth2Info(APIKeys.GistId, APIKeys.GistSecret);
|
||||
string url = new Gist(oauth).GetAuthorizationURL();
|
||||
|
||||
if (!string.IsNullOrEmpty(url))
|
||||
|
|
|
@ -106,14 +106,7 @@
|
|||
</Reference>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Compile Include="ApiKeys\ApiKeys.cs" />
|
||||
<Compile Include="ApiKeys\ApiKeysConfig.cs" />
|
||||
<Compile Include="ApiKeys\ApiKeysUI.cs">
|
||||
<SubType>Form</SubType>
|
||||
</Compile>
|
||||
<Compile Include="ApiKeys\ApiKeysUI.Designer.cs">
|
||||
<DependentUpon>ApiKeysUI.cs</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="ApiKeys\APIKeys.cs" />
|
||||
<Compile Include="FileUploaders\Box.cs" />
|
||||
<Compile Include="FileUploaders\Email.cs" />
|
||||
<Compile Include="FileUploaders\Ge_tt.cs" />
|
||||
|
@ -305,9 +298,6 @@
|
|||
<Compile Include="URLShorteners\YourlsURLShortener.cs" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<EmbeddedResource Include="ApiKeys\ApiKeysUI.resx">
|
||||
<DependentUpon>ApiKeysUI.cs</DependentUpon>
|
||||
</EmbeddedResource>
|
||||
<EmbeddedResource Include="FTPClient\FTPClientForm.resx">
|
||||
<DependentUpon>FTPClientForm.cs</DependentUpon>
|
||||
</EmbeddedResource>
|
||||
|
|
Loading…
Reference in a new issue