mirror of
https://github.com/ShareX/ShareX.git
synced 2024-10-01 09:47:22 +13:00
Added "Show video options dialog" option for YouTube
This commit is contained in:
parent
a6504b69ec
commit
fa692e94dc
9 changed files with 8564 additions and 1811 deletions
|
@ -47,7 +47,8 @@ public override GenericUploader CreateUploader(UploadersConfig config, TaskRefer
|
||||||
return new YouTube(config.YouTubeOAuth2Info)
|
return new YouTube(config.YouTubeOAuth2Info)
|
||||||
{
|
{
|
||||||
PrivacyType = config.YouTubePrivacyType,
|
PrivacyType = config.YouTubePrivacyType,
|
||||||
UseShortenedLink = config.YouTubeUseShortenedLink
|
UseShortenedLink = config.YouTubeUseShortenedLink,
|
||||||
|
ShowDialog = config.YouTubeShowDialog
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -59,6 +60,7 @@ public sealed class YouTube : FileUploader, IOAuth2
|
||||||
public OAuth2Info AuthInfo => googleAuth.AuthInfo;
|
public OAuth2Info AuthInfo => googleAuth.AuthInfo;
|
||||||
public YouTubeVideoPrivacy PrivacyType { get; set; }
|
public YouTubeVideoPrivacy PrivacyType { get; set; }
|
||||||
public bool UseShortenedLink { get; set; }
|
public bool UseShortenedLink { get; set; }
|
||||||
|
public bool ShowDialog { get; set; }
|
||||||
|
|
||||||
private GoogleOAuth2 googleAuth;
|
private GoogleOAuth2 googleAuth;
|
||||||
|
|
||||||
|
@ -90,55 +92,71 @@ public bool GetAccessToken(string code)
|
||||||
return googleAuth.GetAccessToken(code);
|
return googleAuth.GetAccessToken(code);
|
||||||
}
|
}
|
||||||
|
|
||||||
private string GetMetadata(string title)
|
|
||||||
{
|
|
||||||
object metadata = new
|
|
||||||
{
|
|
||||||
snippet = new
|
|
||||||
{
|
|
||||||
title = title
|
|
||||||
},
|
|
||||||
status = new
|
|
||||||
{
|
|
||||||
privacyStatus = PrivacyType.ToString()
|
|
||||||
}
|
|
||||||
};
|
|
||||||
|
|
||||||
return JsonConvert.SerializeObject(metadata);
|
|
||||||
}
|
|
||||||
|
|
||||||
public override UploadResult Upload(Stream stream, string fileName)
|
public override UploadResult Upload(Stream stream, string fileName)
|
||||||
{
|
{
|
||||||
if (!CheckAuthorization()) return null;
|
if (!CheckAuthorization()) return null;
|
||||||
|
|
||||||
string title = Path.GetFileNameWithoutExtension(fileName);
|
string title = Path.GetFileNameWithoutExtension(fileName);
|
||||||
string metadata = GetMetadata(title);
|
string description = "";
|
||||||
|
YouTubeVideoPrivacy visibility = PrivacyType;
|
||||||
|
|
||||||
|
if (ShowDialog)
|
||||||
|
{
|
||||||
|
using (YouTubeVideoOptionsForm form = new YouTubeVideoOptionsForm(title, description, visibility))
|
||||||
|
{
|
||||||
|
if (form.ShowDialog() == DialogResult.OK)
|
||||||
|
{
|
||||||
|
title = form.Title;
|
||||||
|
description = form.Description;
|
||||||
|
visibility = form.Visibility;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
YouTubeVideoUpload uploadVideo = new YouTubeVideoUpload()
|
||||||
|
{
|
||||||
|
snippet = new YouTubeVideoSnippet()
|
||||||
|
{
|
||||||
|
title = title,
|
||||||
|
description = description
|
||||||
|
},
|
||||||
|
status = new YouTubeVideoStatusUpload()
|
||||||
|
{
|
||||||
|
privacyStatus = visibility
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
|
string metadata = JsonConvert.SerializeObject(uploadVideo);
|
||||||
|
|
||||||
UploadResult result = SendRequestFile("https://www.googleapis.com/upload/youtube/v3/videos?part=id,snippet,status", stream, fileName, "file",
|
UploadResult result = SendRequestFile("https://www.googleapis.com/upload/youtube/v3/videos?part=id,snippet,status", stream, fileName, "file",
|
||||||
headers: googleAuth.GetAuthHeaders(), relatedData: metadata);
|
headers: googleAuth.GetAuthHeaders(), relatedData: metadata);
|
||||||
|
|
||||||
if (!string.IsNullOrEmpty(result.Response))
|
if (!string.IsNullOrEmpty(result.Response))
|
||||||
{
|
{
|
||||||
YouTubeVideo video = JsonConvert.DeserializeObject<YouTubeVideo>(result.Response);
|
YouTubeVideoResponse responseVideo = JsonConvert.DeserializeObject<YouTubeVideoResponse>(result.Response);
|
||||||
|
|
||||||
if (video != null)
|
if (responseVideo != null)
|
||||||
{
|
{
|
||||||
if (UseShortenedLink)
|
if (UseShortenedLink)
|
||||||
{
|
{
|
||||||
result.URL = $"https://youtu.be/{video.id}";
|
result.URL = $"https://youtu.be/{responseVideo.id}";
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
result.URL = $"https://www.youtube.com/watch?v={video.id}";
|
result.URL = $"https://www.youtube.com/watch?v={responseVideo.id}";
|
||||||
}
|
}
|
||||||
|
|
||||||
switch (video.status.uploadStatus)
|
switch (responseVideo.status.uploadStatus)
|
||||||
{
|
{
|
||||||
case YouTubeVideoStatus.UploadFailed:
|
case YouTubeVideoStatus.UploadFailed:
|
||||||
Errors.Add("Upload failed: " + video.status.failureReason);
|
Errors.Add("Upload failed: " + responseVideo.status.failureReason);
|
||||||
break;
|
break;
|
||||||
case YouTubeVideoStatus.UploadRejected:
|
case YouTubeVideoStatus.UploadRejected:
|
||||||
Errors.Add("Upload rejected: " + video.status.rejectionReason);
|
Errors.Add("Upload rejected: " + responseVideo.status.rejectionReason);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -148,7 +166,13 @@ public override UploadResult Upload(Stream stream, string fileName)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public class YouTubeVideo
|
public class YouTubeVideoUpload
|
||||||
|
{
|
||||||
|
public YouTubeVideoSnippet snippet { get; set; }
|
||||||
|
public YouTubeVideoStatusUpload status { get; set; }
|
||||||
|
}
|
||||||
|
|
||||||
|
public class YouTubeVideoResponse
|
||||||
{
|
{
|
||||||
public string id { get; set; }
|
public string id { get; set; }
|
||||||
public YouTubeVideoSnippet snippet { get; set; }
|
public YouTubeVideoSnippet snippet { get; set; }
|
||||||
|
@ -158,6 +182,8 @@ public class YouTubeVideo
|
||||||
public class YouTubeVideoSnippet
|
public class YouTubeVideoSnippet
|
||||||
{
|
{
|
||||||
public string title { get; set; }
|
public string title { get; set; }
|
||||||
|
public string description { get; set; }
|
||||||
|
public string[] tags { get; set; }
|
||||||
}
|
}
|
||||||
|
|
||||||
public class YouTubeVideoStatus
|
public class YouTubeVideoStatus
|
||||||
|
@ -170,4 +196,9 @@ public class YouTubeVideoStatus
|
||||||
public string failureReason { get; set; }
|
public string failureReason { get; set; }
|
||||||
public string rejectionReason { get; set; }
|
public string rejectionReason { get; set; }
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public class YouTubeVideoStatusUpload
|
||||||
|
{
|
||||||
|
public YouTubeVideoPrivacy privacyStatus { get; set; }
|
||||||
|
}
|
||||||
}
|
}
|
|
@ -629,6 +629,7 @@ private void InitializeComponent()
|
||||||
this.tcUploaders = new System.Windows.Forms.TabControl();
|
this.tcUploaders = new System.Windows.Forms.TabControl();
|
||||||
this.tttvMain = new ShareX.HelpersLib.TabToTreeView();
|
this.tttvMain = new ShareX.HelpersLib.TabToTreeView();
|
||||||
this.actRapidShareAccountType = new ShareX.UploadersLib.AccountTypeControl();
|
this.actRapidShareAccountType = new ShareX.UploadersLib.AccountTypeControl();
|
||||||
|
this.cbYouTubeShowDialog = new System.Windows.Forms.CheckBox();
|
||||||
this.tpOtherUploaders.SuspendLayout();
|
this.tpOtherUploaders.SuspendLayout();
|
||||||
this.tcOtherUploaders.SuspendLayout();
|
this.tcOtherUploaders.SuspendLayout();
|
||||||
this.tpTwitter.SuspendLayout();
|
this.tpTwitter.SuspendLayout();
|
||||||
|
@ -3808,6 +3809,7 @@ private void InitializeComponent()
|
||||||
//
|
//
|
||||||
// tpYouTube
|
// tpYouTube
|
||||||
//
|
//
|
||||||
|
this.tpYouTube.Controls.Add(this.cbYouTubeShowDialog);
|
||||||
this.tpYouTube.Controls.Add(this.cbYouTubeUseShortenedLink);
|
this.tpYouTube.Controls.Add(this.cbYouTubeUseShortenedLink);
|
||||||
this.tpYouTube.Controls.Add(this.cbYouTubePrivacyType);
|
this.tpYouTube.Controls.Add(this.cbYouTubePrivacyType);
|
||||||
this.tpYouTube.Controls.Add(this.lblYouTubePrivacyType);
|
this.tpYouTube.Controls.Add(this.lblYouTubePrivacyType);
|
||||||
|
@ -4943,6 +4945,13 @@ private void InitializeComponent()
|
||||||
this.actRapidShareAccountType.Name = "actRapidShareAccountType";
|
this.actRapidShareAccountType.Name = "actRapidShareAccountType";
|
||||||
this.actRapidShareAccountType.SelectedAccountType = ShareX.UploadersLib.AccountType.Anonymous;
|
this.actRapidShareAccountType.SelectedAccountType = ShareX.UploadersLib.AccountType.Anonymous;
|
||||||
//
|
//
|
||||||
|
// cbYouTubeShowDialog
|
||||||
|
//
|
||||||
|
resources.ApplyResources(this.cbYouTubeShowDialog, "cbYouTubeShowDialog");
|
||||||
|
this.cbYouTubeShowDialog.Name = "cbYouTubeShowDialog";
|
||||||
|
this.cbYouTubeShowDialog.UseVisualStyleBackColor = true;
|
||||||
|
this.cbYouTubeShowDialog.CheckedChanged += new System.EventHandler(this.cbYouTubeShowDialog_CheckedChanged);
|
||||||
|
//
|
||||||
// UploadersConfigForm
|
// UploadersConfigForm
|
||||||
//
|
//
|
||||||
resources.ApplyResources(this, "$this");
|
resources.ApplyResources(this, "$this");
|
||||||
|
@ -5682,5 +5691,6 @@ private void InitializeComponent()
|
||||||
private System.Windows.Forms.Label lblZWSToken;
|
private System.Windows.Forms.Label lblZWSToken;
|
||||||
private System.Windows.Forms.Label lblZWSURL;
|
private System.Windows.Forms.Label lblZWSURL;
|
||||||
private System.Windows.Forms.CheckBox cbOwnCloudAnimationFriendlyLinks;
|
private System.Windows.Forms.CheckBox cbOwnCloudAnimationFriendlyLinks;
|
||||||
|
private System.Windows.Forms.CheckBox cbYouTubeShowDialog;
|
||||||
}
|
}
|
||||||
}
|
}
|
|
@ -743,6 +743,7 @@ private void LoadFileUploaderSettings()
|
||||||
cbYouTubePrivacyType.Items.AddRange(Helpers.GetLocalizedEnumDescriptions<YouTubeVideoPrivacy>());
|
cbYouTubePrivacyType.Items.AddRange(Helpers.GetLocalizedEnumDescriptions<YouTubeVideoPrivacy>());
|
||||||
cbYouTubePrivacyType.SelectedIndex = (int)Config.YouTubePrivacyType;
|
cbYouTubePrivacyType.SelectedIndex = (int)Config.YouTubePrivacyType;
|
||||||
cbYouTubeUseShortenedLink.Checked = Config.YouTubeUseShortenedLink;
|
cbYouTubeUseShortenedLink.Checked = Config.YouTubeUseShortenedLink;
|
||||||
|
cbYouTubeShowDialog.Checked = Config.YouTubeShowDialog;
|
||||||
|
|
||||||
#endregion YouTube
|
#endregion YouTube
|
||||||
|
|
||||||
|
@ -3080,6 +3081,11 @@ private void cbYouTubeUseShortenedLink_CheckedChanged(object sender, EventArgs e
|
||||||
Config.YouTubeUseShortenedLink = cbYouTubeUseShortenedLink.Checked;
|
Config.YouTubeUseShortenedLink = cbYouTubeUseShortenedLink.Checked;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private void cbYouTubeShowDialog_CheckedChanged(object sender, EventArgs e)
|
||||||
|
{
|
||||||
|
Config.YouTubeShowDialog = cbYouTubeShowDialog.Checked;
|
||||||
|
}
|
||||||
|
|
||||||
#endregion YouTube
|
#endregion YouTube
|
||||||
|
|
||||||
#region Google Cloud Storage
|
#region Google Cloud Storage
|
||||||
|
|
File diff suppressed because it is too large
Load diff
121
ShareX.UploadersLib/Forms/YouTubeVideoOptionsForm.Designer.cs
generated
Normal file
121
ShareX.UploadersLib/Forms/YouTubeVideoOptionsForm.Designer.cs
generated
Normal file
|
@ -0,0 +1,121 @@
|
||||||
|
namespace ShareX.UploadersLib
|
||||||
|
{
|
||||||
|
partial class YouTubeVideoOptionsForm
|
||||||
|
{
|
||||||
|
/// <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()
|
||||||
|
{
|
||||||
|
System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(YouTubeVideoOptionsForm));
|
||||||
|
this.lblTitle = new System.Windows.Forms.Label();
|
||||||
|
this.lblDescription = new System.Windows.Forms.Label();
|
||||||
|
this.lblVisibility = new System.Windows.Forms.Label();
|
||||||
|
this.txtTitle = new System.Windows.Forms.TextBox();
|
||||||
|
this.txtDescription = new System.Windows.Forms.TextBox();
|
||||||
|
this.cbVisibility = new System.Windows.Forms.ComboBox();
|
||||||
|
this.btnOK = new System.Windows.Forms.Button();
|
||||||
|
this.btnCancel = new System.Windows.Forms.Button();
|
||||||
|
this.SuspendLayout();
|
||||||
|
//
|
||||||
|
// lblTitle
|
||||||
|
//
|
||||||
|
resources.ApplyResources(this.lblTitle, "lblTitle");
|
||||||
|
this.lblTitle.Name = "lblTitle";
|
||||||
|
//
|
||||||
|
// lblDescription
|
||||||
|
//
|
||||||
|
resources.ApplyResources(this.lblDescription, "lblDescription");
|
||||||
|
this.lblDescription.Name = "lblDescription";
|
||||||
|
//
|
||||||
|
// lblVisibility
|
||||||
|
//
|
||||||
|
resources.ApplyResources(this.lblVisibility, "lblVisibility");
|
||||||
|
this.lblVisibility.Name = "lblVisibility";
|
||||||
|
//
|
||||||
|
// txtTitle
|
||||||
|
//
|
||||||
|
resources.ApplyResources(this.txtTitle, "txtTitle");
|
||||||
|
this.txtTitle.Name = "txtTitle";
|
||||||
|
//
|
||||||
|
// txtDescription
|
||||||
|
//
|
||||||
|
resources.ApplyResources(this.txtDescription, "txtDescription");
|
||||||
|
this.txtDescription.Name = "txtDescription";
|
||||||
|
//
|
||||||
|
// cbVisibility
|
||||||
|
//
|
||||||
|
this.cbVisibility.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList;
|
||||||
|
this.cbVisibility.FormattingEnabled = true;
|
||||||
|
resources.ApplyResources(this.cbVisibility, "cbVisibility");
|
||||||
|
this.cbVisibility.Name = "cbVisibility";
|
||||||
|
//
|
||||||
|
// btnOK
|
||||||
|
//
|
||||||
|
resources.ApplyResources(this.btnOK, "btnOK");
|
||||||
|
this.btnOK.Name = "btnOK";
|
||||||
|
this.btnOK.UseVisualStyleBackColor = true;
|
||||||
|
this.btnOK.Click += new System.EventHandler(this.btnOK_Click);
|
||||||
|
//
|
||||||
|
// btnCancel
|
||||||
|
//
|
||||||
|
resources.ApplyResources(this.btnCancel, "btnCancel");
|
||||||
|
this.btnCancel.Name = "btnCancel";
|
||||||
|
this.btnCancel.UseVisualStyleBackColor = true;
|
||||||
|
this.btnCancel.Click += new System.EventHandler(this.btnCancel_Click);
|
||||||
|
//
|
||||||
|
// YouTubeVideoOptionsForm
|
||||||
|
//
|
||||||
|
resources.ApplyResources(this, "$this");
|
||||||
|
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
|
||||||
|
this.BackColor = System.Drawing.SystemColors.Window;
|
||||||
|
this.Controls.Add(this.btnCancel);
|
||||||
|
this.Controls.Add(this.btnOK);
|
||||||
|
this.Controls.Add(this.cbVisibility);
|
||||||
|
this.Controls.Add(this.txtDescription);
|
||||||
|
this.Controls.Add(this.txtTitle);
|
||||||
|
this.Controls.Add(this.lblVisibility);
|
||||||
|
this.Controls.Add(this.lblDescription);
|
||||||
|
this.Controls.Add(this.lblTitle);
|
||||||
|
this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedSingle;
|
||||||
|
this.MaximizeBox = false;
|
||||||
|
this.MinimizeBox = false;
|
||||||
|
this.Name = "YouTubeVideoOptionsForm";
|
||||||
|
this.ResumeLayout(false);
|
||||||
|
this.PerformLayout();
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
#endregion
|
||||||
|
|
||||||
|
private System.Windows.Forms.Label lblTitle;
|
||||||
|
private System.Windows.Forms.Label lblDescription;
|
||||||
|
private System.Windows.Forms.Label lblVisibility;
|
||||||
|
private System.Windows.Forms.TextBox txtTitle;
|
||||||
|
private System.Windows.Forms.TextBox txtDescription;
|
||||||
|
private System.Windows.Forms.ComboBox cbVisibility;
|
||||||
|
private System.Windows.Forms.Button btnOK;
|
||||||
|
private System.Windows.Forms.Button btnCancel;
|
||||||
|
}
|
||||||
|
}
|
68
ShareX.UploadersLib/Forms/YouTubeVideoOptionsForm.cs
Normal file
68
ShareX.UploadersLib/Forms/YouTubeVideoOptionsForm.cs
Normal file
|
@ -0,0 +1,68 @@
|
||||||
|
#region License Information (GPL v3)
|
||||||
|
|
||||||
|
/*
|
||||||
|
ShareX - A program that allows you to take screenshots and share any file type
|
||||||
|
Copyright (c) 2007-2021 ShareX Team
|
||||||
|
|
||||||
|
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 ShareX.HelpersLib;
|
||||||
|
using System.Windows.Forms;
|
||||||
|
|
||||||
|
namespace ShareX.UploadersLib
|
||||||
|
{
|
||||||
|
public partial class YouTubeVideoOptionsForm : Form
|
||||||
|
{
|
||||||
|
public string Title { get; private set; }
|
||||||
|
public string Description { get; private set; }
|
||||||
|
public YouTubeVideoPrivacy Visibility { get; private set; }
|
||||||
|
|
||||||
|
public YouTubeVideoOptionsForm(string title = "", string description = "", YouTubeVideoPrivacy visibility = YouTubeVideoPrivacy.Private)
|
||||||
|
{
|
||||||
|
InitializeComponent();
|
||||||
|
ShareXResources.ApplyTheme(this);
|
||||||
|
|
||||||
|
Title = title;
|
||||||
|
Description = description;
|
||||||
|
Visibility = visibility;
|
||||||
|
|
||||||
|
txtTitle.Text = title;
|
||||||
|
txtDescription.Text = description;
|
||||||
|
cbVisibility.Items.AddRange(Helpers.GetLocalizedEnumDescriptions<YouTubeVideoPrivacy>());
|
||||||
|
cbVisibility.SelectedIndex = (int)Visibility;
|
||||||
|
}
|
||||||
|
|
||||||
|
private void btnOK_Click(object sender, System.EventArgs e)
|
||||||
|
{
|
||||||
|
Title = txtTitle.Text;
|
||||||
|
Description = txtDescription.Text;
|
||||||
|
Visibility = (YouTubeVideoPrivacy)cbVisibility.SelectedIndex;
|
||||||
|
|
||||||
|
DialogResult = DialogResult.OK;
|
||||||
|
Close();
|
||||||
|
}
|
||||||
|
|
||||||
|
private void btnCancel_Click(object sender, System.EventArgs e)
|
||||||
|
{
|
||||||
|
DialogResult = DialogResult.Cancel;
|
||||||
|
Close();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
348
ShareX.UploadersLib/Forms/YouTubeVideoOptionsForm.resx
Normal file
348
ShareX.UploadersLib/Forms/YouTubeVideoOptionsForm.resx
Normal file
|
@ -0,0 +1,348 @@
|
||||||
|
<?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=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||||
|
</resheader>
|
||||||
|
<resheader name="writer">
|
||||||
|
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||||
|
</resheader>
|
||||||
|
<assembly alias="mscorlib" name="mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" />
|
||||||
|
<data name="lblTitle.AutoSize" type="System.Boolean, mscorlib">
|
||||||
|
<value>True</value>
|
||||||
|
</data>
|
||||||
|
<assembly alias="System.Drawing" name="System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />
|
||||||
|
<data name="lblTitle.Location" type="System.Drawing.Point, System.Drawing">
|
||||||
|
<value>10, 12</value>
|
||||||
|
</data>
|
||||||
|
<assembly alias="System.Windows.Forms" name="System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" />
|
||||||
|
<data name="lblTitle.Margin" type="System.Windows.Forms.Padding, System.Windows.Forms">
|
||||||
|
<value>4, 0, 4, 0</value>
|
||||||
|
</data>
|
||||||
|
<data name="lblTitle.Size" type="System.Drawing.Size, System.Drawing">
|
||||||
|
<value>36, 16</value>
|
||||||
|
</data>
|
||||||
|
<data name="lblTitle.TabIndex" type="System.Int32, mscorlib">
|
||||||
|
<value>0</value>
|
||||||
|
</data>
|
||||||
|
<data name="lblTitle.Text" xml:space="preserve">
|
||||||
|
<value>Title:</value>
|
||||||
|
</data>
|
||||||
|
<data name=">>lblTitle.Name" xml:space="preserve">
|
||||||
|
<value>lblTitle</value>
|
||||||
|
</data>
|
||||||
|
<data name=">>lblTitle.Type" xml:space="preserve">
|
||||||
|
<value>System.Windows.Forms.Label, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||||
|
</data>
|
||||||
|
<data name=">>lblTitle.Parent" xml:space="preserve">
|
||||||
|
<value>$this</value>
|
||||||
|
</data>
|
||||||
|
<data name=">>lblTitle.ZOrder" xml:space="preserve">
|
||||||
|
<value>7</value>
|
||||||
|
</data>
|
||||||
|
<data name="lblDescription.AutoSize" type="System.Boolean, mscorlib">
|
||||||
|
<value>True</value>
|
||||||
|
</data>
|
||||||
|
<data name="lblDescription.Location" type="System.Drawing.Point, System.Drawing">
|
||||||
|
<value>13, 64</value>
|
||||||
|
</data>
|
||||||
|
<data name="lblDescription.Size" type="System.Drawing.Size, System.Drawing">
|
||||||
|
<value>78, 16</value>
|
||||||
|
</data>
|
||||||
|
<data name="lblDescription.TabIndex" type="System.Int32, mscorlib">
|
||||||
|
<value>2</value>
|
||||||
|
</data>
|
||||||
|
<data name="lblDescription.Text" xml:space="preserve">
|
||||||
|
<value>Description:</value>
|
||||||
|
</data>
|
||||||
|
<data name=">>lblDescription.Name" xml:space="preserve">
|
||||||
|
<value>lblDescription</value>
|
||||||
|
</data>
|
||||||
|
<data name=">>lblDescription.Type" xml:space="preserve">
|
||||||
|
<value>System.Windows.Forms.Label, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||||
|
</data>
|
||||||
|
<data name=">>lblDescription.Parent" xml:space="preserve">
|
||||||
|
<value>$this</value>
|
||||||
|
</data>
|
||||||
|
<data name=">>lblDescription.ZOrder" xml:space="preserve">
|
||||||
|
<value>6</value>
|
||||||
|
</data>
|
||||||
|
<data name="lblVisibility.AutoSize" type="System.Boolean, mscorlib">
|
||||||
|
<value>True</value>
|
||||||
|
</data>
|
||||||
|
<data name="lblVisibility.Location" type="System.Drawing.Point, System.Drawing">
|
||||||
|
<value>13, 184</value>
|
||||||
|
</data>
|
||||||
|
<data name="lblVisibility.Size" type="System.Drawing.Size, System.Drawing">
|
||||||
|
<value>59, 16</value>
|
||||||
|
</data>
|
||||||
|
<data name="lblVisibility.TabIndex" type="System.Int32, mscorlib">
|
||||||
|
<value>4</value>
|
||||||
|
</data>
|
||||||
|
<data name="lblVisibility.Text" xml:space="preserve">
|
||||||
|
<value>Visibility:</value>
|
||||||
|
</data>
|
||||||
|
<data name=">>lblVisibility.Name" xml:space="preserve">
|
||||||
|
<value>lblVisibility</value>
|
||||||
|
</data>
|
||||||
|
<data name=">>lblVisibility.Type" xml:space="preserve">
|
||||||
|
<value>System.Windows.Forms.Label, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||||
|
</data>
|
||||||
|
<data name=">>lblVisibility.Parent" xml:space="preserve">
|
||||||
|
<value>$this</value>
|
||||||
|
</data>
|
||||||
|
<data name=">>lblVisibility.ZOrder" xml:space="preserve">
|
||||||
|
<value>5</value>
|
||||||
|
</data>
|
||||||
|
<data name="txtTitle.Location" type="System.Drawing.Point, System.Drawing">
|
||||||
|
<value>16, 32</value>
|
||||||
|
</data>
|
||||||
|
<data name="txtTitle.Size" type="System.Drawing.Size, System.Drawing">
|
||||||
|
<value>352, 22</value>
|
||||||
|
</data>
|
||||||
|
<data name="txtTitle.TabIndex" type="System.Int32, mscorlib">
|
||||||
|
<value>1</value>
|
||||||
|
</data>
|
||||||
|
<data name=">>txtTitle.Name" xml:space="preserve">
|
||||||
|
<value>txtTitle</value>
|
||||||
|
</data>
|
||||||
|
<data name=">>txtTitle.Type" xml:space="preserve">
|
||||||
|
<value>System.Windows.Forms.TextBox, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||||
|
</data>
|
||||||
|
<data name=">>txtTitle.Parent" xml:space="preserve">
|
||||||
|
<value>$this</value>
|
||||||
|
</data>
|
||||||
|
<data name=">>txtTitle.ZOrder" xml:space="preserve">
|
||||||
|
<value>4</value>
|
||||||
|
</data>
|
||||||
|
<data name="txtDescription.Location" type="System.Drawing.Point, System.Drawing">
|
||||||
|
<value>16, 88</value>
|
||||||
|
</data>
|
||||||
|
<data name="txtDescription.Multiline" type="System.Boolean, mscorlib">
|
||||||
|
<value>True</value>
|
||||||
|
</data>
|
||||||
|
<data name="txtDescription.Size" type="System.Drawing.Size, System.Drawing">
|
||||||
|
<value>352, 88</value>
|
||||||
|
</data>
|
||||||
|
<data name="txtDescription.TabIndex" type="System.Int32, mscorlib">
|
||||||
|
<value>3</value>
|
||||||
|
</data>
|
||||||
|
<data name=">>txtDescription.Name" xml:space="preserve">
|
||||||
|
<value>txtDescription</value>
|
||||||
|
</data>
|
||||||
|
<data name=">>txtDescription.Type" xml:space="preserve">
|
||||||
|
<value>System.Windows.Forms.TextBox, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||||
|
</data>
|
||||||
|
<data name=">>txtDescription.Parent" xml:space="preserve">
|
||||||
|
<value>$this</value>
|
||||||
|
</data>
|
||||||
|
<data name=">>txtDescription.ZOrder" xml:space="preserve">
|
||||||
|
<value>3</value>
|
||||||
|
</data>
|
||||||
|
<data name="cbVisibility.Location" type="System.Drawing.Point, System.Drawing">
|
||||||
|
<value>16, 208</value>
|
||||||
|
</data>
|
||||||
|
<data name="cbVisibility.Size" type="System.Drawing.Size, System.Drawing">
|
||||||
|
<value>352, 24</value>
|
||||||
|
</data>
|
||||||
|
<data name="cbVisibility.TabIndex" type="System.Int32, mscorlib">
|
||||||
|
<value>5</value>
|
||||||
|
</data>
|
||||||
|
<data name=">>cbVisibility.Name" xml:space="preserve">
|
||||||
|
<value>cbVisibility</value>
|
||||||
|
</data>
|
||||||
|
<data name=">>cbVisibility.Type" xml:space="preserve">
|
||||||
|
<value>System.Windows.Forms.ComboBox, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||||
|
</data>
|
||||||
|
<data name=">>cbVisibility.Parent" xml:space="preserve">
|
||||||
|
<value>$this</value>
|
||||||
|
</data>
|
||||||
|
<data name=">>cbVisibility.ZOrder" xml:space="preserve">
|
||||||
|
<value>2</value>
|
||||||
|
</data>
|
||||||
|
<data name="btnOK.Location" type="System.Drawing.Point, System.Drawing">
|
||||||
|
<value>120, 256</value>
|
||||||
|
</data>
|
||||||
|
<data name="btnOK.Size" type="System.Drawing.Size, System.Drawing">
|
||||||
|
<value>120, 32</value>
|
||||||
|
</data>
|
||||||
|
<data name="btnOK.TabIndex" type="System.Int32, mscorlib">
|
||||||
|
<value>6</value>
|
||||||
|
</data>
|
||||||
|
<data name="btnOK.Text" xml:space="preserve">
|
||||||
|
<value>OK</value>
|
||||||
|
</data>
|
||||||
|
<data name=">>btnOK.Name" xml:space="preserve">
|
||||||
|
<value>btnOK</value>
|
||||||
|
</data>
|
||||||
|
<data name=">>btnOK.Type" xml:space="preserve">
|
||||||
|
<value>System.Windows.Forms.Button, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||||
|
</data>
|
||||||
|
<data name=">>btnOK.Parent" xml:space="preserve">
|
||||||
|
<value>$this</value>
|
||||||
|
</data>
|
||||||
|
<data name=">>btnOK.ZOrder" xml:space="preserve">
|
||||||
|
<value>1</value>
|
||||||
|
</data>
|
||||||
|
<data name="btnCancel.Location" type="System.Drawing.Point, System.Drawing">
|
||||||
|
<value>248, 256</value>
|
||||||
|
</data>
|
||||||
|
<data name="btnCancel.Size" type="System.Drawing.Size, System.Drawing">
|
||||||
|
<value>120, 32</value>
|
||||||
|
</data>
|
||||||
|
<data name="btnCancel.TabIndex" type="System.Int32, mscorlib">
|
||||||
|
<value>7</value>
|
||||||
|
</data>
|
||||||
|
<data name="btnCancel.Text" xml:space="preserve">
|
||||||
|
<value>Cancel</value>
|
||||||
|
</data>
|
||||||
|
<data name=">>btnCancel.Name" xml:space="preserve">
|
||||||
|
<value>btnCancel</value>
|
||||||
|
</data>
|
||||||
|
<data name=">>btnCancel.Type" xml:space="preserve">
|
||||||
|
<value>System.Windows.Forms.Button, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||||
|
</data>
|
||||||
|
<data name=">>btnCancel.Parent" xml:space="preserve">
|
||||||
|
<value>$this</value>
|
||||||
|
</data>
|
||||||
|
<data name=">>btnCancel.ZOrder" xml:space="preserve">
|
||||||
|
<value>0</value>
|
||||||
|
</data>
|
||||||
|
<metadata name="$this.Localizable" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
|
||||||
|
<value>True</value>
|
||||||
|
</metadata>
|
||||||
|
<data name="$this.AutoScaleDimensions" type="System.Drawing.SizeF, System.Drawing">
|
||||||
|
<value>8, 16</value>
|
||||||
|
</data>
|
||||||
|
<data name="$this.ClientSize" type="System.Drawing.Size, System.Drawing">
|
||||||
|
<value>383, 301</value>
|
||||||
|
</data>
|
||||||
|
<data name="$this.Font" type="System.Drawing.Font, System.Drawing">
|
||||||
|
<value>Microsoft Sans Serif, 9.75pt</value>
|
||||||
|
</data>
|
||||||
|
<data name="$this.Margin" type="System.Windows.Forms.Padding, System.Windows.Forms">
|
||||||
|
<value>4, 4, 4, 4</value>
|
||||||
|
</data>
|
||||||
|
<data name="$this.StartPosition" type="System.Windows.Forms.FormStartPosition, System.Windows.Forms">
|
||||||
|
<value>CenterScreen</value>
|
||||||
|
</data>
|
||||||
|
<data name="$this.Text" xml:space="preserve">
|
||||||
|
<value>ShareX - YouTube video options</value>
|
||||||
|
</data>
|
||||||
|
<data name=">>$this.Name" xml:space="preserve">
|
||||||
|
<value>YouTubeVideoOptionsForm</value>
|
||||||
|
</data>
|
||||||
|
<data name=">>$this.Type" xml:space="preserve">
|
||||||
|
<value>System.Windows.Forms.Form, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||||
|
</data>
|
||||||
|
</root>
|
|
@ -228,6 +228,12 @@
|
||||||
<Compile Include="CustomUploader\CustomUploaderInput.cs" />
|
<Compile Include="CustomUploader\CustomUploaderInput.cs" />
|
||||||
<Compile Include="CustomUploader\CustomUploaderParser.cs" />
|
<Compile Include="CustomUploader\CustomUploaderParser.cs" />
|
||||||
<Compile Include="CustomUploader\CustomUploaderSyntaxInfo.cs" />
|
<Compile Include="CustomUploader\CustomUploaderSyntaxInfo.cs" />
|
||||||
|
<Compile Include="Forms\YouTubeVideoOptionsForm.cs">
|
||||||
|
<SubType>Form</SubType>
|
||||||
|
</Compile>
|
||||||
|
<Compile Include="Forms\YouTubeVideoOptionsForm.Designer.cs">
|
||||||
|
<DependentUpon>YouTubeVideoOptionsForm.cs</DependentUpon>
|
||||||
|
</Compile>
|
||||||
<Compile Include="Helpers\EscapeHelper.cs" />
|
<Compile Include="Helpers\EscapeHelper.cs" />
|
||||||
<Compile Include="Helpers\MimeTypes.cs" />
|
<Compile Include="Helpers\MimeTypes.cs" />
|
||||||
<Compile Include="Helpers\OCROptions.cs" />
|
<Compile Include="Helpers\OCROptions.cs" />
|
||||||
|
@ -967,6 +973,9 @@
|
||||||
<DependentUpon>TwitterTweetForm.cs</DependentUpon>
|
<DependentUpon>TwitterTweetForm.cs</DependentUpon>
|
||||||
<SubType>Designer</SubType>
|
<SubType>Designer</SubType>
|
||||||
</EmbeddedResource>
|
</EmbeddedResource>
|
||||||
|
<EmbeddedResource Include="Forms\YouTubeVideoOptionsForm.resx">
|
||||||
|
<DependentUpon>YouTubeVideoOptionsForm.cs</DependentUpon>
|
||||||
|
</EmbeddedResource>
|
||||||
<EmbeddedResource Include="Properties\Resources.de.resx">
|
<EmbeddedResource Include="Properties\Resources.de.resx">
|
||||||
<SubType>Designer</SubType>
|
<SubType>Designer</SubType>
|
||||||
</EmbeddedResource>
|
</EmbeddedResource>
|
||||||
|
|
|
@ -424,6 +424,7 @@ public class UploadersConfig : SettingsBase<UploadersConfig>
|
||||||
public OAuth2Info YouTubeOAuth2Info { get; set; } = null;
|
public OAuth2Info YouTubeOAuth2Info { get; set; } = null;
|
||||||
public YouTubeVideoPrivacy YouTubePrivacyType { get; set; } = YouTubeVideoPrivacy.Public;
|
public YouTubeVideoPrivacy YouTubePrivacyType { get; set; } = YouTubeVideoPrivacy.Public;
|
||||||
public bool YouTubeUseShortenedLink { get; set; } = false;
|
public bool YouTubeUseShortenedLink { get; set; } = false;
|
||||||
|
public bool YouTubeShowDialog { get; set; } = false;
|
||||||
|
|
||||||
#endregion YouTube
|
#endregion YouTube
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue