Merge remote-tracking branch 'refs/remotes/ShareX/master'

This commit is contained in:
Jevan Pipitone 2016-02-10 21:07:26 +11:00
commit 3a161eb131
49 changed files with 1632 additions and 457 deletions

Binary file not shown.

Binary file not shown.

View file

@ -118,7 +118,7 @@
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value> <value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader> </resheader>
<data name="$this.Text" xml:space="preserve"> <data name="$this.Text" xml:space="preserve">
<value>Gradiente</value> <value>Degradê</value>
</data> </data>
<data name="btnAdd.Text" xml:space="preserve"> <data name="btnAdd.Text" xml:space="preserve">
<value>Adicionar</value> <value>Adicionar</value>
@ -139,7 +139,7 @@
<value>Local</value> <value>Local</value>
</data> </data>
<data name="lblGradientType.Text" xml:space="preserve"> <data name="lblGradientType.Text" xml:space="preserve">
<value>Tipo de gradiente:</value> <value>Tipo de degradê:</value>
</data> </data>
<data name="lblLocation.Text" xml:space="preserve"> <data name="lblLocation.Text" xml:space="preserve">
<value>Local:</value> <value>Local:</value>

View file

@ -130,7 +130,7 @@
<value>Salvar como arquivo...</value> <value>Salvar como arquivo...</value>
</data> </data>
<data name="tsmiExportUpload.Text" xml:space="preserve"> <data name="tsmiExportUpload.Text" xml:space="preserve">
<value>Upload como texto</value> <value>Enviar como texto</value>
</data> </data>
<data name="tsmiImportClipboard.Text" xml:space="preserve"> <data name="tsmiImportClipboard.Text" xml:space="preserve">
<value>Da área de transferência</value> <value>Da área de transferência</value>

View file

@ -62,11 +62,11 @@ public static bool ExtractFFmpeg(string zipPath, string extractPath)
{ {
if (NativeMethods.Is64Bit()) if (NativeMethods.Is64Bit())
{ {
SevenZipExtractor.SetLibraryPath(Path.Combine(Application.StartupPath, "7z-x64.dll")); SevenZipExtractor.SetLibraryPath(Path.Combine(AppDomain.CurrentDomain.BaseDirectory, "7z-x64.dll"));
} }
else else
{ {
SevenZipExtractor.SetLibraryPath(Path.Combine(Application.StartupPath, "7z.dll")); SevenZipExtractor.SetLibraryPath(Path.Combine(AppDomain.CurrentDomain.BaseDirectory, "7z.dll"));
} }
Helpers.CreateDirectoryIfNotExist(extractPath); Helpers.CreateDirectoryIfNotExist(extractPath);

View file

@ -118,7 +118,7 @@
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value> <value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader> </resheader>
<data name="$this.Text" xml:space="preserve"> <data name="$this.Text" xml:space="preserve">
<value>Verificação de hash</value> <value>Conferir hash</value>
</data> </data>
<data name="btnFilePathBrowse.Text" xml:space="preserve"> <data name="btnFilePathBrowse.Text" xml:space="preserve">
<value>Procurar...</value> <value>Procurar...</value>
@ -138,4 +138,34 @@
<data name="lblTarget.Text" xml:space="preserve"> <data name="lblTarget.Text" xml:space="preserve">
<value>Destino:</value> <value>Destino:</value>
</data> </data>
<data name="tpFileHashCheck.Text" xml:space="preserve">
<value>Verificar hash de arquivo</value>
</data>
<data name="btnHashCheckCopyAll.Text" xml:space="preserve">
<value>Copiar tudo</value>
</data>
<data name="btnHashCheckDecodeBase64.Text" xml:space="preserve">
<value>Decifrar</value>
</data>
<data name="btnHashCheckDecodeASCII.Text" xml:space="preserve">
<value>Decifrar</value>
</data>
<data name="btnHashCheckDecodeHex.Text" xml:space="preserve">
<value>Decifrar</value>
</data>
<data name="btnHashCheckDecodeBinary.Text" xml:space="preserve">
<value>Decifrar</value>
</data>
<data name="lblHashCheckBinary.Text" xml:space="preserve">
<value>Binário:</value>
</data>
<data name="btnHashCheckEncodeText.Text" xml:space="preserve">
<value>Codificar</value>
</data>
<data name="lblHashCheckText.Text" xml:space="preserve">
<value>Texto:</value>
</data>
<data name="tpTextConversions.Text" xml:space="preserve">
<value>Conversões de texto</value>
</data>
</root> </root>

View file

@ -133,7 +133,7 @@
<value>Permitir que a imagem alargue</value> <value>Permitir que a imagem alargue</value>
</data> </data>
<data name="cbAutoRotate.Text" xml:space="preserve"> <data name="cbAutoRotate.Text" xml:space="preserve">
<value>Auto rotação da imagem</value> <value>Girar imagem</value>
</data> </data>
<data name="lblMargin.Text" xml:space="preserve"> <data name="lblMargin.Text" xml:space="preserve">
<value>Margem:</value> <value>Margem:</value>
@ -142,6 +142,6 @@
<value>Centralizar posição da imagem</value> <value>Centralizar posição da imagem</value>
</data> </data>
<data name="cbAutoScale.Text" xml:space="preserve"> <data name="cbAutoScale.Text" xml:space="preserve">
<value>Auto escala da imagem</value> <value>Redimensionar imagem</value>
</data> </data>
</root> </root>

View file

@ -205,6 +205,15 @@ internal class Resources {
} }
} }
/// <summary>
/// Looks up a localized string similar to Show quick task menu.
/// </summary>
internal static string AfterCaptureTasks_ShowQuickTaskMenu {
get {
return ResourceManager.GetString("AfterCaptureTasks_ShowQuickTaskMenu", resourceCulture);
}
}
/// <summary> /// <summary>
/// Looks up a localized string similar to Upload image to host. /// Looks up a localized string similar to Upload image to host.
/// </summary> /// </summary>

View file

@ -860,4 +860,7 @@ Would you like to download it?</value>
<data name="AfterUploadTasks_ShowAfterUploadWindow" xml:space="preserve"> <data name="AfterUploadTasks_ShowAfterUploadWindow" xml:space="preserve">
<value>Show "After upload" window</value> <value>Show "After upload" window</value>
</data> </data>
<data name="AfterCaptureTasks_ShowQuickTaskMenu" xml:space="preserve">
<value>Show quick task menu</value>
</data>
</root> </root>

View file

@ -133,6 +133,6 @@
<value>Progresso:</value> <value>Progresso:</value>
</data> </data>
<data name="lblStatus.Text" xml:space="preserve"> <data name="lblStatus.Text" xml:space="preserve">
<value>Status:</value> <value>Estado:</value>
</data> </data>
</root> </root>

View file

@ -127,6 +127,6 @@
<value>Não perguntar de novo até a próxima inicialização do programa</value> <value>Não perguntar de novo até a próxima inicialização do programa</value>
</data> </data>
<data name="lblViewChangelog.Text" xml:space="preserve"> <data name="lblViewChangelog.Text" xml:space="preserve">
<value>Ver log de mudanças</value> <value>Ver registro de alterações</value>
</data> </data>
</root> </root>

View file

@ -139,13 +139,13 @@
<value>Arquivo</value> <value>Arquivo</value>
</data> </data>
<data name="HistoryItemManager_InitializeComponent_File_name" xml:space="preserve"> <data name="HistoryItemManager_InitializeComponent_File_name" xml:space="preserve">
<value>Nome do arquivo</value> <value>Arquivo</value>
</data> </data>
<data name="HistoryItemManager_InitializeComponent_File_name_with_extension" xml:space="preserve"> <data name="HistoryItemManager_InitializeComponent_File_name_with_extension" xml:space="preserve">
<value>Nome do arquivo com extensão</value> <value>Nome do arquivo com extensão</value>
</data> </data>
<data name="HistoryItemManager_InitializeComponent_File_path" xml:space="preserve"> <data name="HistoryItemManager_InitializeComponent_File_path" xml:space="preserve">
<value>Local do arquivo</value> <value>Local</value>
</data> </data>
<data name="HistoryItemManager_InitializeComponent_Folder" xml:space="preserve"> <data name="HistoryItemManager_InitializeComponent_Folder" xml:space="preserve">
<value>Pasta</value> <value>Pasta</value>

View file

@ -50,7 +50,7 @@ public class Pomf : FileUploader
new PomfUploader("http://g.zxq.co/upload.php", "http://y.zxq.co"), new PomfUploader("http://g.zxq.co/upload.php", "http://y.zxq.co"),
new PomfUploader("http://glop.me/upload.php", "http://gateway.glop.me/ipfs"), new PomfUploader("http://glop.me/upload.php", "http://gateway.glop.me/ipfs"),
new PomfUploader("http://kyaa.sg/upload.php", "https://r.kyaa.sg"), new PomfUploader("http://kyaa.sg/upload.php", "https://r.kyaa.sg"),
new PomfUploader("https://maxfile.ro/static/upload.php", "https://d.maxfile.ro"), new PomfUploader("https://maxfile.ro/static/upload.php", "https://d2.maxfile.ro"),
new PomfUploader("https://mixtape.moe/upload.php"), new PomfUploader("https://mixtape.moe/upload.php"),
new PomfUploader("https://nigger.cat/upload.php"), new PomfUploader("https://nigger.cat/upload.php"),
new PomfUploader("https://pomf.cat/upload.php", "https://a.pomf.cat"), new PomfUploader("https://pomf.cat/upload.php", "https://a.pomf.cat"),

View file

@ -32,7 +32,7 @@ public sealed class VgymeUploader : ImageUploader
{ {
public override UploadResult Upload(Stream stream, string fileName) public override UploadResult Upload(Stream stream, string fileName)
{ {
UploadResult result = UploadData(stream, "http://vgy.me/upload", fileName); UploadResult result = UploadData(stream, "https://vgy.me/upload", fileName);
if (result.IsSuccess) if (result.IsSuccess)
{ {

View file

@ -43,6 +43,7 @@ public class ApplicationConfig : SettingsBase<ApplicationConfig>
public int NameParserAutoIncrementNumber = 0; public int NameParserAutoIncrementNumber = 0;
public RecentItem[] RecentLinks = null; public RecentItem[] RecentLinks = null;
public bool DisableHotkeys = false; public bool DisableHotkeys = false;
public List<QuickTaskInfo> QuickTaskPresets = QuickTaskInfo.DefaultPresets;
public ApplicationConfig() public ApplicationConfig()
{ {
@ -82,6 +83,14 @@ public ApplicationConfig()
#endregion Paths #endregion Paths
#region Export / Import
public bool ExportSettings = true;
public bool ExportHistory = true;
public bool ExportLogs = false;
#endregion Export / Import
#region Proxy #region Proxy
public ProxyInfo ProxySettings = new ProxyInfo(); public ProxyInfo ProxySettings = new ProxyInfo();

View file

@ -1,46 +0,0 @@
#region License Information (GPL v3)
/*
ShareX - A program that allows you to take screenshots and share any file type
Copyright (c) 2007-2016 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 System.Drawing;
namespace ShareX
{
public class CompanionCube
{
public bool IsActive { get; set; }
public Point Location { get; set; }
public Size Size { get; set; }
public Rectangle Rectangle => new Rectangle(Location, Size);
public Point Center => new Point(Location.X + (Size.Width / 2), Location.Y + (Size.Height / 2));
public int Speed { get; set; }
public CompanionCube(int size, int speed)
{
Size = new Size(size, size);
Speed = speed;
IsActive = true;
}
}
}

View file

@ -1,189 +0,0 @@
#region License Information (GPL v3)
/*
ShareX - A program that allows you to take screenshots and share any file type
Copyright (c) 2007-2016 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 ShareX.Properties;
using System;
using System.Collections.Generic;
using System.Diagnostics;
using System.Drawing;
using System.Linq;
using System.Windows.Forms;
namespace ShareX
{
public static class CompanionCubeManager
{
public static bool IsActive { get; set; }
public static int CubeCount { get; } = 50;
public static List<CompanionCube> Cubes { get; private set; }
private static CompanionCubesForm cubesForm;
private static Timer timer;
private static Stopwatch startTime;
private static TimeSpan previousElapsed;
private static Rectangle area;
private static Bitmap companionCube;
public static void Toggle()
{
if (!IsActive)
{
Start();
}
else
{
Stop();
}
}
public static void Start()
{
if (!IsActive)
{
IsActive = true;
companionCube = Resources.CompanionCube;
if (cubesForm != null) cubesForm.Close();
cubesForm = new CompanionCubesForm();
cubesForm.MouseClick += CubesForm_MouseClick;
cubesForm.Show();
area = new Rectangle(0, 0, cubesForm.Width, cubesForm.Height);
Cubes = new List<CompanionCube>(CubeCount);
for (int i = 0; i < CubeCount; i++)
{
CompanionCube cube = new CompanionCube(MathHelpers.Random(50, 100), MathHelpers.Random(250, 500));
cube.Location = new Point(MathHelpers.Random(area.X, area.X + area.Width - cube.Size.Width),
MathHelpers.Random(area.Y - cube.Size.Height - 500, area.Y - cube.Size.Height));
Cubes.Add(cube);
}
previousElapsed = TimeSpan.Zero;
startTime = Stopwatch.StartNew();
timer = new Timer();
timer.Interval = 20;
timer.Tick += Timer_Tick;
timer.Start();
}
}
private static void CubesForm_MouseClick(object sender, MouseEventArgs e)
{
foreach (CompanionCube cube in Cubes.Where(x => x.Rectangle.Contains(e.Location)))
{
cube.IsActive = false;
}
}
public static void Stop()
{
if (IsActive)
{
if (timer != null)
{
timer.Dispose();
timer = null;
}
if (cubesForm != null)
{
cubesForm.Close();
cubesForm = null;
}
if (companionCube != null)
{
companionCube.Dispose();
companionCube = null;
}
if (Cubes != null)
{
Cubes.Clear();
Cubes = null;
}
IsActive = false;
}
}
private static void Timer_Tick(object sender, EventArgs e)
{
TimeSpan elapsed = startTime.Elapsed - previousElapsed;
previousElapsed = startTime.Elapsed;
IEnumerable<CompanionCube> cubes = Cubes.Where(x => x.IsActive).OrderBy(x => x.Rectangle.Bottom);
foreach (CompanionCube cube in cubes)
{
int velocityY = (int)(cube.Speed * elapsed.TotalSeconds);
Point newLocation = new Point(cube.Location.X, cube.Location.Y + velocityY);
Rectangle newRectangle = new Rectangle(newLocation, cube.Size);
bool intersect = false;
foreach (CompanionCube cube2 in cubes)
{
if (cube != cube2 && (newRectangle.IntersectsWith(cube2.Rectangle) || cube.Rectangle.IntersectsWith(cube2.Rectangle)))
{
intersect = true;
newLocation = new Point(cube.Location.X, cube2.Location.Y - cube.Size.Height);
break;
}
}
if (!intersect && newLocation.Y + cube.Size.Height > area.Y + area.Height)
{
newLocation = new Point(cube.Location.X, area.Height - cube.Size.Height);
}
cube.Location = newLocation;
}
DrawCubes();
}
private static void DrawCubes()
{
using (Bitmap surface = new Bitmap(area.Width, area.Height))
using (Graphics g = Graphics.FromImage(surface))
{
foreach (CompanionCube cube in Cubes)
{
if (cube.IsActive && area.IntersectsWith(cube.Rectangle))
{
g.DrawImage(companionCube, new Rectangle(cube.Location, cube.Size));
}
}
cubesForm.SelectBitmap(surface);
}
}
}
}

View file

@ -90,21 +90,22 @@ public enum TaskStatus
public enum AfterCaptureTasks // Localized public enum AfterCaptureTasks // Localized
{ {
None = 0, None = 0,
ShowAfterCaptureWindow = 1, ShowQuickTaskMenu = 1,
AddImageEffects = 1 << 1, ShowAfterCaptureWindow = 1 << 1,
AnnotateImage = 1 << 2, AddImageEffects = 1 << 2,
CopyImageToClipboard = 1 << 3, AnnotateImage = 1 << 3,
SendImageToPrinter = 1 << 4, CopyImageToClipboard = 1 << 4,
SaveImageToFile = 1 << 5, SendImageToPrinter = 1 << 5,
SaveImageToFileWithDialog = 1 << 6, SaveImageToFile = 1 << 6,
SaveThumbnailImageToFile = 1 << 7, SaveImageToFileWithDialog = 1 << 7,
PerformActions = 1 << 8, SaveThumbnailImageToFile = 1 << 8,
CopyFileToClipboard = 1 << 9, PerformActions = 1 << 9,
CopyFilePathToClipboard = 1 << 10, CopyFileToClipboard = 1 << 10,
ShowInExplorer = 1 << 11, CopyFilePathToClipboard = 1 << 11,
ShowBeforeUploadWindow = 1 << 12, ShowInExplorer = 1 << 12,
UploadImageToHost = 1 << 13, ShowBeforeUploadWindow = 1 << 13,
DeleteFile = 1 << 14 UploadImageToHost = 1 << 14,
DeleteFile = 1 << 15
} }
[Flags] [Flags]

View file

@ -0,0 +1,148 @@
#region License Information (GPL v3)
/*
ShareX - A program that allows you to take screenshots and share any file type
Copyright (c) 2007-2016 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 SevenZip;
using ShareX.HelpersLib;
using System;
using System.Collections.Generic;
using System.IO;
using System.Linq;
using System.Text;
using System.Windows.Forms;
namespace ShareX
{
public static class ExportImportManager
{
public static bool Export()
{
try
{
string exportFolder;
using (FolderSelectDialog dlg = new FolderSelectDialog())
{
if (dlg.ShowDialog())
{
exportFolder = dlg.FileName;
}
else
{
return false;
}
}
Set7ZipLibraryPath();
SevenZipCompressor zip = new SevenZipCompressor();
zip.ArchiveFormat = OutArchiveFormat.SevenZip;
zip.CompressionLevel = CompressionLevel.Ultra;
zip.CompressionMethod = CompressionMethod.Lzma2;
Dictionary<string, string> files = new Dictionary<string, string>();
if (Program.Settings.ExportSettings)
{
AddFileToDictionary(files, Program.ApplicationConfigFilePath);
AddFileToDictionary(files, Program.HotkeysConfigFilePath);
AddFileToDictionary(files, Program.UploadersConfigFilePath);
AddFileToDictionary(files, Program.GreenshotImageEditorConfigFilePath);
}
if (Program.Settings.ExportHistory)
{
AddFileToDictionary(files, Program.HistoryFilePath);
}
if (Program.Settings.ExportLogs)
{
foreach (string file in Directory.GetFiles(Program.LogsFolder, "*.txt", SearchOption.TopDirectoryOnly))
{
AddFileToDictionary(files, file, Path.GetFileName(Program.LogsFolder));
}
}
string exportPath = Path.Combine(exportFolder, "ShareX_backup.sxb");
zip.CompressFileDictionary(files, exportPath);
return true;
}
catch (Exception e)
{
DebugHelper.WriteException(e);
MessageBox.Show("Error while exporting backup:\r\n\r\n" + e, "ShareX - Error", MessageBoxButtons.OK, MessageBoxIcon.Error);
}
return false;
}
private static void AddFileToDictionary(Dictionary<string, string> files, string filePath, string subFolder = null)
{
string destinationPath = Path.GetFileName(filePath);
if (!string.IsNullOrEmpty(subFolder))
{
destinationPath = Path.Combine(subFolder, destinationPath);
}
files.Add(destinationPath, filePath);
}
public static bool Import(string filePath)
{
try
{
Set7ZipLibraryPath();
Helpers.CreateDirectoryIfNotExist(filePath);
using (SevenZipExtractor zip = new SevenZipExtractor(filePath))
{
// TODO
return true;
}
}
catch (Exception e)
{
DebugHelper.WriteException(e);
MessageBox.Show("Error while importing backup:\r\n\r\n" + e, "ShareX - Error", MessageBoxButtons.OK, MessageBoxIcon.Error);
}
return false;
}
private static void Set7ZipLibraryPath()
{
if (NativeMethods.Is64Bit())
{
SevenZipBase.SetLibraryPath(Path.Combine(AppDomain.CurrentDomain.BaseDirectory, "7z-x64.dll"));
}
else
{
SevenZipBase.SetLibraryPath(Path.Combine(AppDomain.CurrentDomain.BaseDirectory, "7z.dll"));
}
}
}
}

View file

@ -193,7 +193,6 @@ private void InitializeComponent()
this.Controls.Add(this.cLogo); this.Controls.Add(this.cLogo);
this.MaximizeBox = false; this.MaximizeBox = false;
this.Name = "AboutForm"; this.Name = "AboutForm";
this.FormClosed += new System.Windows.Forms.FormClosedEventHandler(this.AboutForm_FormClosed);
this.Shown += new System.EventHandler(this.AboutForm_Shown); this.Shown += new System.EventHandler(this.AboutForm_Shown);
((System.ComponentModel.ISupportInitialize)(this.pbMikeURL)).EndInit(); ((System.ComponentModel.ISupportInitialize)(this.pbMikeURL)).EndInit();
((System.ComponentModel.ISupportInitialize)(this.pbAU)).EndInit(); ((System.ComponentModel.ISupportInitialize)(this.pbAU)).EndInit();

View file

@ -158,11 +158,6 @@ private void rtb_LinkClicked(object sender, LinkClickedEventArgs e)
URLHelpers.OpenURL(e.LinkText); URLHelpers.OpenURL(e.LinkText);
} }
private void AboutForm_FormClosed(object sender, FormClosedEventArgs e)
{
CompanionCubeManager.Stop();
}
#region Animation #region Animation
private const int w = 200; private const int w = 200;
@ -245,20 +240,6 @@ private void cLogo_Draw(Graphics g)
private void cLogo_MouseDown(object sender, MouseEventArgs e) private void cLogo_MouseDown(object sender, MouseEventArgs e)
{ {
#if STEAM
if (e.Button == MouseButtons.Middle)
{
cLogo.Stop();
CompanionCubeManager.Toggle();
return;
}
if (CompanionCubeManager.IsActive)
{
CompanionCubeManager.Stop();
}
#endif
if (!isEasterEggStarted) if (!isEasterEggStarted)
{ {
isPaused = !isPaused; isPaused = !isPaused;

View file

@ -212,7 +212,7 @@
</data> </data>
<data name="rtbCredits.Text" xml:space="preserve"> <data name="rtbCredits.Text" xml:space="preserve">
<value /> <value />
<comment>@Invariant</comment></data> </data>
<data name="rtbCredits.WordWrap" type="System.Boolean, mscorlib"> <data name="rtbCredits.WordWrap" type="System.Boolean, mscorlib">
<value>False</value> <value>False</value>
</data> </data>
@ -239,7 +239,7 @@
</data> </data>
<data name="rtbShareXInfo.Text" xml:space="preserve"> <data name="rtbShareXInfo.Text" xml:space="preserve">
<value /> <value />
<comment>@Invariant</comment></data> </data>
<data name="&gt;&gt;rtbShareXInfo.Name" xml:space="preserve"> <data name="&gt;&gt;rtbShareXInfo.Name" xml:space="preserve">
<value>rtbShareXInfo</value> <value>rtbShareXInfo</value>
</data> </data>

View file

@ -78,7 +78,7 @@ private bool IsChecked(ListViewItem lvi)
private void AddAfterCaptureItems(AfterCaptureTasks afterCaptureTasks) private void AddAfterCaptureItems(AfterCaptureTasks afterCaptureTasks)
{ {
AfterCaptureTasks[] ignore = new AfterCaptureTasks[] { AfterCaptureTasks.None, AfterCaptureTasks.ShowAfterCaptureWindow }; AfterCaptureTasks[] ignore = new AfterCaptureTasks[] { AfterCaptureTasks.None, AfterCaptureTasks.ShowQuickTaskMenu, AfterCaptureTasks.ShowAfterCaptureWindow };
foreach (AfterCaptureTasks task in Helpers.GetEnums<AfterCaptureTasks>()) foreach (AfterCaptureTasks task in Helpers.GetEnums<AfterCaptureTasks>())
{ {

View file

@ -114,6 +114,12 @@ private void InitializeComponent()
this.tpAdvanced = new System.Windows.Forms.TabPage(); this.tpAdvanced = new System.Windows.Forms.TabPage();
this.pgSettings = new System.Windows.Forms.PropertyGrid(); this.pgSettings = new System.Windows.Forms.PropertyGrid();
this.tttvMain = new ShareX.HelpersLib.TabToTreeView(); this.tttvMain = new ShareX.HelpersLib.TabToTreeView();
this.tpExportImport = new System.Windows.Forms.TabPage();
this.cbExportSettings = new System.Windows.Forms.CheckBox();
this.cbExportHistory = new System.Windows.Forms.CheckBox();
this.cbExportLogs = new System.Windows.Forms.CheckBox();
this.btnExport = new System.Windows.Forms.Button();
this.btnImport = new System.Windows.Forms.Button();
this.tcSettings.SuspendLayout(); this.tcSettings.SuspendLayout();
this.tpGeneral.SuspendLayout(); this.tpGeneral.SuspendLayout();
this.tpIntegration.SuspendLayout(); this.tpIntegration.SuspendLayout();
@ -137,6 +143,7 @@ private void InitializeComponent()
((System.ComponentModel.ISupportInitialize)(this.nudRetryUpload)).BeginInit(); ((System.ComponentModel.ISupportInitialize)(this.nudRetryUpload)).BeginInit();
this.tpPrint.SuspendLayout(); this.tpPrint.SuspendLayout();
this.tpAdvanced.SuspendLayout(); this.tpAdvanced.SuspendLayout();
this.tpExportImport.SuspendLayout();
this.SuspendLayout(); this.SuspendLayout();
// //
// tcSettings // tcSettings
@ -145,6 +152,7 @@ private void InitializeComponent()
this.tcSettings.Controls.Add(this.tpGeneral); this.tcSettings.Controls.Add(this.tpGeneral);
this.tcSettings.Controls.Add(this.tpIntegration); this.tcSettings.Controls.Add(this.tpIntegration);
this.tcSettings.Controls.Add(this.tpPaths); this.tcSettings.Controls.Add(this.tpPaths);
this.tcSettings.Controls.Add(this.tpExportImport);
this.tcSettings.Controls.Add(this.tpProxy); this.tcSettings.Controls.Add(this.tpProxy);
this.tcSettings.Controls.Add(this.tpUpload); this.tcSettings.Controls.Add(this.tpUpload);
this.tcSettings.Controls.Add(this.tpPrint); this.tcSettings.Controls.Add(this.tpPrint);
@ -769,6 +777,52 @@ private void InitializeComponent()
this.tttvMain.TreeViewFont = new System.Drawing.Font("Microsoft Sans Serif", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(162))); this.tttvMain.TreeViewFont = new System.Drawing.Font("Microsoft Sans Serif", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(162)));
this.tttvMain.TreeViewSize = 175; this.tttvMain.TreeViewSize = 175;
// //
// tpExportImport
//
this.tpExportImport.Controls.Add(this.btnImport);
this.tpExportImport.Controls.Add(this.btnExport);
this.tpExportImport.Controls.Add(this.cbExportLogs);
this.tpExportImport.Controls.Add(this.cbExportHistory);
this.tpExportImport.Controls.Add(this.cbExportSettings);
resources.ApplyResources(this.tpExportImport, "tpExportImport");
this.tpExportImport.Name = "tpExportImport";
this.tpExportImport.UseVisualStyleBackColor = true;
//
// cbExportSettings
//
resources.ApplyResources(this.cbExportSettings, "cbExportSettings");
this.cbExportSettings.Name = "cbExportSettings";
this.cbExportSettings.UseVisualStyleBackColor = true;
this.cbExportSettings.CheckedChanged += new System.EventHandler(this.cbExportSettings_CheckedChanged);
//
// cbExportHistory
//
resources.ApplyResources(this.cbExportHistory, "cbExportHistory");
this.cbExportHistory.Name = "cbExportHistory";
this.cbExportHistory.UseVisualStyleBackColor = true;
this.cbExportHistory.CheckedChanged += new System.EventHandler(this.cbExportHistory_CheckedChanged);
//
// cbExportLogs
//
resources.ApplyResources(this.cbExportLogs, "cbExportLogs");
this.cbExportLogs.Name = "cbExportLogs";
this.cbExportLogs.UseVisualStyleBackColor = true;
this.cbExportLogs.CheckedChanged += new System.EventHandler(this.cbExportLogs_CheckedChanged);
//
// btnExport
//
resources.ApplyResources(this.btnExport, "btnExport");
this.btnExport.Name = "btnExport";
this.btnExport.UseVisualStyleBackColor = true;
this.btnExport.Click += new System.EventHandler(this.btnExport_Click);
//
// btnImport
//
resources.ApplyResources(this.btnImport, "btnImport");
this.btnImport.Name = "btnImport";
this.btnImport.UseVisualStyleBackColor = true;
this.btnImport.Click += new System.EventHandler(this.btnImport_Click);
//
// ApplicationSettingsForm // ApplicationSettingsForm
// //
resources.ApplyResources(this, "$this"); resources.ApplyResources(this, "$this");
@ -812,6 +866,8 @@ private void InitializeComponent()
this.tpPrint.ResumeLayout(false); this.tpPrint.ResumeLayout(false);
this.tpPrint.PerformLayout(); this.tpPrint.PerformLayout();
this.tpAdvanced.ResumeLayout(false); this.tpAdvanced.ResumeLayout(false);
this.tpExportImport.ResumeLayout(false);
this.tpExportImport.PerformLayout();
this.ResumeLayout(false); this.ResumeLayout(false);
} }
@ -903,5 +959,11 @@ private void InitializeComponent()
private System.Windows.Forms.CheckBox cbSteamShowInApp; private System.Windows.Forms.CheckBox cbSteamShowInApp;
private System.Windows.Forms.TabPage tpIntegration; private System.Windows.Forms.TabPage tpIntegration;
private System.Windows.Forms.GroupBox gbSteam; private System.Windows.Forms.GroupBox gbSteam;
private System.Windows.Forms.TabPage tpExportImport;
private System.Windows.Forms.Button btnImport;
private System.Windows.Forms.Button btnExport;
private System.Windows.Forms.CheckBox cbExportLogs;
private System.Windows.Forms.CheckBox cbExportHistory;
private System.Windows.Forms.CheckBox cbExportSettings;
} }
} }

View file

@ -91,6 +91,11 @@ private void LoadSettings()
CodeMenu.Create<ReplCodeMenuEntry>(txtSaveImageSubFolderPattern, ReplCodeMenuEntry.t, ReplCodeMenuEntry.pn, ReplCodeMenuEntry.i, CodeMenu.Create<ReplCodeMenuEntry>(txtSaveImageSubFolderPattern, ReplCodeMenuEntry.t, ReplCodeMenuEntry.pn, ReplCodeMenuEntry.i,
ReplCodeMenuEntry.width, ReplCodeMenuEntry.height, ReplCodeMenuEntry.n); ReplCodeMenuEntry.width, ReplCodeMenuEntry.height, ReplCodeMenuEntry.n);
// Export / Import
cbExportSettings.Checked = Program.Settings.ExportSettings;
cbExportHistory.Checked = Program.Settings.ExportHistory;
cbExportLogs.Checked = Program.Settings.ExportLogs;
// Proxy // Proxy
cbProxyMethod.Items.AddRange(Helpers.GetLocalizedEnumDescriptions<ProxyMethod>()); cbProxyMethod.Items.AddRange(Helpers.GetLocalizedEnumDescriptions<ProxyMethod>());
cbProxyMethod.SelectedIndex = (int)Program.Settings.ProxySettings.ProxyMethod; cbProxyMethod.SelectedIndex = (int)Program.Settings.ProxySettings.ProxyMethod;
@ -399,6 +404,34 @@ private void btnOpenScreenshotsFolder_Click(object sender, EventArgs e)
#endregion Paths #endregion Paths
#region Export / Import
private void cbExportSettings_CheckedChanged(object sender, EventArgs e)
{
Program.Settings.ExportSettings = cbExportSettings.Checked;
}
private void cbExportHistory_CheckedChanged(object sender, EventArgs e)
{
Program.Settings.ExportHistory = cbExportHistory.Checked;
}
private void cbExportLogs_CheckedChanged(object sender, EventArgs e)
{
Program.Settings.ExportLogs = cbExportLogs.Checked;
}
private void btnExport_Click(object sender, EventArgs e)
{
ExportImportManager.Export();
}
private void btnImport_Click(object sender, EventArgs e)
{
}
#endregion Export / Import
#region Proxy #region Proxy
private void cbProxyMethod_SelectedIndexChanged(object sender, EventArgs e) private void cbProxyMethod_SelectedIndexChanged(object sender, EventArgs e)

View file

@ -148,7 +148,7 @@
<value>Não abrir a janela de configurações de impressão da imagem</value> <value>Não abrir a janela de configurações de impressão da imagem</value>
</data> </data>
<data name="cbIfUploadFailRetryOnce.Text" xml:space="preserve"> <data name="cbIfUploadFailRetryOnce.Text" xml:space="preserve">
<value>Número de tentativas se o upload falhar:</value> <value>Número de tentativas se o envio falhar:</value>
</data> </data>
<data name="cbPrintDontShowWindowsDialog.Text" xml:space="preserve"> <data name="cbPrintDontShowWindowsDialog.Text" xml:space="preserve">
<value>Não abrir a janela de impressão do Windows</value> <value>Não abrir a janela de impressão do Windows</value>
@ -178,7 +178,7 @@
<value>Mostrar progresso no ícone da bandeja</value> <value>Mostrar progresso no ícone da bandeja</value>
</data> </data>
<data name="cbUseCustomScreenshotsPath.Text" xml:space="preserve"> <data name="cbUseCustomScreenshotsPath.Text" xml:space="preserve">
<value>Usar capturas de tela customizadas</value> <value>Pasta de capturas de tela customizada</value>
</data> </data>
<data name="chDescription.Text" xml:space="preserve"> <data name="chDescription.Text" xml:space="preserve">
<value>Descrição</value> <value>Descrição</value>
@ -187,10 +187,10 @@
<value>Formato</value> <value>Formato</value>
</data> </data>
<data name="chkUseSecondaryUploaders.Text" xml:space="preserve"> <data name="chkUseSecondaryUploaders.Text" xml:space="preserve">
<value>Usar hospedagem secundária</value> <value>Hospedagem alternativa</value>
</data> </data>
<data name="gbClipboardFormats.Text" xml:space="preserve"> <data name="gbClipboardFormats.Text" xml:space="preserve">
<value>Formatos da área de transferência</value> <value>Formatos da área de transferência - aparecem debaixo de Copiar no menu contextual na janela principal</value>
</data> </data>
<data name="lblBufferSize.Text" xml:space="preserve"> <data name="lblBufferSize.Text" xml:space="preserve">
<value>Tamanho do buffer:</value> <value>Tamanho do buffer:</value>
@ -220,10 +220,10 @@
<value>Modelo de sub pasta:</value> <value>Modelo de sub pasta:</value>
</data> </data>
<data name="lblUploadLimit.Text" xml:space="preserve"> <data name="lblUploadLimit.Text" xml:space="preserve">
<value>Limite de uploads simultâneos:</value> <value>Limite de envios simultâneos:</value>
</data> </data>
<data name="lblUploadLimitHint.Text" xml:space="preserve"> <data name="lblUploadLimitHint.Text" xml:space="preserve">
<value>0 - 25 (0 desabilita o limite)</value> <value>0 - 25 (0 desabilita)</value>
</data> </data>
<data name="llTranslators.Text" xml:space="preserve"> <data name="llTranslators.Text" xml:space="preserve">
<value>Ajude-nos a traduzir o ShareX para o seu idioma! </value> <value>Ajude-nos a traduzir o ShareX para o seu idioma! </value>
@ -244,19 +244,19 @@
<value>Proxy</value> <value>Proxy</value>
</data> </data>
<data name="tpUpload.Text" xml:space="preserve"> <data name="tpUpload.Text" xml:space="preserve">
<value>Upload</value> <value>Enviar</value>
</data> </data>
<data name="tpUploadResults.Text" xml:space="preserve"> <data name="tpUploadResults.Text" xml:space="preserve">
<value>Resultados</value> <value>Resultados</value>
</data> </data>
<data name="gbSecondaryFileUploaders.Text" xml:space="preserve"> <data name="gbSecondaryFileUploaders.Text" xml:space="preserve">
<value>Hospedagem de arquivos secundária</value> <value>Hospedagem de arquivos alternativa</value>
</data> </data>
<data name="gbSecondaryImageUploaders.Text" xml:space="preserve"> <data name="gbSecondaryImageUploaders.Text" xml:space="preserve">
<value>Hospedagem de imagens secundária</value> <value>Hospedagem de imagens alternativa</value>
</data> </data>
<data name="gbSecondaryTextUploaders.Text" xml:space="preserve"> <data name="gbSecondaryTextUploaders.Text" xml:space="preserve">
<value>Hospedagem de texto secundária</value> <value>Hospedagem de texto alternativa</value>
</data> </data>
<data name="lblProxyHost.Text" xml:space="preserve"> <data name="lblProxyHost.Text" xml:space="preserve">
<value>Domínio:</value> <value>Domínio:</value>
@ -265,7 +265,7 @@
<value>Mostrar botão "Enviar usando ShareX" no menu da shell</value> <value>Mostrar botão "Enviar usando ShareX" no menu da shell</value>
</data> </data>
<data name="tpUploadRetry.Text" xml:space="preserve"> <data name="tpUploadRetry.Text" xml:space="preserve">
<value>Reenvio</value> <value>Reenviar</value>
</data> </data>
<data name="lblPreviewPersonalFolderPath.Text" xml:space="preserve"> <data name="lblPreviewPersonalFolderPath.Text" xml:space="preserve">
<value>...</value> <value>...</value>

View file

@ -473,7 +473,7 @@
</data> </data>
<data name="gbSteam.Text" xml:space="preserve"> <data name="gbSteam.Text" xml:space="preserve">
<value>Steam</value> <value>Steam</value>
<comment>@Invariant</comment></data> </data>
<data name="&gt;&gt;gbSteam.Name" xml:space="preserve"> <data name="&gt;&gt;gbSteam.Name" xml:space="preserve">
<value>gbSteam</value> <value>gbSteam</value>
</data> </data>
@ -521,7 +521,7 @@
</data> </data>
<data name="gbChrome.Text" xml:space="preserve"> <data name="gbChrome.Text" xml:space="preserve">
<value>Chrome</value> <value>Chrome</value>
<comment>@Invariant</comment></data> </data>
<data name="&gt;&gt;gbChrome.Name" xml:space="preserve"> <data name="&gt;&gt;gbChrome.Name" xml:space="preserve">
<value>gbChrome</value> <value>gbChrome</value>
</data> </data>
@ -635,7 +635,7 @@
</data> </data>
<data name="gbWindows.Text" xml:space="preserve"> <data name="gbWindows.Text" xml:space="preserve">
<value>Windows</value> <value>Windows</value>
<comment>@Invariant</comment></data> </data>
<data name="&gt;&gt;gbWindows.Name" xml:space="preserve"> <data name="&gt;&gt;gbWindows.Name" xml:space="preserve">
<value>gbWindows</value> <value>gbWindows</value>
</data> </data>
@ -749,7 +749,7 @@
</data> </data>
<data name="lblPreviewPersonalFolderPath.Text" xml:space="preserve"> <data name="lblPreviewPersonalFolderPath.Text" xml:space="preserve">
<value>...</value> <value>...</value>
<comment>@Invariant</comment></data> </data>
<data name="&gt;&gt;lblPreviewPersonalFolderPath.Name" xml:space="preserve"> <data name="&gt;&gt;lblPreviewPersonalFolderPath.Name" xml:space="preserve">
<value>lblPreviewPersonalFolderPath</value> <value>lblPreviewPersonalFolderPath</value>
</data> </data>
@ -992,7 +992,7 @@
</data> </data>
<data name="lblSaveImageSubFolderPatternPreview.Text" xml:space="preserve"> <data name="lblSaveImageSubFolderPatternPreview.Text" xml:space="preserve">
<value>...</value> <value>...</value>
<comment>@Invariant</comment></data> </data>
<data name="&gt;&gt;lblSaveImageSubFolderPatternPreview.Name" xml:space="preserve"> <data name="&gt;&gt;lblSaveImageSubFolderPatternPreview.Name" xml:space="preserve">
<value>lblSaveImageSubFolderPatternPreview</value> <value>lblSaveImageSubFolderPatternPreview</value>
</data> </data>
@ -1053,6 +1053,171 @@
<data name="&gt;&gt;tpPaths.ZOrder" xml:space="preserve"> <data name="&gt;&gt;tpPaths.ZOrder" xml:space="preserve">
<value>2</value> <value>2</value>
</data> </data>
<data name="btnImport.ImeMode" type="System.Windows.Forms.ImeMode, System.Windows.Forms">
<value>NoControl</value>
</data>
<data name="btnImport.Location" type="System.Drawing.Point, System.Drawing">
<value>16, 128</value>
</data>
<data name="btnImport.Size" type="System.Drawing.Size, System.Drawing">
<value>184, 23</value>
</data>
<data name="btnImport.TabIndex" type="System.Int32, mscorlib">
<value>4</value>
</data>
<data name="btnImport.Text" xml:space="preserve">
<value>Import...</value>
</data>
<data name="&gt;&gt;btnImport.Name" xml:space="preserve">
<value>btnImport</value>
</data>
<data name="&gt;&gt;btnImport.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="&gt;&gt;btnImport.Parent" xml:space="preserve">
<value>tpExportImport</value>
</data>
<data name="&gt;&gt;btnImport.ZOrder" xml:space="preserve">
<value>0</value>
</data>
<data name="btnExport.Location" type="System.Drawing.Point, System.Drawing">
<value>16, 96</value>
</data>
<data name="btnExport.Size" type="System.Drawing.Size, System.Drawing">
<value>184, 23</value>
</data>
<data name="btnExport.TabIndex" type="System.Int32, mscorlib">
<value>3</value>
</data>
<data name="btnExport.Text" xml:space="preserve">
<value>Export...</value>
</data>
<data name="&gt;&gt;btnExport.Name" xml:space="preserve">
<value>btnExport</value>
</data>
<data name="&gt;&gt;btnExport.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="&gt;&gt;btnExport.Parent" xml:space="preserve">
<value>tpExportImport</value>
</data>
<data name="&gt;&gt;btnExport.ZOrder" xml:space="preserve">
<value>1</value>
</data>
<data name="cbExportLogs.AutoSize" type="System.Boolean, mscorlib">
<value>True</value>
</data>
<data name="cbExportLogs.ImeMode" type="System.Windows.Forms.ImeMode, System.Windows.Forms">
<value>NoControl</value>
</data>
<data name="cbExportLogs.Location" type="System.Drawing.Point, System.Drawing">
<value>16, 64</value>
</data>
<data name="cbExportLogs.Size" type="System.Drawing.Size, System.Drawing">
<value>78, 17</value>
</data>
<data name="cbExportLogs.TabIndex" type="System.Int32, mscorlib">
<value>2</value>
</data>
<data name="cbExportLogs.Text" xml:space="preserve">
<value>Export logs</value>
</data>
<data name="&gt;&gt;cbExportLogs.Name" xml:space="preserve">
<value>cbExportLogs</value>
</data>
<data name="&gt;&gt;cbExportLogs.Type" xml:space="preserve">
<value>System.Windows.Forms.CheckBox, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</data>
<data name="&gt;&gt;cbExportLogs.Parent" xml:space="preserve">
<value>tpExportImport</value>
</data>
<data name="&gt;&gt;cbExportLogs.ZOrder" xml:space="preserve">
<value>2</value>
</data>
<data name="cbExportHistory.AutoSize" type="System.Boolean, mscorlib">
<value>True</value>
</data>
<data name="cbExportHistory.ImeMode" type="System.Windows.Forms.ImeMode, System.Windows.Forms">
<value>NoControl</value>
</data>
<data name="cbExportHistory.Location" type="System.Drawing.Point, System.Drawing">
<value>16, 40</value>
</data>
<data name="cbExportHistory.Size" type="System.Drawing.Size, System.Drawing">
<value>89, 17</value>
</data>
<data name="cbExportHistory.TabIndex" type="System.Int32, mscorlib">
<value>1</value>
</data>
<data name="cbExportHistory.Text" xml:space="preserve">
<value>Export history</value>
</data>
<data name="&gt;&gt;cbExportHistory.Name" xml:space="preserve">
<value>cbExportHistory</value>
</data>
<data name="&gt;&gt;cbExportHistory.Type" xml:space="preserve">
<value>System.Windows.Forms.CheckBox, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</data>
<data name="&gt;&gt;cbExportHistory.Parent" xml:space="preserve">
<value>tpExportImport</value>
</data>
<data name="&gt;&gt;cbExportHistory.ZOrder" xml:space="preserve">
<value>3</value>
</data>
<data name="cbExportSettings.AutoSize" type="System.Boolean, mscorlib">
<value>True</value>
</data>
<data name="cbExportSettings.Location" type="System.Drawing.Point, System.Drawing">
<value>16, 16</value>
</data>
<data name="cbExportSettings.Size" type="System.Drawing.Size, System.Drawing">
<value>95, 17</value>
</data>
<data name="cbExportSettings.TabIndex" type="System.Int32, mscorlib">
<value>0</value>
</data>
<data name="cbExportSettings.Text" xml:space="preserve">
<value>Export settings</value>
</data>
<data name="&gt;&gt;cbExportSettings.Name" xml:space="preserve">
<value>cbExportSettings</value>
</data>
<data name="&gt;&gt;cbExportSettings.Type" xml:space="preserve">
<value>System.Windows.Forms.CheckBox, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</data>
<data name="&gt;&gt;cbExportSettings.Parent" xml:space="preserve">
<value>tpExportImport</value>
</data>
<data name="&gt;&gt;cbExportSettings.ZOrder" xml:space="preserve">
<value>4</value>
</data>
<data name="tpExportImport.Location" type="System.Drawing.Point, System.Drawing">
<value>4, 22</value>
</data>
<data name="tpExportImport.Padding" type="System.Windows.Forms.Padding, System.Windows.Forms">
<value>3, 3, 3, 3</value>
</data>
<data name="tpExportImport.Size" type="System.Drawing.Size, System.Drawing">
<value>550, 370</value>
</data>
<data name="tpExportImport.TabIndex" type="System.Int32, mscorlib">
<value>7</value>
</data>
<data name="tpExportImport.Text" xml:space="preserve">
<value>Export / Import</value>
</data>
<data name="&gt;&gt;tpExportImport.Name" xml:space="preserve">
<value>tpExportImport</value>
</data>
<data name="&gt;&gt;tpExportImport.Type" xml:space="preserve">
<value>System.Windows.Forms.TabPage, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</data>
<data name="&gt;&gt;tpExportImport.Parent" xml:space="preserve">
<value>tcSettings</value>
</data>
<data name="&gt;&gt;tpExportImport.ZOrder" xml:space="preserve">
<value>3</value>
</data>
<data name="cbProxyMethod.Location" type="System.Drawing.Point, System.Drawing"> <data name="cbProxyMethod.Location" type="System.Drawing.Point, System.Drawing">
<value>16, 32</value> <value>16, 32</value>
</data> </data>
@ -1336,7 +1501,7 @@
<value>tcSettings</value> <value>tcSettings</value>
</data> </data>
<data name="&gt;&gt;tpProxy.ZOrder" xml:space="preserve"> <data name="&gt;&gt;tpProxy.ZOrder" xml:space="preserve">
<value>3</value> <value>4</value>
</data> </data>
<data name="lblUploadLimit.AutoSize" type="System.Boolean, mscorlib"> <data name="lblUploadLimit.AutoSize" type="System.Boolean, mscorlib">
<value>True</value> <value>True</value>
@ -2026,7 +2191,7 @@
<value>tcSettings</value> <value>tcSettings</value>
</data> </data>
<data name="&gt;&gt;tpUpload.ZOrder" xml:space="preserve"> <data name="&gt;&gt;tpUpload.ZOrder" xml:space="preserve">
<value>4</value> <value>5</value>
</data> </data>
<data name="cbPrintDontShowWindowsDialog.AutoSize" type="System.Boolean, mscorlib"> <data name="cbPrintDontShowWindowsDialog.AutoSize" type="System.Boolean, mscorlib">
<value>True</value> <value>True</value>
@ -2140,7 +2305,7 @@
<value>tcSettings</value> <value>tcSettings</value>
</data> </data>
<data name="&gt;&gt;tpPrint.ZOrder" xml:space="preserve"> <data name="&gt;&gt;tpPrint.ZOrder" xml:space="preserve">
<value>5</value> <value>6</value>
</data> </data>
<data name="pgSettings.Dock" type="System.Windows.Forms.DockStyle, System.Windows.Forms"> <data name="pgSettings.Dock" type="System.Windows.Forms.DockStyle, System.Windows.Forms">
<value>Fill</value> <value>Fill</value>
@ -2191,7 +2356,7 @@
<value>tcSettings</value> <value>tcSettings</value>
</data> </data>
<data name="&gt;&gt;tpAdvanced.ZOrder" xml:space="preserve"> <data name="&gt;&gt;tpAdvanced.ZOrder" xml:space="preserve">
<value>6</value> <value>7</value>
</data> </data>
<data name="tcSettings.Location" type="System.Drawing.Point, System.Drawing"> <data name="tcSettings.Location" type="System.Drawing.Point, System.Drawing">
<value>176, 3</value> <value>176, 3</value>

View file

@ -1,46 +0,0 @@
#region License Information (GPL v3)
/*
ShareX - A program that allows you to take screenshots and share any file type
Copyright (c) 2007-2016 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;
using System.Windows.Forms;
namespace ShareX
{
public class CompanionCubesForm : LayeredForm
{
public CompanionCubesForm()
{
StartPosition = FormStartPosition.Manual;
Bounds = CaptureHelpers.GetScreenWorkingArea();
Shown += CompanionCubesForm_Shown;
}
private void CompanionCubesForm_Shown(object sender, EventArgs e)
{
this.ShowActivate();
}
}
}

View file

@ -127,10 +127,10 @@
<value>Mostrar ShareX no menu "Enviar para"</value> <value>Mostrar ShareX no menu "Enviar para"</value>
</data> </data>
<data name="cbShellContextMenuButton.Text" xml:space="preserve"> <data name="cbShellContextMenuButton.Text" xml:space="preserve">
<value>Mostrar botão "Enviar com ShareX" no menu de contexto do Windows Explorer</value> <value>Mostrar botão "Enviar com ShareX" no menu contextual do Windows Explorer</value>
</data> </data>
<data name="cbSteamInApp.Text" xml:space="preserve"> <data name="cbSteamInApp.Text" xml:space="preserve">
<value>Enquanto o programa estiver aberto, mostrar "Em aplicativo" na Steam</value> <value>Mostrar "Em aplicativo" na Steam enquanto o programa estiver executando</value>
</data> </data>
<data name="lblNote.Text" xml:space="preserve"> <data name="lblNote.Text" xml:space="preserve">
<value>Você pode achar estas configurações em "Configs. do programa -&gt; Integração".</value> <value>Você pode achar estas configurações em "Configs. do programa -&gt; Integração".</value>

View file

@ -1895,6 +1895,29 @@ private void AfterCapture(Image img, CaptureType captureType, TaskSettings taskS
taskSettings.AfterCaptureJob = taskSettings.AfterCaptureJob.Remove(AfterCaptureTasks.AddImageEffects); taskSettings.AfterCaptureJob = taskSettings.AfterCaptureJob.Remove(AfterCaptureTasks.AddImageEffects);
} }
if (taskSettings.AfterCaptureJob.HasFlag(AfterCaptureTasks.ShowQuickTaskMenu))
{
QuickTaskMenu quickTaskMenu = new QuickTaskMenu();
quickTaskMenu.TaskInfoSelected += taskInfo =>
{
if (taskInfo.IsValid)
{
taskSettings.AfterCaptureJob = taskInfo.AfterCaptureTasks;
taskSettings.AfterUploadJob = taskInfo.AfterUploadTasks;
AfterCaptureRunTask(img, taskSettings);
}
};
quickTaskMenu.ShowMenu();
}
else
{
AfterCaptureRunTask(img, taskSettings);
}
}
}
private void AfterCaptureRunTask(Image img, TaskSettings taskSettings)
{
string customFileName; string customFileName;
if (TaskHelpers.ShowAfterCaptureForm(taskSettings, out customFileName, img)) if (TaskHelpers.ShowAfterCaptureForm(taskSettings, out customFileName, img))
@ -1902,7 +1925,6 @@ private void AfterCapture(Image img, CaptureType captureType, TaskSettings taskS
UploadManager.RunImageTask(img, taskSettings, customFileName); UploadManager.RunImageTask(img, taskSettings, customFileName);
} }
} }
}
private bool IsRegionCapture(CaptureType captureType) private bool IsRegionCapture(CaptureType captureType)
{ {

View file

@ -121,19 +121,19 @@
<value>Gasto</value> <value>Gasto</value>
</data> </data>
<data name="chFilename.Text" xml:space="preserve"> <data name="chFilename.Text" xml:space="preserve">
<value>Nome do arquivo</value> <value>Arquivo</value>
</data> </data>
<data name="chProgress.Text" xml:space="preserve"> <data name="chProgress.Text" xml:space="preserve">
<value>Progresso</value> <value>Progresso</value>
</data> </data>
<data name="chRemaining.Text" xml:space="preserve"> <data name="chRemaining.Text" xml:space="preserve">
<value>Restando</value> <value>Restante</value>
</data> </data>
<data name="chSpeed.Text" xml:space="preserve"> <data name="chSpeed.Text" xml:space="preserve">
<value>Velocidade</value> <value>Velocidade</value>
</data> </data>
<data name="chStatus.Text" xml:space="preserve"> <data name="chStatus.Text" xml:space="preserve">
<value>Status</value> <value>Estado</value>
</data> </data>
<data name="chURL.Text" xml:space="preserve"> <data name="chURL.Text" xml:space="preserve">
<value>URL</value> <value>URL</value>
@ -160,7 +160,7 @@
<value>Tarefas pós-captura</value> <value>Tarefas pós-captura</value>
</data> </data>
<data name="tsddbAfterUploadTasks.Text" xml:space="preserve"> <data name="tsddbAfterUploadTasks.Text" xml:space="preserve">
<value>Tarefas pós-upload</value> <value>Tarefas pós-envio</value>
</data> </data>
<data name="tsddbCapture.Text" xml:space="preserve"> <data name="tsddbCapture.Text" xml:space="preserve">
<value>Capturar</value> <value>Capturar</value>
@ -208,7 +208,7 @@
<value>Limpar lista</value> <value>Limpar lista</value>
</data> </data>
<data name="tsmiColorPicker.Text" xml:space="preserve"> <data name="tsmiColorPicker.Text" xml:space="preserve">
<value>Escolher cor...</value> <value>Seletor de cores...</value>
</data> </data>
<data name="tsmiCopy.Text" xml:space="preserve"> <data name="tsmiCopy.Text" xml:space="preserve">
<value>Copiar</value> <value>Copiar</value>
@ -220,13 +220,13 @@
<value>Arquivo</value> <value>Arquivo</value>
</data> </data>
<data name="tsmiCopyFileName.Text" xml:space="preserve"> <data name="tsmiCopyFileName.Text" xml:space="preserve">
<value>Nome do arquivo</value> <value>Nome</value>
</data> </data>
<data name="tsmiCopyFileNameWithExtension.Text" xml:space="preserve"> <data name="tsmiCopyFileNameWithExtension.Text" xml:space="preserve">
<value>Nome do arquivo com extensão</value> <value>Nome do arquivo com extensão</value>
</data> </data>
<data name="tsmiCopyFilePath.Text" xml:space="preserve"> <data name="tsmiCopyFilePath.Text" xml:space="preserve">
<value>Local do arquivo</value> <value>Local</value>
</data> </data>
<data name="tsmiCopyFolder.Text" xml:space="preserve"> <data name="tsmiCopyFolder.Text" xml:space="preserve">
<value>Pasta</value> <value>Pasta</value>
@ -238,16 +238,16 @@
<value>Link para fórum (BBCode)</value> <value>Link para fórum (BBCode)</value>
</data> </data>
<data name="tsmiCopyForumLinkedImage.Text" xml:space="preserve"> <data name="tsmiCopyForumLinkedImage.Text" xml:space="preserve">
<value>Imagem para fórum com link embutido (BBCode)</value> <value>Imagem para fórum com link (BBCode)</value>
</data> </data>
<data name="tsmiCopyHTMLImage.Text" xml:space="preserve"> <data name="tsmiCopyHTMLImage.Text" xml:space="preserve">
<value>Imagem para HTML</value> <value>Imagem HTML</value>
</data> </data>
<data name="tsmiCopyHTMLLink.Text" xml:space="preserve"> <data name="tsmiCopyHTMLLink.Text" xml:space="preserve">
<value>Link para HTML</value> <value>Link HTML</value>
</data> </data>
<data name="tsmiCopyHTMLLinkedImage.Text" xml:space="preserve"> <data name="tsmiCopyHTMLLinkedImage.Text" xml:space="preserve">
<value>Imagem com link para HTML</value> <value>Imagem com link HTML</value>
</data> </data>
<data name="tsmiCopyImage.Text" xml:space="preserve"> <data name="tsmiCopyImage.Text" xml:space="preserve">
<value>Imagem</value> <value>Imagem</value>
@ -322,19 +322,19 @@
<value>URL</value> <value>URL</value>
</data> </data>
<data name="tsmiUploadFile.Text" xml:space="preserve"> <data name="tsmiUploadFile.Text" xml:space="preserve">
<value>Upload de arquivo...</value> <value>Envio de arquivo...</value>
</data> </data>
<data name="tsmiUploadFolder.Text" xml:space="preserve"> <data name="tsmiUploadFolder.Text" xml:space="preserve">
<value>Upload de pasta...</value> <value>Envio de pasta...</value>
</data> </data>
<data name="tsmiTrayUploadFile.Text" xml:space="preserve"> <data name="tsmiTrayUploadFile.Text" xml:space="preserve">
<value>Upload de arquivo...</value> <value>Envio de arquivo...</value>
</data> </data>
<data name="tsmiTrayUploadFolder.Text" xml:space="preserve"> <data name="tsmiTrayUploadFolder.Text" xml:space="preserve">
<value>Upload de pasta...</value> <value>Envio de pasta...</value>
</data> </data>
<data name="tsmiTrayUploadURL.Text" xml:space="preserve"> <data name="tsmiTrayUploadURL.Text" xml:space="preserve">
<value>Upload do URL...</value> <value>Envio do URL...</value>
</data> </data>
<data name="tsmiTrayURLShorteners.Text" xml:space="preserve"> <data name="tsmiTrayURLShorteners.Text" xml:space="preserve">
<value>Encurtadores de URL</value> <value>Encurtadores de URL</value>
@ -343,10 +343,10 @@
<value>Tuitar mensagem...</value> <value>Tuitar mensagem...</value>
</data> </data>
<data name="tsmiUploadClipboard.Text" xml:space="preserve"> <data name="tsmiUploadClipboard.Text" xml:space="preserve">
<value>Upload da área de transferencia...</value> <value>Envio da área de transferência...</value>
</data> </data>
<data name="tsmiUploadDragDrop.Text" xml:space="preserve"> <data name="tsmiUploadDragDrop.Text" xml:space="preserve">
<value>Upload de arrastar e soltar...</value> <value>Arrastar e soltar para enviar...</value>
</data> </data>
<data name="tsmiShareSelectedURL.Text" xml:space="preserve"> <data name="tsmiShareSelectedURL.Text" xml:space="preserve">
<value>Compartilhar URL</value> <value>Compartilhar URL</value>
@ -364,7 +364,7 @@
<value>Mostrar erros</value> <value>Mostrar erros</value>
</data> </data>
<data name="tsmiStopUpload.Text" xml:space="preserve"> <data name="tsmiStopUpload.Text" xml:space="preserve">
<value>Parar upload</value> <value>Parar envio</value>
</data> </data>
<data name="tsmiTrayAbout.Text" xml:space="preserve"> <data name="tsmiTrayAbout.Text" xml:space="preserve">
<value>Sobre...</value> <value>Sobre...</value>
@ -376,13 +376,13 @@
<value>Testar compartilhamento de URL</value> <value>Testar compartilhamento de URL</value>
</data> </data>
<data name="tsmiTestTextUpload.Text" xml:space="preserve"> <data name="tsmiTestTextUpload.Text" xml:space="preserve">
<value>Testar upload de texto</value> <value>Testar envio de texto</value>
</data> </data>
<data name="tsmiTestImageUpload.Text" xml:space="preserve"> <data name="tsmiTestImageUpload.Text" xml:space="preserve">
<value>Testar upload de imagem</value> <value>Testar envio de imagem</value>
</data> </data>
<data name="tsmiTestFileUpload.Text" xml:space="preserve"> <data name="tsmiTestFileUpload.Text" xml:space="preserve">
<value>Testar upload de arquivo</value> <value>Testar envio de arquivo</value>
</data> </data>
<data name="tsmiTrayCapture.Text" xml:space="preserve"> <data name="tsmiTrayCapture.Text" xml:space="preserve">
<value>Captura</value> <value>Captura</value>
@ -397,22 +397,22 @@
<value>Régua...</value> <value>Régua...</value>
</data> </data>
<data name="tsmiTrayUpload.Text" xml:space="preserve"> <data name="tsmiTrayUpload.Text" xml:space="preserve">
<value>Upload</value> <value>Enviar</value>
</data> </data>
<data name="tsmiTrayTweetMessage.Text" xml:space="preserve"> <data name="tsmiTrayTweetMessage.Text" xml:space="preserve">
<value>Tuitar mensagem...</value> <value>Tuitar mensagem...</value>
</data> </data>
<data name="tsmiTrayUploadClipboard.Text" xml:space="preserve"> <data name="tsmiTrayUploadClipboard.Text" xml:space="preserve">
<value>Upload da área de transferencia...</value> <value>Envio de arquivo da área de transferência...</value>
</data> </data>
<data name="tsmiTrayUploadDragDrop.Text" xml:space="preserve"> <data name="tsmiTrayUploadDragDrop.Text" xml:space="preserve">
<value>Upload de arrastar e soltar...</value> <value>Arrastar e soltar para enviar...</value>
</data> </data>
<data name="tsmiTrayWindow.Text" xml:space="preserve"> <data name="tsmiTrayWindow.Text" xml:space="preserve">
<value>Janela</value> <value>Janela</value>
</data> </data>
<data name="tsmiUploadURL.Text" xml:space="preserve"> <data name="tsmiUploadURL.Text" xml:space="preserve">
<value>Upload do URL...</value> <value>Envio do URL...</value>
</data> </data>
<data name="tsmiMonitorTest.Text" xml:space="preserve"> <data name="tsmiMonitorTest.Text" xml:space="preserve">
<value>Teste de monitor...</value> <value>Teste de monitor...</value>
@ -481,10 +481,10 @@
<value>Envio de arquivos</value> <value>Envio de arquivos</value>
</data> </data>
<data name="tsmiFreeHand.Text" xml:space="preserve"> <data name="tsmiFreeHand.Text" xml:space="preserve">
<value>Desenho à mão livre</value> <value>Mão livre</value>
</data> </data>
<data name="tsmiHashCheck.Text" xml:space="preserve"> <data name="tsmiHashCheck.Text" xml:space="preserve">
<value>Verificação de hash...</value> <value>Conferir hash...</value>
</data> </data>
<data name="tsmiImagePreview.Text" xml:space="preserve"> <data name="tsmiImagePreview.Text" xml:space="preserve">
<value>Prévia de imagem</value> <value>Prévia de imagem</value>
@ -514,16 +514,16 @@
<value>Região</value> <value>Região</value>
</data> </data>
<data name="tsmiRectangleAnnotate.Text" xml:space="preserve"> <data name="tsmiRectangleAnnotate.Text" xml:space="preserve">
<value>Região (anotar)</value> <value>Região (Anotar)</value>
</data> </data>
<data name="tsmiRectangleLight.Text" xml:space="preserve"> <data name="tsmiRectangleLight.Text" xml:space="preserve">
<value>Região (leve)</value> <value>Região (Leve)</value>
</data> </data>
<data name="tsmiRectangleTransparent.Text" xml:space="preserve"> <data name="tsmiRectangleTransparent.Text" xml:space="preserve">
<value>Região (transparente)</value> <value>Região (Transparente)</value>
</data> </data>
<data name="tsmiScreenColorPicker.Text" xml:space="preserve"> <data name="tsmiScreenColorPicker.Text" xml:space="preserve">
<value>Seleção de cor da tela</value> <value>Seletor de cores da tela</value>
</data> </data>
<data name="tsmiScreenRecordingFFmpeg.Text" xml:space="preserve"> <data name="tsmiScreenRecordingFFmpeg.Text" xml:space="preserve">
<value>Gravar tela</value> <value>Gravar tela</value>
@ -538,7 +538,7 @@
<value>Envio de texto</value> <value>Envio de texto</value>
</data> </data>
<data name="tsmiTrayColorPicker.Text" xml:space="preserve"> <data name="tsmiTrayColorPicker.Text" xml:space="preserve">
<value>Seleção de cores...</value> <value>Seletor de cores...</value>
</data> </data>
<data name="tsmiTrayDNSChanger.Text" xml:space="preserve"> <data name="tsmiTrayDNSChanger.Text" xml:space="preserve">
<value>Trocador de DNS...</value> <value>Trocador de DNS...</value>
@ -550,7 +550,7 @@
<value>Desenho à mão livre</value> <value>Desenho à mão livre</value>
</data> </data>
<data name="tsmiTrayHashCheck.Text" xml:space="preserve"> <data name="tsmiTrayHashCheck.Text" xml:space="preserve">
<value>Verificação de hash</value> <value>Conferir hash</value>
</data> </data>
<data name="tsmiTrayImageEffects.Text" xml:space="preserve"> <data name="tsmiTrayImageEffects.Text" xml:space="preserve">
<value>Efeitos de imagem...</value> <value>Efeitos de imagem...</value>
@ -589,7 +589,7 @@
<value>Região (transparente)</value> <value>Região (transparente)</value>
</data> </data>
<data name="tsmiTrayScreenColorPicker.Text" xml:space="preserve"> <data name="tsmiTrayScreenColorPicker.Text" xml:space="preserve">
<value>Seleção de cores da tela...</value> <value>Seletor de cores da tela...</value>
</data> </data>
<data name="tsmiTrayScreenRecordingFFmpeg.Text" xml:space="preserve"> <data name="tsmiTrayScreenRecordingFFmpeg.Text" xml:space="preserve">
<value>Gravar tela</value> <value>Gravar tela</value>
@ -607,7 +607,7 @@
<value>Serviços de compartilhamento de URLs</value> <value>Serviços de compartilhamento de URLs</value>
</data> </data>
<data name="tsmiTrayWebpageCapture.Text" xml:space="preserve"> <data name="tsmiTrayWebpageCapture.Text" xml:space="preserve">
<value>Captura de página da web...</value> <value>Capturar página da web...</value>
</data> </data>
<data name="tsmiTrayWorkflows.Text" xml:space="preserve"> <data name="tsmiTrayWorkflows.Text" xml:space="preserve">
<value>Workflows</value> <value>Workflows</value>
@ -657,4 +657,7 @@
<data name="tsmiTrayDebug.Text" xml:space="preserve"> <data name="tsmiTrayDebug.Text" xml:space="preserve">
<value>Depurar</value> <value>Depurar</value>
</data> </data>
<data name="tsmiHideColumns.Text" xml:space="preserve">
<value>Esconder colunas</value>
</data>
</root> </root>

View file

@ -0,0 +1,153 @@
namespace ShareX
{
partial class QuickTaskInfoEditForm
{
/// <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.components = new System.ComponentModel.Container();
this.mbAfterCaptureTasks = new ShareX.HelpersLib.MenuButton();
this.mbAfterUploadTasks = new ShareX.HelpersLib.MenuButton();
this.cmsAfterCapture = new System.Windows.Forms.ContextMenuStrip(this.components);
this.cmsAfterUpload = new System.Windows.Forms.ContextMenuStrip(this.components);
this.lblAfterCaptureTasks = new System.Windows.Forms.Label();
this.lblAfterUploadTasks = new System.Windows.Forms.Label();
this.lblName = new System.Windows.Forms.Label();
this.txtName = new System.Windows.Forms.TextBox();
this.btnOK = new System.Windows.Forms.Button();
this.SuspendLayout();
//
// mbAfterCaptureTasks
//
this.mbAfterCaptureTasks.Location = new System.Drawing.Point(8, 72);
this.mbAfterCaptureTasks.Menu = this.cmsAfterCapture;
this.mbAfterCaptureTasks.Name = "mbAfterCaptureTasks";
this.mbAfterCaptureTasks.Size = new System.Drawing.Size(424, 23);
this.mbAfterCaptureTasks.TabIndex = 0;
this.mbAfterCaptureTasks.TextAlign = System.Drawing.ContentAlignment.MiddleLeft;
this.mbAfterCaptureTasks.UseVisualStyleBackColor = true;
//
// mbAfterUploadTasks
//
this.mbAfterUploadTasks.Location = new System.Drawing.Point(8, 120);
this.mbAfterUploadTasks.Menu = this.cmsAfterUpload;
this.mbAfterUploadTasks.Name = "mbAfterUploadTasks";
this.mbAfterUploadTasks.Size = new System.Drawing.Size(424, 23);
this.mbAfterUploadTasks.TabIndex = 1;
this.mbAfterUploadTasks.TextAlign = System.Drawing.ContentAlignment.MiddleLeft;
this.mbAfterUploadTasks.UseVisualStyleBackColor = true;
//
// cmsAfterCapture
//
this.cmsAfterCapture.Name = "cmsAfterCapture";
this.cmsAfterCapture.Size = new System.Drawing.Size(61, 4);
//
// cmsAfterUpload
//
this.cmsAfterUpload.Name = "cmsAfterUpload";
this.cmsAfterUpload.Size = new System.Drawing.Size(61, 4);
//
// lblAfterCaptureTasks
//
this.lblAfterCaptureTasks.AutoSize = true;
this.lblAfterCaptureTasks.Location = new System.Drawing.Point(5, 56);
this.lblAfterCaptureTasks.Name = "lblAfterCaptureTasks";
this.lblAfterCaptureTasks.Size = new System.Drawing.Size(99, 13);
this.lblAfterCaptureTasks.TabIndex = 2;
this.lblAfterCaptureTasks.Text = "After capture tasks:";
//
// lblAfterUploadTasks
//
this.lblAfterUploadTasks.AutoSize = true;
this.lblAfterUploadTasks.Location = new System.Drawing.Point(5, 104);
this.lblAfterUploadTasks.Name = "lblAfterUploadTasks";
this.lblAfterUploadTasks.Size = new System.Drawing.Size(95, 13);
this.lblAfterUploadTasks.TabIndex = 3;
this.lblAfterUploadTasks.Text = "After upload tasks:";
//
// lblName
//
this.lblName.AutoSize = true;
this.lblName.Location = new System.Drawing.Point(5, 8);
this.lblName.Name = "lblName";
this.lblName.Size = new System.Drawing.Size(57, 13);
this.lblName.TabIndex = 4;
this.lblName.Text = "Menu text:";
//
// txtName
//
this.txtName.Location = new System.Drawing.Point(8, 24);
this.txtName.Name = "txtName";
this.txtName.Size = new System.Drawing.Size(424, 20);
this.txtName.TabIndex = 5;
this.txtName.TextChanged += new System.EventHandler(this.txtName_TextChanged);
//
// btnOK
//
this.btnOK.DialogResult = System.Windows.Forms.DialogResult.OK;
this.btnOK.Location = new System.Drawing.Point(312, 160);
this.btnOK.Name = "btnOK";
this.btnOK.Size = new System.Drawing.Size(120, 23);
this.btnOK.TabIndex = 6;
this.btnOK.Text = "OK";
this.btnOK.UseVisualStyleBackColor = true;
//
// QuickTaskInfoEditForm
//
this.AcceptButton = this.btnOK;
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
this.ClientSize = new System.Drawing.Size(440, 192);
this.Controls.Add(this.btnOK);
this.Controls.Add(this.txtName);
this.Controls.Add(this.lblName);
this.Controls.Add(this.lblAfterUploadTasks);
this.Controls.Add(this.lblAfterCaptureTasks);
this.Controls.Add(this.mbAfterUploadTasks);
this.Controls.Add(this.mbAfterCaptureTasks);
this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedSingle;
this.MaximizeBox = false;
this.Name = "QuickTaskInfoEditForm";
this.StartPosition = System.Windows.Forms.FormStartPosition.CenterScreen;
this.Text = "ShareX - Edit quick task menu item";
this.ResumeLayout(false);
this.PerformLayout();
}
#endregion
private HelpersLib.MenuButton mbAfterCaptureTasks;
private HelpersLib.MenuButton mbAfterUploadTasks;
private System.Windows.Forms.ContextMenuStrip cmsAfterCapture;
private System.Windows.Forms.ContextMenuStrip cmsAfterUpload;
private System.Windows.Forms.Label lblAfterCaptureTasks;
private System.Windows.Forms.Label lblAfterUploadTasks;
private System.Windows.Forms.Label lblName;
private System.Windows.Forms.TextBox txtName;
private System.Windows.Forms.Button btnOK;
}
}

View file

@ -0,0 +1,109 @@
#region License Information (GPL v3)
/*
ShareX - A program that allows you to take screenshots and share any file type
Copyright (c) 2007-2016 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 ShareX.Properties;
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;
namespace ShareX
{
public partial class QuickTaskInfoEditForm : BaseForm
{
public QuickTaskInfo TaskInfo { get; private set; }
public QuickTaskInfoEditForm(QuickTaskInfo taskInfo)
{
InitializeComponent();
TaskInfo = taskInfo;
txtName.Text = TaskInfo.Name;
AddMultiEnumItemsContextMenu<AfterCaptureTasks>(x => TaskInfo.AfterCaptureTasks = TaskInfo.AfterCaptureTasks.Swap(x), cmsAfterCapture);
AddMultiEnumItemsContextMenu<AfterUploadTasks>(x => TaskInfo.AfterUploadTasks = TaskInfo.AfterUploadTasks.Swap(x), cmsAfterUpload);
SetMultiEnumCheckedContextMenu(TaskInfo.AfterCaptureTasks, cmsAfterCapture);
SetMultiEnumCheckedContextMenu(TaskInfo.AfterUploadTasks, cmsAfterUpload);
UpdateUploaderMenuNames();
}
private void txtName_TextChanged(object sender, EventArgs e)
{
TaskInfo.Name = txtName.Text;
}
private void AddMultiEnumItemsContextMenu<T>(Action<T> selectedEnum, params ToolStripDropDown[] parents)
{
string[] enums = Helpers.GetLocalizedEnumDescriptions<T>().Skip(1).Select(x => x.Replace("&", "&&")).ToArray();
foreach (ToolStripDropDown parent in parents)
{
for (int i = 0; i < enums.Length; i++)
{
ToolStripMenuItem tsmi = new ToolStripMenuItem(enums[i]);
int index = i;
tsmi.Click += (sender, e) =>
{
foreach (ToolStripDropDown parent2 in parents)
{
ToolStripMenuItem tsmi2 = (ToolStripMenuItem)parent2.Items[index];
tsmi2.Checked = !tsmi2.Checked;
}
selectedEnum((T)Enum.ToObject(typeof(T), 1 << index));
UpdateUploaderMenuNames();
};
parent.Items.Add(tsmi);
}
}
}
private void SetMultiEnumCheckedContextMenu(Enum value, params ToolStripDropDown[] parents)
{
for (int i = 0; i < parents[0].Items.Count; i++)
{
foreach (ToolStripDropDown parent in parents)
{
ToolStripMenuItem tsmi = (ToolStripMenuItem)parent.Items[i];
tsmi.Checked = value.HasFlag(1 << i);
}
}
}
private void UpdateUploaderMenuNames()
{
txtName.SetWatermark(TaskInfo.ToString(), true);
mbAfterCaptureTasks.Text = string.Join(", ", TaskInfo.AfterCaptureTasks.GetFlags<AfterCaptureTasks>().Select(x => x.GetLocalizedDescription()));
mbAfterUploadTasks.Text = string.Join(", ", TaskInfo.AfterUploadTasks.GetFlags<AfterUploadTasks>().Select(x => x.GetLocalizedDescription()));
}
}
}

View file

@ -0,0 +1,126 @@
<?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>
<metadata name="cmsAfterCapture.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
<value>17, 17</value>
</metadata>
<metadata name="cmsAfterUpload.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
<value>160, 17</value>
</metadata>
</root>

View file

@ -0,0 +1,162 @@
namespace ShareX
{
partial class QuickTaskMenuEditorForm
{
/// <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.lvPresets = new ShareX.HelpersLib.MyListView();
this.chName = ((System.Windows.Forms.ColumnHeader)(new System.Windows.Forms.ColumnHeader()));
this.btnAdd = new System.Windows.Forms.Button();
this.btnEdit = new System.Windows.Forms.Button();
this.btnRemove = new System.Windows.Forms.Button();
this.btnReset = new System.Windows.Forms.Button();
this.btnClose = new System.Windows.Forms.Button();
this.label1 = new System.Windows.Forms.Label();
this.SuspendLayout();
//
// lvPresets
//
this.lvPresets.AllowDrop = true;
this.lvPresets.AllowItemDrag = true;
this.lvPresets.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom)
| System.Windows.Forms.AnchorStyles.Left)
| System.Windows.Forms.AnchorStyles.Right)));
this.lvPresets.AutoFillColumn = true;
this.lvPresets.Columns.AddRange(new System.Windows.Forms.ColumnHeader[] {
this.chName});
this.lvPresets.Font = new System.Drawing.Font("Microsoft Sans Serif", 9.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
this.lvPresets.FullRowSelect = true;
this.lvPresets.GridLines = true;
this.lvPresets.HeaderStyle = System.Windows.Forms.ColumnHeaderStyle.None;
this.lvPresets.Location = new System.Drawing.Point(8, 8);
this.lvPresets.Name = "lvPresets";
this.lvPresets.Size = new System.Drawing.Size(448, 328);
this.lvPresets.TabIndex = 0;
this.lvPresets.UseCompatibleStateImageBehavior = false;
this.lvPresets.View = System.Windows.Forms.View.Details;
this.lvPresets.ItemMoved += new ShareX.HelpersLib.MyListView.ListViewItemMovedEventHandler(this.lvPresets_ItemMoved);
//
// chName
//
this.chName.Width = 372;
//
// btnAdd
//
this.btnAdd.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left)));
this.btnAdd.Location = new System.Drawing.Point(8, 368);
this.btnAdd.Name = "btnAdd";
this.btnAdd.Size = new System.Drawing.Size(144, 23);
this.btnAdd.TabIndex = 1;
this.btnAdd.Text = "Add";
this.btnAdd.UseVisualStyleBackColor = true;
this.btnAdd.Click += new System.EventHandler(this.btnAdd_Click);
//
// btnEdit
//
this.btnEdit.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left)));
this.btnEdit.Location = new System.Drawing.Point(160, 368);
this.btnEdit.Name = "btnEdit";
this.btnEdit.Size = new System.Drawing.Size(144, 23);
this.btnEdit.TabIndex = 2;
this.btnEdit.Text = "Edit";
this.btnEdit.UseVisualStyleBackColor = true;
this.btnEdit.Click += new System.EventHandler(this.btnEdit_Click);
//
// btnRemove
//
this.btnRemove.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left)));
this.btnRemove.Location = new System.Drawing.Point(312, 368);
this.btnRemove.Name = "btnRemove";
this.btnRemove.Size = new System.Drawing.Size(144, 23);
this.btnRemove.TabIndex = 3;
this.btnRemove.Text = "Remove";
this.btnRemove.UseVisualStyleBackColor = true;
this.btnRemove.Click += new System.EventHandler(this.btnRemove_Click);
//
// btnReset
//
this.btnReset.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left)));
this.btnReset.Location = new System.Drawing.Point(272, 400);
this.btnReset.Name = "btnReset";
this.btnReset.Size = new System.Drawing.Size(184, 23);
this.btnReset.TabIndex = 4;
this.btnReset.Text = "Reset to default";
this.btnReset.UseVisualStyleBackColor = true;
this.btnReset.Click += new System.EventHandler(this.btnReset_Click);
//
// btnClose
//
this.btnClose.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left)));
this.btnClose.Location = new System.Drawing.Point(8, 400);
this.btnClose.Name = "btnClose";
this.btnClose.Size = new System.Drawing.Size(256, 23);
this.btnClose.TabIndex = 5;
this.btnClose.Text = "Close";
this.btnClose.UseVisualStyleBackColor = true;
this.btnClose.Click += new System.EventHandler(this.btnClose_Click);
//
// label1
//
this.label1.AutoSize = true;
this.label1.Location = new System.Drawing.Point(8, 344);
this.label1.Name = "label1";
this.label1.Size = new System.Drawing.Size(341, 13);
this.label1.TabIndex = 6;
this.label1.Text = "Tip: If you add empty task it will be converted to separator line in menu.";
//
// QuickTaskMenuEditorForm
//
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
this.ClientSize = new System.Drawing.Size(464, 432);
this.Controls.Add(this.label1);
this.Controls.Add(this.btnClose);
this.Controls.Add(this.btnReset);
this.Controls.Add(this.btnRemove);
this.Controls.Add(this.btnEdit);
this.Controls.Add(this.btnAdd);
this.Controls.Add(this.lvPresets);
this.Name = "QuickTaskMenuEditorForm";
this.StartPosition = System.Windows.Forms.FormStartPosition.CenterScreen;
this.Text = "ShareX - Quick task menu editor";
this.ResumeLayout(false);
this.PerformLayout();
}
#endregion
private HelpersLib.MyListView lvPresets;
private System.Windows.Forms.ColumnHeader chName;
private System.Windows.Forms.Button btnAdd;
private System.Windows.Forms.Button btnEdit;
private System.Windows.Forms.Button btnRemove;
private System.Windows.Forms.Button btnReset;
private System.Windows.Forms.Button btnClose;
private System.Windows.Forms.Label label1;
}
}

View file

@ -0,0 +1,118 @@
#region License Information (GPL v3)
/*
ShareX - A program that allows you to take screenshots and share any file type
Copyright (c) 2007-2016 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;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;
namespace ShareX
{
public partial class QuickTaskMenuEditorForm : BaseForm
{
public QuickTaskMenuEditorForm()
{
InitializeComponent();
if (Program.Settings.QuickTaskPresets == null)
{
Program.Settings.QuickTaskPresets = new List<QuickTaskInfo>();
}
UpdateItems();
}
private void UpdateItems()
{
lvPresets.Items.Clear();
foreach (QuickTaskInfo taskInfo in Program.Settings.QuickTaskPresets)
{
ListViewItem lvi = new ListViewItem(taskInfo.ToString());
lvi.Tag = taskInfo;
lvPresets.Items.Add(lvi);
}
}
private void Edit(QuickTaskInfo taskInfo)
{
new QuickTaskInfoEditForm(taskInfo).ShowDialog();
}
private void btnAdd_Click(object sender, EventArgs e)
{
QuickTaskInfo taskInfo = new QuickTaskInfo();
ListViewItem lvi = new ListViewItem();
lvi.Tag = taskInfo;
Program.Settings.QuickTaskPresets.Add(taskInfo);
lvPresets.Items.Add(lvi);
Edit(taskInfo);
lvi.Text = taskInfo.ToString();
}
private void btnEdit_Click(object sender, EventArgs e)
{
if (lvPresets.SelectedItems.Count > 0)
{
ListViewItem lvi = lvPresets.SelectedItems[0];
QuickTaskInfo taskInfo = lvi.Tag as QuickTaskInfo;
Edit(taskInfo);
lvi.Text = taskInfo.ToString();
}
}
private void btnRemove_Click(object sender, EventArgs e)
{
if (lvPresets.SelectedItems.Count > 0)
{
ListViewItem lvi = lvPresets.SelectedItems[0];
QuickTaskInfo taskInfo = lvi.Tag as QuickTaskInfo;
Program.Settings.QuickTaskPresets.Remove(taskInfo);
lvPresets.Items.Remove(lvi);
}
}
private void lvPresets_ItemMoved(object sender, int oldIndex, int newIndex)
{
Program.Settings.QuickTaskPresets.Move(oldIndex, newIndex);
}
private void btnReset_Click(object sender, EventArgs e)
{
Program.Settings.QuickTaskPresets = QuickTaskInfo.DefaultPresets;
UpdateItems();
}
private void btnClose_Click(object sender, EventArgs e)
{
Close();
}
}
}

View file

@ -0,0 +1,120 @@
<?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>
</root>

View file

@ -559,11 +559,11 @@ private void UpdateUploaderMenuNames()
{ {
btnTask.Text = string.Format(Resources.TaskSettingsForm_UpdateUploaderMenuNames_Task___0_, TaskSettings.Job.GetLocalizedDescription()); btnTask.Text = string.Format(Resources.TaskSettingsForm_UpdateUploaderMenuNames_Task___0_, TaskSettings.Job.GetLocalizedDescription());
btnAfterCapture.Text = string.Format(Resources.TaskSettingsForm_UpdateUploaderMenuNames_After_capture___0_, string.Join(", ", TaskSettings.AfterCaptureJob.GetFlags<AfterCaptureTasks>(). btnAfterCapture.Text = string.Format(Resources.TaskSettingsForm_UpdateUploaderMenuNames_After_capture___0_,
Select(x => x.GetLocalizedDescription()).ToArray())); string.Join(", ", TaskSettings.AfterCaptureJob.GetFlags<AfterCaptureTasks>().Select(x => x.GetLocalizedDescription())));
btnAfterUpload.Text = string.Format(Resources.TaskSettingsForm_UpdateUploaderMenuNames_After_upload___0_, string.Join(", ", TaskSettings.AfterUploadJob.GetFlags<AfterUploadTasks>(). btnAfterUpload.Text = string.Format(Resources.TaskSettingsForm_UpdateUploaderMenuNames_After_upload___0_,
Select(x => x.GetLocalizedDescription()).ToArray())); string.Join(", ", TaskSettings.AfterUploadJob.GetFlags<AfterUploadTasks>().Select(x => x.GetLocalizedDescription())));
string imageUploader = TaskSettings.ImageDestination == ImageDestination.FileUploader ? string imageUploader = TaskSettings.ImageDestination == ImageDestination.FileUploader ?
TaskSettings.ImageFileDestination.GetLocalizedDescription() : TaskSettings.ImageDestination.GetLocalizedDescription(); TaskSettings.ImageFileDestination.GetLocalizedDescription() : TaskSettings.ImageDestination.GetLocalizedDescription();

View file

@ -133,7 +133,7 @@
<value>Após captura...</value> <value>Após captura...</value>
</data> </data>
<data name="btnAfterUpload.Text" xml:space="preserve"> <data name="btnAfterUpload.Text" xml:space="preserve">
<value>Após upload...</value> <value>Após envio...</value>
</data> </data>
<data name="btnDestinations.Text" xml:space="preserve"> <data name="btnDestinations.Text" xml:space="preserve">
<value>Destinos...</value> <value>Destinos...</value>
@ -187,10 +187,10 @@
<value>Ações</value> <value>Ações</value>
</data> </data>
<data name="tpUpload.Text" xml:space="preserve"> <data name="tpUpload.Text" xml:space="preserve">
<value>Upload</value> <value>Envio</value>
</data> </data>
<data name="tpUploadClipboard.Text" xml:space="preserve"> <data name="tpUploadClipboard.Text" xml:space="preserve">
<value>Upload da área de transferência</value> <value>Envio da área de transferência</value>
</data> </data>
<data name="tpTask.Text" xml:space="preserve"> <data name="tpTask.Text" xml:space="preserve">
<value>Tarefa</value> <value>Tarefa</value>
@ -280,7 +280,7 @@
<value>Capturar janela com transparência</value> <value>Capturar janela com transparência</value>
</data> </data>
<data name="cbNameFormatCustomTimeZone.Text" xml:space="preserve"> <data name="cbNameFormatCustomTimeZone.Text" xml:space="preserve">
<value>Usar fuso-horário diferente:</value> <value>Utilizar fuso-horário diferente:</value>
</data> </data>
<data name="cbScreenRecorderFixedDuration.Text" xml:space="preserve"> <data name="cbScreenRecorderFixedDuration.Text" xml:space="preserve">
<value>Duração fixa:</value> <value>Duração fixa:</value>
@ -352,7 +352,7 @@
<value>Local da pasta</value> <value>Local da pasta</value>
</data> </data>
<data name="chkClipboardUploadURLContents.Text" xml:space="preserve"> <data name="chkClipboardUploadURLContents.Text" xml:space="preserve">
<value>Se a área de transferência contém um URL: baixar o arquivo e enviá-lo</value> <value>Se a área de transferência conter um URL: baixar o arquivo e enviá-lo</value>
</data> </data>
<data name="chkOverrideCustomUploader.Text" xml:space="preserve"> <data name="chkOverrideCustomUploader.Text" xml:space="preserve">
<value>Substituir serviço customizado padrão:</value> <value>Substituir serviço customizado padrão:</value>
@ -379,13 +379,13 @@
<value>Aplicar efeitos somente em capturas de região</value> <value>Aplicar efeitos somente em capturas de região</value>
</data> </data>
<data name="cbFileUploadUseNamePattern.Text" xml:space="preserve"> <data name="cbFileUploadUseNamePattern.Text" xml:space="preserve">
<value>Usar padrão para envios de arquivo também ao invés de usar o nome do arquivo</value> <value>Utilizar padrão para envio de arquivos ao invés do nome do arquivo</value>
</data> </data>
<data name="cbClipboardUploadShortenURL.Text" xml:space="preserve"> <data name="cbClipboardUploadShortenURL.Text" xml:space="preserve">
<value>Se a área de transferência contém um URL: usar Encurtador de URL</value> <value>Se a área de transferência conter um URL: usar Encurtador de URL</value>
</data> </data>
<data name="cbClipboardUploadShareURL.Text" xml:space="preserve"> <data name="cbClipboardUploadShareURL.Text" xml:space="preserve">
<value>Se a área de transferência contém um URL: compartilhar usando serviço de compartilhamento de URL</value> <value>Se a área de transferência conter um URL: compartilhar usando serviço de compartilhamento de URL</value>
</data> </data>
<data name="lblImageEffectsNote.Text" xml:space="preserve"> <data name="lblImageEffectsNote.Text" xml:space="preserve">
<value>Você pode habilitar/desabilitar efeitos de imagem em "Tarefas pós-captura -&gt; Adicionar efeitos de imagem".</value> <value>Você pode habilitar/desabilitar efeitos de imagem em "Tarefas pós-captura -&gt; Adicionar efeitos de imagem".</value>
@ -421,16 +421,16 @@
<value>Usar opções de imagem nas opções de tarefas da janela principal</value> <value>Usar opções de imagem nas opções de tarefas da janela principal</value>
</data> </data>
<data name="chkUseDefaultUploadSettings.Text" xml:space="preserve"> <data name="chkUseDefaultUploadSettings.Text" xml:space="preserve">
<value>Usar opções de upload nas opções de tarefas da janela principal</value> <value>Utilizar opções de upload nas opções de tarefas da janela principal</value>
</data> </data>
<data name="cbClipboardUploadAutoIndexFolder.Text" xml:space="preserve"> <data name="cbClipboardUploadAutoIndexFolder.Text" xml:space="preserve">
<value>Se a área de transferência contém o local de uma pasta: arquivar a pasta e enviar o índice</value> <value>Se a área de transferência conter o local de uma pasta: arquivar a pasta e enviar o índice</value>
</data> </data>
<data name="cbScreenRecorderShowCursor.Text" xml:space="preserve"> <data name="cbScreenRecorderShowCursor.Text" xml:space="preserve">
<value>Mostrar cursor na gravação</value> <value>Mostrar cursor na gravação</value>
</data> </data>
<data name="lblImageJPEGQualityHint.Text" xml:space="preserve"> <data name="lblImageJPEGQualityHint.Text" xml:space="preserve">
<value>0 a 100</value> <value>0 - 100</value>
</data> </data>
<data name="chkUseDefaultToolsSettings.Text" xml:space="preserve"> <data name="chkUseDefaultToolsSettings.Text" xml:space="preserve">
<value>Usar opções de ferramentas nas opções de tarefas da janela principal</value> <value>Usar opções de ferramentas nas opções de tarefas da janela principal</value>
@ -444,4 +444,10 @@
<data name="tpScrollingCapture.Text" xml:space="preserve"> <data name="tpScrollingCapture.Text" xml:space="preserve">
<value>Captura rolante</value> <value>Captura rolante</value>
</data> </data>
<data name="cbRegionCaptureUseWindowPattern.Text" xml:space="preserve">
<value>Utilizar nome da janela para captura de região (ShareX tentará detectar a janela atrás da seleção)</value>
</data>
<data name="tpFileNaming.Text" xml:space="preserve">
<value>Nomeação de arquivos</value>
</data>
</root> </root>

View file

@ -203,13 +203,14 @@ public static string HistoryFilePath
} }
} }
public static string LogsFolder => Path.Combine(PersonalFolder, "Logs");
public static string LogsFilePath public static string LogsFilePath
{ {
get get
{ {
string logsFolder = Path.Combine(PersonalFolder, "Logs");
string filename = string.Format("ShareX-Log-{0:yyyy-MM}.txt", DateTime.Now); string filename = string.Format("ShareX-Log-{0:yyyy-MM}.txt", DateTime.Now);
return Path.Combine(logsFolder, filename); return Path.Combine(LogsFolder, filename);
} }
} }
@ -235,8 +236,9 @@ public static string ScreenshotsFolder
} }
} }
private static string BackupFolder => Path.Combine(PersonalFolder, "Backup"); public static string BackupFolder => Path.Combine(PersonalFolder, "Backup");
private static string ToolsFolder => Path.Combine(PersonalFolder, "Tools"); public static string ToolsFolder => Path.Combine(PersonalFolder, "Tools");
public static string GreenshotImageEditorConfigFilePath => Path.Combine(PersonalFolder, "GreenshotImageEditor.ini");
public static string ScreenRecorderCacheFilePath => Path.Combine(PersonalFolder, "ScreenRecorder.avi"); public static string ScreenRecorderCacheFilePath => Path.Combine(PersonalFolder, "ScreenRecorder.avi");
public static string DefaultFFmpegFilePath => Path.Combine(ToolsFolder, "ffmpeg.exe"); public static string DefaultFFmpegFilePath => Path.Combine(ToolsFolder, "ffmpeg.exe");
public static string ChromeHostManifestFilePath => Path.Combine(ToolsFolder, "Chrome-host-manifest.json"); public static string ChromeHostManifestFilePath => Path.Combine(ToolsFolder, "Chrome-host-manifest.json");

View file

@ -551,16 +551,6 @@ public class Resources {
} }
} }
/// <summary>
/// Looks up a localized resource of type System.Drawing.Bitmap.
/// </summary>
public static System.Drawing.Bitmap CompanionCube {
get {
object obj = ResourceManager.GetObject("CompanionCube", resourceCulture);
return ((System.Drawing.Bitmap)(obj));
}
}
/// <summary> /// <summary>
/// Looks up a localized resource of type System.Drawing.Bitmap. /// Looks up a localized resource of type System.Drawing.Bitmap.
/// </summary> /// </summary>
@ -916,16 +906,6 @@ public class Resources {
} }
} }
/// <summary>
/// Looks up a localized resource of type System.Drawing.Bitmap.
/// </summary>
public static System.Drawing.Bitmap google_plus {
get {
object obj = ResourceManager.GetObject("google_plus", resourceCulture);
return ((System.Drawing.Bitmap)(obj));
}
}
/// <summary> /// <summary>
/// Looks up a localized resource of type System.Drawing.Bitmap. /// Looks up a localized resource of type System.Drawing.Bitmap.
/// </summary> /// </summary>

View file

@ -235,13 +235,13 @@ Pressione "Não" para cancelar e desabilitar o upload automático.</value>
<value>Compartilhar URL ({0})</value> <value>Compartilhar URL ({0})</value>
</data> </data>
<data name="UploadManager_UploadFolder_Folder_upload" xml:space="preserve"> <data name="UploadManager_UploadFolder_Folder_upload" xml:space="preserve">
<value>Upload de pasta</value> <value>Envio de pasta</value>
</data> </data>
<data name="UploadManager_UploadFile_File_upload" xml:space="preserve"> <data name="UploadManager_UploadFile_File_upload" xml:space="preserve">
<value>Upload de arquivo</value> <value>Upload de arquivo</value>
</data> </data>
<data name="UploadManager_IsUploadConfirmed_Don_t_show_this_message_again_" xml:space="preserve"> <data name="UploadManager_IsUploadConfirmed_Don_t_show_this_message_again_" xml:space="preserve">
<value>Não mostrar esta mensagem de novo.</value> <value>Não mostrar esta mensagem novamente.</value>
</data> </data>
<data name="UploadManager_IsUploadConfirmed_Are_you_sure_you_want_to_upload__0__files_" xml:space="preserve"> <data name="UploadManager_IsUploadConfirmed_Are_you_sure_you_want_to_upload__0__files_" xml:space="preserve">
<value>Você tem certeza que deseja fazer o upload de {0} arquivos?</value> <value>Você tem certeza que deseja fazer o upload de {0} arquivos?</value>
@ -251,7 +251,7 @@ Pressione "Não" para cancelar e desabilitar o upload automático.</value>
{0}</value> {0}</value>
</data> </data>
<data name="UploadInfoManager_ShowErrors_Upload_errors" xml:space="preserve"> <data name="UploadInfoManager_ShowErrors_Upload_errors" xml:space="preserve">
<value>Erros de upload</value> <value>Erros de envio</value>
</data> </data>
<data name="TaskSettingsForm_UpdateUploaderMenuNames_URL_shortener___0_" xml:space="preserve"> <data name="TaskSettingsForm_UpdateUploaderMenuNames_URL_shortener___0_" xml:space="preserve">
<value>Encurtador de URL: {0}</value> <value>Encurtador de URL: {0}</value>
@ -266,7 +266,7 @@ Pressione "Não" para cancelar e desabilitar o upload automático.</value>
<value>Erro</value> <value>Erro</value>
</data> </data>
<data name="TaskHelpers_TweetMessage_Unable_to_find_valid_Twitter_account_" xml:space="preserve"> <data name="TaskHelpers_TweetMessage_Unable_to_find_valid_Twitter_account_" xml:space="preserve">
<value>Não foi encontrada uma conta válida do Twitter.</value> <value>Não foi possível encontrar uma conta válida do Twitter.</value>
</data> </data>
<data name="TaskHelpers_TweetMessage_Tweet_successfully_sent_" xml:space="preserve"> <data name="TaskHelpers_TweetMessage_Tweet_successfully_sent_" xml:space="preserve">
<value>Tuíte enviado com sucesso.</value> <value>Tuíte enviado com sucesso.</value>
@ -325,10 +325,10 @@ Pressione "Não" para cancelar e desabilitar o upload automático.</value>
Você gostaria de baixar automaticamente?</value> Você gostaria de baixar automaticamente?</value>
</data> </data>
<data name="ScreenRecordForm_StartRecording_FFmpeg_video_and_audio_source_both_can_t_be__None__" xml:space="preserve"> <data name="ScreenRecordForm_StartRecording_FFmpeg_video_and_audio_source_both_can_t_be__None__" xml:space="preserve">
<value>Fonte de video e audio para o FFmpeg não pode ser vazio.</value> <value>Fonte de video e áudio do FFmpeg não podem estar vazias.</value>
</data> </data>
<data name="TaskHelpers_OpenFTPClient_Unable_to_find_valid_FTP_account_" xml:space="preserve"> <data name="TaskHelpers_OpenFTPClient_Unable_to_find_valid_FTP_account_" xml:space="preserve">
<value>Não foi possivel encontar uma conta válida de FTP.</value> <value>Não foi possível encontrar uma conta FTP válida.</value>
</data> </data>
<data name="TaskHelpers_OpenQuickScreenColorPicker_Copied_to_clipboard___0_" xml:space="preserve"> <data name="TaskHelpers_OpenQuickScreenColorPicker_Copied_to_clipboard___0_" xml:space="preserve">
<value>Copiado para a área de transferência: {0}</value> <value>Copiado para a área de transferência: {0}</value>
@ -366,7 +366,7 @@ Por favor, execute o ShareX como administrador para mudar a pasta de destino.</v
{1} {1}
Por favor, selecione um atalho diferente ou feche a aplicação que está gerando o conflito e re-abra o ShareX.</value> Por favor, selecione um atalho diferente ou feche o programa conflituoso e reabra o ShareX.</value>
</data> </data>
<data name="TaskSettingsForm_UpdateUploaderMenuNames_After_capture___0_" xml:space="preserve"> <data name="TaskSettingsForm_UpdateUploaderMenuNames_After_capture___0_" xml:space="preserve">
<value>Depois da captura: {0}</value> <value>Depois da captura: {0}</value>
@ -444,7 +444,7 @@ Por favor, selecione um atalho diferente ou feche a aplicação que está gerand
<value>Personalizado</value> <value>Personalizado</value>
</data> </data>
<data name="MainForm_AfterShownJobs_You_can_single_left_click_the_ShareX_tray_icon_to_start_region_capture_" xml:space="preserve"> <data name="MainForm_AfterShownJobs_You_can_single_left_click_the_ShareX_tray_icon_to_start_region_capture_" xml:space="preserve">
<value>Você pode clicar com o botão direito no icone do ShareX na bandeja do sistema para iniciar captura por região.</value> <value>Você pode clicar com o botão direito no ícone do ShareX na bandeja do sistema para iniciar uma captura por região.</value>
</data> </data>
<data name="TaskHelpers_OpenImageEditor_Image_editor___How_to_load_image_" xml:space="preserve"> <data name="TaskHelpers_OpenImageEditor_Image_editor___How_to_load_image_" xml:space="preserve">
<value>Editor de imagem - como carregar a imagem?</value> <value>Editor de imagem - como carregar a imagem?</value>
@ -471,7 +471,7 @@ Tem certeza de que quer continuar?</value>
<value>Suporte ao Chrome desabilitado.</value> <value>Suporte ao Chrome desabilitado.</value>
</data> </data>
<data name="AboutForm_AboutForm_Changelog" xml:space="preserve"> <data name="AboutForm_AboutForm_Changelog" xml:space="preserve">
<value>Notas de atualização</value> <value>Registro de alterações</value>
</data> </data>
<data name="ImageData_Write_Error" xml:space="preserve"> <data name="ImageData_Write_Error" xml:space="preserve">
<value>Não foi possível salvar imagem no local {0}.</value> <value>Não foi possível salvar imagem no local {0}.</value>

View file

@ -160,9 +160,6 @@ Press 'No' to cancel the current upload and disable screenshot auto uploading.</
<data name="bin" type="System.Resources.ResXFileRef, System.Windows.Forms"> <data name="bin" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>..\Resources\bin.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value> <value>..\Resources\bin.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
</data> </data>
<data name="google_plus" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>..\Resources\google_plus.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
</data>
<data name="toolbox" type="System.Resources.ResXFileRef, System.Windows.Forms"> <data name="toolbox" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>..\Resources\toolbox.png;System.Drawing.Bitmap, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value> <value>..\Resources\toolbox.png;System.Drawing.Bitmap, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
</data> </data>
@ -696,9 +693,6 @@ Would you like to restart ShareX?</value>
<data name="es" type="System.Resources.ResXFileRef, System.Windows.Forms"> <data name="es" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>..\Resources\es.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value> <value>..\Resources\es.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
</data> </data>
<data name="CompanionCube" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>..\Resources\CompanionCube.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
</data>
<data name="layer_shape_polygon" type="System.Resources.ResXFileRef, System.Windows.Forms"> <data name="layer_shape_polygon" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>..\Resources\layer-shape-polygon.png;System.Drawing.Bitmap, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value> <value>..\Resources\layer-shape-polygon.png;System.Drawing.Bitmap, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
</data> </data>

98
ShareX/QuickTaskInfo.cs Normal file
View file

@ -0,0 +1,98 @@
#region License Information (GPL v3)
/*
ShareX - A program that allows you to take screenshots and share any file type
Copyright (c) 2007-2016 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;
using System.Collections.Generic;
using System.Linq;
using System.Text;
namespace ShareX
{
public class QuickTaskInfo
{
public string Name { get; set; }
public AfterCaptureTasks AfterCaptureTasks { get; set; }
public AfterUploadTasks AfterUploadTasks { get; set; }
public bool IsValid
{
get
{
return AfterCaptureTasks != AfterCaptureTasks.None;
}
}
public static List<QuickTaskInfo> DefaultPresets { get; } = new List<QuickTaskInfo>()
{
new QuickTaskInfo("Save, Upload, Copy URL", AfterCaptureTasks.SaveImageToFile | AfterCaptureTasks.UploadImageToHost, AfterUploadTasks.CopyURLToClipboard),
new QuickTaskInfo("Save, Copy image", AfterCaptureTasks.SaveImageToFile | AfterCaptureTasks.CopyImageToClipboard),
new QuickTaskInfo("Save, Copy image file", AfterCaptureTasks.SaveImageToFile | AfterCaptureTasks.CopyFileToClipboard),
new QuickTaskInfo("Annotate, Save, Upload, Copy URL", AfterCaptureTasks.AnnotateImage | AfterCaptureTasks.SaveImageToFile | AfterCaptureTasks.UploadImageToHost, AfterUploadTasks.CopyURLToClipboard),
new QuickTaskInfo(),
new QuickTaskInfo("Upload, Copy URL", AfterCaptureTasks.UploadImageToHost, AfterUploadTasks.CopyURLToClipboard),
new QuickTaskInfo("Save", AfterCaptureTasks.SaveImageToFile),
new QuickTaskInfo("Copy image", AfterCaptureTasks.CopyImageToClipboard),
new QuickTaskInfo("Annotate", AfterCaptureTasks.AnnotateImage)
};
public QuickTaskInfo()
{
}
public QuickTaskInfo(string name, AfterCaptureTasks afterCaptureTasks, AfterUploadTasks afterUploadTasks = AfterUploadTasks.None)
{
Name = name;
AfterCaptureTasks = afterCaptureTasks;
AfterUploadTasks = afterUploadTasks;
}
public QuickTaskInfo(AfterCaptureTasks afterCaptureTasks, AfterUploadTasks afterUploadTasks = AfterUploadTasks.None) : this(null, afterCaptureTasks, afterUploadTasks)
{
}
public override string ToString()
{
if (!string.IsNullOrEmpty(Name))
{
return Name;
}
string result = string.Join(", ", AfterCaptureTasks.GetFlags<AfterCaptureTasks>().Select(x => x.GetLocalizedDescription()));
if (AfterCaptureTasks.HasFlag(AfterCaptureTasks.UploadImageToHost))
{
string[] flags = AfterUploadTasks.GetFlags<AfterUploadTasks>().Select(x => x.GetLocalizedDescription()).ToArray();
if (flags != null && flags.Length > 0)
{
result += ", " + string.Join(", ", flags);
}
}
return result;
}
}
}

104
ShareX/QuickTaskMenu.cs Normal file
View file

@ -0,0 +1,104 @@
#region License Information (GPL v3)
/*
ShareX - A program that allows you to take screenshots and share any file type
Copyright (c) 2007-2016 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;
using System.Collections.Generic;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;
namespace ShareX
{
public class QuickTaskMenu
{
public delegate void TaskInfoSelectedEventHandler(QuickTaskInfo taskInfo);
public TaskInfoSelectedEventHandler TaskInfoSelected;
public void ShowMenu()
{
ContextMenuStrip cms = new ContextMenuStrip
{
Font = new Font("Arial", 10f),
AutoClose = false,
ShowImageMargin = false
};
if (Program.Settings != null && Program.Settings.QuickTaskPresets != null && Program.Settings.QuickTaskPresets.Count > 0)
{
foreach (QuickTaskInfo taskInfo in Program.Settings.QuickTaskPresets)
{
if (taskInfo.IsValid)
{
ToolStripMenuItem tsmi = new ToolStripMenuItem { Text = taskInfo.ToString().Replace("&", "&&"), Tag = taskInfo };
tsmi.Click += (sender, e) =>
{
QuickTaskInfo selectedTaskInfo = ((ToolStripMenuItem)sender).Tag as QuickTaskInfo;
cms.Close();
OnTaskInfoSelected(selectedTaskInfo);
};
cms.Items.Add(tsmi);
}
else
{
cms.Items.Add(new ToolStripSeparator());
}
}
cms.Items[0].Select();
cms.Items.Add(new ToolStripSeparator());
}
// Translate
ToolStripMenuItem tsmiEdit = new ToolStripMenuItem("Edit this menu...");
tsmiEdit.Click += (sender, e) =>
{
cms.Close();
new QuickTaskMenuEditorForm().ShowDialog();
};
cms.Items.Add(tsmiEdit);
cms.Items.Add(new ToolStripSeparator());
ToolStripMenuItem tsmiCancel = new ToolStripMenuItem("Cancel");
tsmiCancel.Click += (sender, e) => cms.Close();
cms.Items.Add(tsmiCancel);
Point cursorPosition = CaptureHelpers.GetCursorPosition();
cursorPosition.Offset(-10, -10);
cms.Show(cursorPosition);
}
protected void OnTaskInfoSelected(QuickTaskInfo taskInfo)
{
if (TaskInfoSelected != null)
{
TaskInfoSelected(taskInfo);
}
}
}
}

Binary file not shown.

Before

Width:  |  Height:  |  Size: 73 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.6 KiB

View file

@ -85,6 +85,10 @@
<HintPath>..\packages\Newtonsoft.Json.8.0.2\lib\net40\Newtonsoft.Json.dll</HintPath> <HintPath>..\packages\Newtonsoft.Json.8.0.2\lib\net40\Newtonsoft.Json.dll</HintPath>
<Private>True</Private> <Private>True</Private>
</Reference> </Reference>
<Reference Include="SevenZipSharp, Version=0.64.3890.29348, Culture=neutral, PublicKeyToken=20de82c62b055c88, processorArchitecture=MSIL">
<HintPath>..\packages\SevenZipSharp.0.64\lib\SevenZipSharp.dll</HintPath>
<Private>True</Private>
</Reference>
<Reference Include="System" /> <Reference Include="System" />
<Reference Include="System.Core"> <Reference Include="System.Core">
<RequiredTargetFramework>3.5</RequiredTargetFramework> <RequiredTargetFramework>3.5</RequiredTargetFramework>
@ -97,14 +101,13 @@
<Reference Include="System.Xml" /> <Reference Include="System.Xml" />
</ItemGroup> </ItemGroup>
<ItemGroup> <ItemGroup>
<Compile Include="CompanionCube.cs" />
<Compile Include="CompanionCubeManager.cs" />
<Compile Include="Controls\BeforeUploadControl.cs"> <Compile Include="Controls\BeforeUploadControl.cs">
<SubType>UserControl</SubType> <SubType>UserControl</SubType>
</Compile> </Compile>
<Compile Include="Controls\BeforeUploadControl.Designer.cs"> <Compile Include="Controls\BeforeUploadControl.Designer.cs">
<DependentUpon>BeforeUploadControl.cs</DependentUpon> <DependentUpon>BeforeUploadControl.cs</DependentUpon>
</Compile> </Compile>
<Compile Include="ExportImportManager.cs" />
<Compile Include="Forms\BeforeUploadForm.cs"> <Compile Include="Forms\BeforeUploadForm.cs">
<SubType>Form</SubType> <SubType>Form</SubType>
</Compile> </Compile>
@ -123,9 +126,6 @@
<Compile Include="Forms\ClipboardFormatForm.Designer.cs"> <Compile Include="Forms\ClipboardFormatForm.Designer.cs">
<DependentUpon>ClipboardFormatForm.cs</DependentUpon> <DependentUpon>ClipboardFormatForm.cs</DependentUpon>
</Compile> </Compile>
<Compile Include="Forms\CompanionCubesForm.cs">
<SubType>Form</SubType>
</Compile>
<Compile Include="Forms\EncoderProgramForm.cs"> <Compile Include="Forms\EncoderProgramForm.cs">
<SubType>Form</SubType> <SubType>Form</SubType>
</Compile> </Compile>
@ -172,6 +172,18 @@
<Compile Include="Forms\ImageCombinerForm.Designer.cs"> <Compile Include="Forms\ImageCombinerForm.Designer.cs">
<DependentUpon>ImageCombinerForm.cs</DependentUpon> <DependentUpon>ImageCombinerForm.cs</DependentUpon>
</Compile> </Compile>
<Compile Include="Forms\QuickTaskMenuEditorForm.cs">
<SubType>Form</SubType>
</Compile>
<Compile Include="Forms\QuickTaskMenuEditorForm.Designer.cs">
<DependentUpon>QuickTaskMenuEditorForm.cs</DependentUpon>
</Compile>
<Compile Include="Forms\QuickTaskInfoEditForm.cs">
<SubType>Form</SubType>
</Compile>
<Compile Include="Forms\QuickTaskInfoEditForm.Designer.cs">
<DependentUpon>QuickTaskInfoEditForm.cs</DependentUpon>
</Compile>
<Compile Include="Forms\ScreenColorPicker.cs"> <Compile Include="Forms\ScreenColorPicker.cs">
<SubType>Form</SubType> <SubType>Form</SubType>
</Compile> </Compile>
@ -187,6 +199,8 @@
<Compile Include="HotkeyTypeEnumConverter.cs" /> <Compile Include="HotkeyTypeEnumConverter.cs" />
<Compile Include="ImageCombinerOptions.cs" /> <Compile Include="ImageCombinerOptions.cs" />
<Compile Include="IntegrationHelpers.cs" /> <Compile Include="IntegrationHelpers.cs" />
<Compile Include="QuickTaskInfo.cs" />
<Compile Include="QuickTaskMenu.cs" />
<Compile Include="ScreenRecordManager.cs" /> <Compile Include="ScreenRecordManager.cs" />
<Compile Include="Forms\ScreenRecordForm.cs"> <Compile Include="Forms\ScreenRecordForm.cs">
<SubType>Form</SubType> <SubType>Form</SubType>
@ -811,6 +825,12 @@
<EmbeddedResource Include="Forms\MainForm.zh-CN.resx"> <EmbeddedResource Include="Forms\MainForm.zh-CN.resx">
<DependentUpon>MainForm.cs</DependentUpon> <DependentUpon>MainForm.cs</DependentUpon>
</EmbeddedResource> </EmbeddedResource>
<EmbeddedResource Include="Forms\QuickTaskInfoEditForm.resx">
<DependentUpon>QuickTaskInfoEditForm.cs</DependentUpon>
</EmbeddedResource>
<EmbeddedResource Include="Forms\QuickTaskMenuEditorForm.resx">
<DependentUpon>QuickTaskMenuEditorForm.cs</DependentUpon>
</EmbeddedResource>
<EmbeddedResource Include="Forms\ScreenColorPicker.de.resx"> <EmbeddedResource Include="Forms\ScreenColorPicker.de.resx">
<DependentUpon>ScreenColorPicker.cs</DependentUpon> <DependentUpon>ScreenColorPicker.cs</DependentUpon>
</EmbeddedResource> </EmbeddedResource>
@ -1207,7 +1227,6 @@
<None Include="Resources\crown.png" /> <None Include="Resources\crown.png" />
<None Include="Resources\layer--pencil.png" /> <None Include="Resources\layer--pencil.png" />
<None Include="Resources\globe-share.png" /> <None Include="Resources\globe-share.png" />
<None Include="Resources\google_plus.png" />
<None Include="Resources\document-copy.png" /> <None Include="Resources\document-copy.png" />
<None Include="Resources\image--pencil.png" /> <None Include="Resources\image--pencil.png" />
<None Include="Resources\exclamation-button.png" /> <None Include="Resources\exclamation-button.png" />
@ -1243,7 +1262,6 @@
<None Include="Resources\cross.png" /> <None Include="Resources\cross.png" />
<None Include="Resources\arrow-270.png" /> <None Include="Resources\arrow-270.png" />
<None Include="Resources\ru.png" /> <None Include="Resources\ru.png" />
<None Include="Resources\CompanionCube.png" />
<None Include="Resources\ui-scroll-pane-image.png" /> <None Include="Resources\ui-scroll-pane-image.png" />
<None Include="Resources\document-break.png" /> <None Include="Resources\document-break.png" />
<None Include="Resources\vn.png" /> <None Include="Resources\vn.png" />

View file

@ -2,4 +2,5 @@
<packages> <packages>
<package id="MegaApiClient" version="1.1.3" targetFramework="net40" /> <package id="MegaApiClient" version="1.1.3" targetFramework="net40" />
<package id="Newtonsoft.Json" version="8.0.2" targetFramework="net40" /> <package id="Newtonsoft.Json" version="8.0.2" targetFramework="net40" />
<package id="SevenZipSharp" version="0.64" targetFramework="net40" />
</packages> </packages>