mirror of
https://github.com/ShareX/ShareX.git
synced 2024-09-29 17:02:05 +13:00
CodeMaid cleanup, Moved few methods to URLHelpers from Helpers
This commit is contained in:
parent
db43494150
commit
d65b7fb150
53 changed files with 161 additions and 206 deletions
|
@ -1,4 +1,4 @@
|
|||
namespace HelpersLib.UserControls
|
||||
namespace HelpersLib
|
||||
{
|
||||
partial class ExportImportControl
|
||||
{
|
|
@ -26,17 +26,12 @@ You should have received a copy of the GNU General Public License
|
|||
using Newtonsoft.Json;
|
||||
using Newtonsoft.Json.Converters;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.ComponentModel;
|
||||
using System.Data;
|
||||
using System.Drawing;
|
||||
using System.Globalization;
|
||||
using System.IO;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Windows.Forms;
|
||||
|
||||
namespace HelpersLib.UserControls
|
||||
namespace HelpersLib
|
||||
{
|
||||
public partial class ExportImportControl : UserControl
|
||||
{
|
|
@ -24,12 +24,6 @@ You should have received a copy of the GNU General Public License
|
|||
#endregion License Information (GPL v3)
|
||||
|
||||
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 HelpersLib
|
|
@ -31,7 +31,7 @@ private void InitializeComponent()
|
|||
this.tvMain = new System.Windows.Forms.TreeView();
|
||||
this.scMain = new System.Windows.Forms.SplitContainer();
|
||||
this.panel1 = new System.Windows.Forms.Panel();
|
||||
this.tcMain = new HelpersLib.UserControls.TablessControl();
|
||||
this.tcMain = new HelpersLib.TablessControl();
|
||||
((System.ComponentModel.ISupportInitialize)(this.scMain)).BeginInit();
|
||||
this.scMain.Panel1.SuspendLayout();
|
||||
this.scMain.Panel2.SuspendLayout();
|
||||
|
@ -115,7 +115,7 @@ private void InitializeComponent()
|
|||
|
||||
private System.Windows.Forms.TreeView tvMain;
|
||||
private System.Windows.Forms.SplitContainer scMain;
|
||||
private UserControls.TablessControl tcMain;
|
||||
private TablessControl tcMain;
|
||||
private System.Windows.Forms.Panel panel1;
|
||||
}
|
||||
}
|
|
@ -23,13 +23,6 @@ You should have received a copy of the GNU General Public License
|
|||
|
||||
#endregion License Information (GPL v3)
|
||||
|
||||
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 HelpersLib
|
|
@ -24,12 +24,9 @@ You should have received a copy of the GNU General Public License
|
|||
#endregion License Information (GPL v3)
|
||||
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Windows.Forms;
|
||||
|
||||
namespace HelpersLib.UserControls
|
||||
namespace HelpersLib
|
||||
{
|
||||
public class TablessControl : TabControl
|
||||
{
|
|
@ -97,7 +97,7 @@ private void btnLoadedAssemblies_Click(object sender, EventArgs e)
|
|||
|
||||
private void rtbDebug_LinkClicked(object sender, LinkClickedEventArgs e)
|
||||
{
|
||||
Helpers.OpenURL(e.LinkText);
|
||||
URLHelpers.OpenURL(e.LinkText);
|
||||
}
|
||||
}
|
||||
}
|
|
@ -24,7 +24,6 @@ You should have received a copy of the GNU General Public License
|
|||
#endregion License Information (GPL v3)
|
||||
|
||||
using System;
|
||||
using System.Diagnostics;
|
||||
using System.IO;
|
||||
using System.Windows.Forms;
|
||||
|
||||
|
@ -74,7 +73,7 @@ private void btnOpenLogFile_Click(object sender, EventArgs e)
|
|||
|
||||
private void btnSendBugReport_Click(object sender, EventArgs e)
|
||||
{
|
||||
Helpers.OpenURL(BugReportPath);
|
||||
URLHelpers.OpenURL(BugReportPath);
|
||||
}
|
||||
|
||||
private void btnContinue_Click(object sender, EventArgs e)
|
||||
|
|
|
@ -95,9 +95,9 @@ private void InitializeComponent()
|
|||
this.btnCancel = new System.Windows.Forms.Button();
|
||||
this.txtInputText = new System.Windows.Forms.TextBox();
|
||||
this.SuspendLayout();
|
||||
//
|
||||
//
|
||||
// btnOK
|
||||
//
|
||||
//
|
||||
this.btnOK.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right)));
|
||||
this.btnOK.Location = new System.Drawing.Point(208, 32);
|
||||
this.btnOK.Name = "btnOK";
|
||||
|
@ -106,9 +106,9 @@ private void InitializeComponent()
|
|||
this.btnOK.Text = "OK";
|
||||
this.btnOK.UseVisualStyleBackColor = true;
|
||||
this.btnOK.Click += new System.EventHandler(this.btnOK_Click);
|
||||
//
|
||||
//
|
||||
// btnCancel
|
||||
//
|
||||
//
|
||||
this.btnCancel.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right)));
|
||||
this.btnCancel.Location = new System.Drawing.Point(288, 32);
|
||||
this.btnCancel.Name = "btnCancel";
|
||||
|
@ -117,18 +117,18 @@ private void InitializeComponent()
|
|||
this.btnCancel.Text = "Cancel";
|
||||
this.btnCancel.UseVisualStyleBackColor = true;
|
||||
this.btnCancel.Click += new System.EventHandler(this.btnCancel_Click);
|
||||
//
|
||||
//
|
||||
// txtInputText
|
||||
//
|
||||
this.txtInputText.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left)
|
||||
//
|
||||
this.txtInputText.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left)
|
||||
| System.Windows.Forms.AnchorStyles.Right)));
|
||||
this.txtInputText.Location = new System.Drawing.Point(8, 8);
|
||||
this.txtInputText.Name = "txtInputText";
|
||||
this.txtInputText.Size = new System.Drawing.Size(352, 20);
|
||||
this.txtInputText.TabIndex = 0;
|
||||
//
|
||||
//
|
||||
// InputBox
|
||||
//
|
||||
//
|
||||
this.AcceptButton = this.btnOK;
|
||||
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
|
||||
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
|
||||
|
@ -146,7 +146,6 @@ private void InitializeComponent()
|
|||
this.Shown += new System.EventHandler(this.InputBox_Shown);
|
||||
this.ResumeLayout(false);
|
||||
this.PerformLayout();
|
||||
|
||||
}
|
||||
|
||||
private System.Windows.Forms.Button btnOK;
|
||||
|
|
|
@ -27,7 +27,6 @@ You should have received a copy of the GNU General Public License
|
|||
using System;
|
||||
using System.Diagnostics;
|
||||
using System.Drawing;
|
||||
using System.Globalization;
|
||||
using System.IO;
|
||||
using System.Linq;
|
||||
using System.Media;
|
||||
|
@ -38,7 +37,6 @@ You should have received a copy of the GNU General Public License
|
|||
using System.Text;
|
||||
using System.Text.RegularExpressions;
|
||||
using System.Threading;
|
||||
using System.Web;
|
||||
using System.Windows.Forms;
|
||||
|
||||
namespace HelpersLib
|
||||
|
@ -393,24 +391,6 @@ public static bool IsDefaultInstallDir()
|
|||
return Application.ExecutablePath.StartsWith(path);
|
||||
}
|
||||
|
||||
public static void OpenURL(string url)
|
||||
{
|
||||
if (!string.IsNullOrEmpty(url))
|
||||
{
|
||||
TaskEx.Run(() =>
|
||||
{
|
||||
try
|
||||
{
|
||||
Process.Start(url);
|
||||
}
|
||||
catch (Exception e)
|
||||
{
|
||||
DebugHelper.WriteException(e, string.Format("OpenURL({0}) failed", url));
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
public static void OpenFile(string filepath)
|
||||
{
|
||||
if (!string.IsNullOrEmpty(filepath) && File.Exists(filepath))
|
||||
|
@ -667,28 +647,6 @@ public static string GetUniqueID()
|
|||
return Guid.NewGuid().ToString("N");
|
||||
}
|
||||
|
||||
public static string HtmlEncode(string text)
|
||||
{
|
||||
char[] chars = HttpUtility.HtmlEncode(text).ToCharArray();
|
||||
StringBuilder result = new StringBuilder(chars.Length + (int)(chars.Length * 0.1));
|
||||
|
||||
foreach (char c in chars)
|
||||
{
|
||||
int value = Convert.ToInt32(c);
|
||||
|
||||
if (value > 127)
|
||||
{
|
||||
result.AppendFormat("&#{0};", value);
|
||||
}
|
||||
else
|
||||
{
|
||||
result.Append(c);
|
||||
}
|
||||
}
|
||||
|
||||
return result.ToString();
|
||||
}
|
||||
|
||||
public static Point GetPosition(ContentAlignment placement, Point offset, Size backgroundSize, Size objectSize)
|
||||
{
|
||||
int midX = backgroundSize.Width / 2 - objectSize.Width / 2;
|
||||
|
|
|
@ -23,19 +23,38 @@ You should have received a copy of the GNU General Public License
|
|||
|
||||
#endregion License Information (GPL v3)
|
||||
|
||||
using HelpersLib;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Diagnostics;
|
||||
using System.Globalization;
|
||||
using System.IO;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Text.RegularExpressions;
|
||||
using System.Web;
|
||||
|
||||
namespace HelpersLib
|
||||
{
|
||||
public static class URLHelpers
|
||||
{
|
||||
public static void OpenURL(string url)
|
||||
{
|
||||
if (!string.IsNullOrEmpty(url))
|
||||
{
|
||||
TaskEx.Run(() =>
|
||||
{
|
||||
try
|
||||
{
|
||||
Process.Start(url);
|
||||
}
|
||||
catch (Exception e)
|
||||
{
|
||||
DebugHelper.WriteException(e, string.Format("OpenURL({0}) failed", url));
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
private static string Encode(string text, string unreservedCharacters)
|
||||
{
|
||||
StringBuilder result = new StringBuilder();
|
||||
|
@ -73,6 +92,28 @@ public static string URLPathEncode(string text)
|
|||
return Encode(text, Helpers.URLPathCharacters);
|
||||
}
|
||||
|
||||
public static string HtmlEncode(string text)
|
||||
{
|
||||
char[] chars = HttpUtility.HtmlEncode(text).ToCharArray();
|
||||
StringBuilder result = new StringBuilder(chars.Length + (int)(chars.Length * 0.1));
|
||||
|
||||
foreach (char c in chars)
|
||||
{
|
||||
int value = Convert.ToInt32(c);
|
||||
|
||||
if (value > 127)
|
||||
{
|
||||
result.AppendFormat("&#{0};", value);
|
||||
}
|
||||
else
|
||||
{
|
||||
result.Append(c);
|
||||
}
|
||||
}
|
||||
|
||||
return result.ToString();
|
||||
}
|
||||
|
||||
public static string CombineURL(string url1, string url2)
|
||||
{
|
||||
bool url1Empty = string.IsNullOrEmpty(url1);
|
||||
|
|
|
@ -115,25 +115,25 @@
|
|||
<Compile Include="PingHelper.cs" />
|
||||
<Compile Include="PingResult.cs" />
|
||||
<Compile Include="ProxyInfo.cs" />
|
||||
<Compile Include="UserControls\ExportImportControl.cs">
|
||||
<Compile Include="Controls\ExportImportControl.cs">
|
||||
<SubType>UserControl</SubType>
|
||||
</Compile>
|
||||
<Compile Include="UserControls\ExportImportControl.Designer.cs">
|
||||
<Compile Include="Controls\ExportImportControl.Designer.cs">
|
||||
<DependentUpon>ExportImportControl.cs</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="UserControls\TablessControl.cs">
|
||||
<Compile Include="Controls\TablessControl.cs">
|
||||
<SubType>Component</SubType>
|
||||
</Compile>
|
||||
<Compile Include="UserControls\TabToListView.cs">
|
||||
<Compile Include="Controls\TabToListView.cs">
|
||||
<SubType>UserControl</SubType>
|
||||
</Compile>
|
||||
<Compile Include="UserControls\TabToListView.Designer.cs">
|
||||
<Compile Include="Controls\TabToListView.Designer.cs">
|
||||
<DependentUpon>TabToListView.cs</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="UserControls\TabToTreeView.cs">
|
||||
<Compile Include="Controls\TabToTreeView.cs">
|
||||
<SubType>UserControl</SubType>
|
||||
</Compile>
|
||||
<Compile Include="UserControls\TabToTreeView.Designer.cs">
|
||||
<Compile Include="Controls\TabToTreeView.Designer.cs">
|
||||
<DependentUpon>TabToTreeView.cs</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="TaskEx.cs" />
|
||||
|
@ -246,28 +246,28 @@
|
|||
<DependentUpon>DownloaderForm.cs</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="FileDownloader.cs" />
|
||||
<Compile Include="UserControls\BlackStyle\BlackStyleButton.cs">
|
||||
<Compile Include="Controls\BlackStyle\BlackStyleButton.cs">
|
||||
<SubType>Component</SubType>
|
||||
</Compile>
|
||||
<Compile Include="UserControls\BlackStyle\BlackStyleCheckBox.cs">
|
||||
<Compile Include="Controls\BlackStyle\BlackStyleCheckBox.cs">
|
||||
<SubType>Component</SubType>
|
||||
</Compile>
|
||||
<Compile Include="UserControls\BlackStyle\BlackStyleLabel.cs">
|
||||
<Compile Include="Controls\BlackStyle\BlackStyleLabel.cs">
|
||||
<SubType>Component</SubType>
|
||||
</Compile>
|
||||
<Compile Include="UserControls\BlackStyle\BlackStyleProgressBar.cs">
|
||||
<Compile Include="Controls\BlackStyle\BlackStyleProgressBar.cs">
|
||||
<SubType>Component</SubType>
|
||||
</Compile>
|
||||
<Compile Include="UserControls\Canvas.cs">
|
||||
<Compile Include="Controls\Canvas.cs">
|
||||
<SubType>UserControl</SubType>
|
||||
</Compile>
|
||||
<Compile Include="UserControls\ColorButton.cs">
|
||||
<Compile Include="Controls\ColorButton.cs">
|
||||
<SubType>Component</SubType>
|
||||
</Compile>
|
||||
<Compile Include="UserControls\MenuButton.cs">
|
||||
<Compile Include="Controls\MenuButton.cs">
|
||||
<SubType>Component</SubType>
|
||||
</Compile>
|
||||
<Compile Include="UserControls\NoFocusBorderButton.cs">
|
||||
<Compile Include="Controls\NoFocusBorderButton.cs">
|
||||
<SubType>Component</SubType>
|
||||
</Compile>
|
||||
<Compile Include="Native\NativeEnums.cs" />
|
||||
|
@ -300,16 +300,16 @@
|
|||
<Compile Include="UpdateChecker\UpdateCheckerLabel.Designer.cs">
|
||||
<DependentUpon>UpdateCheckerLabel.cs</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="UserControls\SplitContainerCustomSplitter.cs">
|
||||
<Compile Include="Controls\SplitContainerCustomSplitter.cs">
|
||||
<SubType>Component</SubType>
|
||||
</Compile>
|
||||
<Compile Include="UserControls\ToolStripRadioButtonMenuItem.cs">
|
||||
<Compile Include="Controls\ToolStripRadioButtonMenuItem.cs">
|
||||
<SubType>Component</SubType>
|
||||
</Compile>
|
||||
<Compile Include="Forms\ImageViewer.cs">
|
||||
<SubType>Form</SubType>
|
||||
</Compile>
|
||||
<Compile Include="UserControls\MyListView.cs">
|
||||
<Compile Include="Controls\MyListView.cs">
|
||||
<SubType>Component</SubType>
|
||||
</Compile>
|
||||
<Compile Include="Enums.cs" />
|
||||
|
@ -322,10 +322,10 @@
|
|||
<Compile Include="Extensions\StreamExtensions.cs" />
|
||||
<Compile Include="Extensions\StringExtensions.cs" />
|
||||
<Compile Include="Extensions\XMLExtensions.cs" />
|
||||
<Compile Include="UserControls\MyPictureBox.cs">
|
||||
<Compile Include="Controls\MyPictureBox.cs">
|
||||
<SubType>UserControl</SubType>
|
||||
</Compile>
|
||||
<Compile Include="UserControls\MyPictureBox.Designer.cs">
|
||||
<Compile Include="Controls\MyPictureBox.Designer.cs">
|
||||
<DependentUpon>MyPictureBox.cs</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="UpdateChecker\XMLUpdateChecker.cs" />
|
||||
|
@ -362,13 +362,13 @@
|
|||
<EmbeddedResource Include="Forms\QRCodeForm.resx">
|
||||
<DependentUpon>QRCodeForm.cs</DependentUpon>
|
||||
</EmbeddedResource>
|
||||
<EmbeddedResource Include="UserControls\ExportImportControl.resx">
|
||||
<EmbeddedResource Include="Controls\ExportImportControl.resx">
|
||||
<DependentUpon>ExportImportControl.cs</DependentUpon>
|
||||
</EmbeddedResource>
|
||||
<EmbeddedResource Include="UserControls\TabToListView.resx">
|
||||
<EmbeddedResource Include="Controls\TabToListView.resx">
|
||||
<DependentUpon>TabToListView.cs</DependentUpon>
|
||||
</EmbeddedResource>
|
||||
<EmbeddedResource Include="UserControls\TabToTreeView.resx">
|
||||
<EmbeddedResource Include="Controls\TabToTreeView.resx">
|
||||
<DependentUpon>TabToTreeView.cs</DependentUpon>
|
||||
</EmbeddedResource>
|
||||
<EmbeddedResource Include="UpdateChecker\DownloaderForm.resx">
|
||||
|
@ -394,7 +394,7 @@
|
|||
<DependentUpon>UpdateCheckerLabel.cs</DependentUpon>
|
||||
<SubType>Designer</SubType>
|
||||
</EmbeddedResource>
|
||||
<EmbeddedResource Include="UserControls\MyPictureBox.resx">
|
||||
<EmbeddedResource Include="Controls\MyPictureBox.resx">
|
||||
<DependentUpon>MyPictureBox.cs</DependentUpon>
|
||||
</EmbeddedResource>
|
||||
</ItemGroup>
|
||||
|
|
|
@ -24,10 +24,7 @@ You should have received a copy of the GNU General Public License
|
|||
#endregion License Information (GPL v3)
|
||||
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Diagnostics;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Windows.Forms;
|
||||
|
||||
namespace HelpersLib
|
||||
|
|
|
@ -111,27 +111,27 @@ public HistoryItem[] OnGetHistoryItems()
|
|||
|
||||
public void OpenURL()
|
||||
{
|
||||
if (HistoryItem != null && IsURLExist) Helpers.OpenURL(HistoryItem.URL);
|
||||
if (HistoryItem != null && IsURLExist) URLHelpers.OpenURL(HistoryItem.URL);
|
||||
}
|
||||
|
||||
public void OpenShortenedURL()
|
||||
{
|
||||
if (HistoryItem != null && IsShortenedURLExist) Helpers.OpenURL(HistoryItem.ShortenedURL);
|
||||
if (HistoryItem != null && IsShortenedURLExist) URLHelpers.OpenURL(HistoryItem.ShortenedURL);
|
||||
}
|
||||
|
||||
public void OpenThumbnailURL()
|
||||
{
|
||||
if (HistoryItem != null && IsThumbnailURLExist) Helpers.OpenURL(HistoryItem.ThumbnailURL);
|
||||
if (HistoryItem != null && IsThumbnailURLExist) URLHelpers.OpenURL(HistoryItem.ThumbnailURL);
|
||||
}
|
||||
|
||||
public void OpenDeletionURL()
|
||||
{
|
||||
if (HistoryItem != null && IsDeletionURLExist) Helpers.OpenURL(HistoryItem.DeletionURL);
|
||||
if (HistoryItem != null && IsDeletionURLExist) URLHelpers.OpenURL(HistoryItem.DeletionURL);
|
||||
}
|
||||
|
||||
public void OpenFile()
|
||||
{
|
||||
if (HistoryItem != null && IsFileExist) Helpers.OpenURL(HistoryItem.Filepath);
|
||||
if (HistoryItem != null && IsFileExist) URLHelpers.OpenURL(HistoryItem.Filepath);
|
||||
}
|
||||
|
||||
public void OpenFolder()
|
||||
|
@ -145,15 +145,15 @@ public void TryOpen()
|
|||
{
|
||||
if (IsShortenedURLExist)
|
||||
{
|
||||
Helpers.OpenURL(HistoryItem.ShortenedURL);
|
||||
URLHelpers.OpenURL(HistoryItem.ShortenedURL);
|
||||
}
|
||||
else if (IsURLExist)
|
||||
{
|
||||
Helpers.OpenURL(HistoryItem.URL);
|
||||
URLHelpers.OpenURL(HistoryItem.URL);
|
||||
}
|
||||
else if (IsFileExist)
|
||||
{
|
||||
Helpers.OpenURL(HistoryItem.Filepath);
|
||||
URLHelpers.OpenURL(HistoryItem.Filepath);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -23,9 +23,6 @@ You should have received a copy of the GNU General Public License
|
|||
|
||||
#endregion License Information (GPL v3)
|
||||
|
||||
using HelpersLib;
|
||||
using Newtonsoft.Json;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Drawing;
|
||||
using System.Linq;
|
||||
|
|
8
ImageEffectsLib/ImageEffectsForm.Designer.cs
generated
8
ImageEffectsLib/ImageEffectsForm.Designer.cs
generated
|
@ -43,7 +43,7 @@ private void InitializeComponent()
|
|||
this.btnRefresh = new System.Windows.Forms.Button();
|
||||
this.btnLoadImage = new System.Windows.Forms.Button();
|
||||
this.btnSaveImage = new System.Windows.Forms.Button();
|
||||
this.eiImageEffects = new HelpersLib.UserControls.ExportImportControl();
|
||||
this.eiImageEffects = new HelpersLib.ExportImportControl();
|
||||
this.pbResult = new HelpersLib.MyPictureBox();
|
||||
this.SuspendLayout();
|
||||
//
|
||||
|
@ -221,8 +221,8 @@ private void InitializeComponent()
|
|||
this.eiImageEffects.ObjectType = null;
|
||||
this.eiImageEffects.Size = new System.Drawing.Size(136, 24);
|
||||
this.eiImageEffects.TabIndex = 11;
|
||||
this.eiImageEffects.ExportRequested += new HelpersLib.UserControls.ExportImportControl.ExportEventHandler(this.eiImageEffects_ExportRequested);
|
||||
this.eiImageEffects.ImportRequested += new HelpersLib.UserControls.ExportImportControl.ImportEventHandler(this.eiImageEffects_ImportRequested);
|
||||
this.eiImageEffects.ExportRequested += new HelpersLib.ExportImportControl.ExportEventHandler(this.eiImageEffects_ExportRequested);
|
||||
this.eiImageEffects.ImportRequested += new HelpersLib.ExportImportControl.ImportEventHandler(this.eiImageEffects_ImportRequested);
|
||||
//
|
||||
// pbResult
|
||||
//
|
||||
|
@ -289,7 +289,7 @@ private void InitializeComponent()
|
|||
private System.Windows.Forms.Button btnRefresh;
|
||||
private System.Windows.Forms.Button btnLoadImage;
|
||||
private System.Windows.Forms.Button btnSaveImage;
|
||||
private HelpersLib.UserControls.ExportImportControl eiImageEffects;
|
||||
private HelpersLib.ExportImportControl eiImageEffects;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -74,7 +74,7 @@ public static string EndTag(string tag)
|
|||
|
||||
public static string Tag(string tag, string content, string style = "", string otherFields = "")
|
||||
{
|
||||
return StartTag(tag, style, otherFields) + Helpers.HtmlEncode(content) + EndTag(tag);
|
||||
return StartTag(tag, style, otherFields) + URLHelpers.HtmlEncode(content) + EndTag(tag);
|
||||
}
|
||||
}
|
||||
}
|
|
@ -112,14 +112,14 @@ protected override string GetFolderNameRow(FolderInfo dir, int level)
|
|||
folderInfoText = " " + HtmlHelper.Tag("span", folderInfoText, "", "class=\"folderinfo\"");
|
||||
}
|
||||
|
||||
return HtmlHelper.StartTag("h" + heading) + Helpers.HtmlEncode(dir.FolderName) + folderInfoText + HtmlHelper.EndTag("h" + heading);
|
||||
return HtmlHelper.StartTag("h" + heading) + URLHelpers.HtmlEncode(dir.FolderName) + folderInfoText + HtmlHelper.EndTag("h" + heading);
|
||||
}
|
||||
|
||||
protected override string GetFileNameRow(FileInfo fi, int level)
|
||||
{
|
||||
string size = " " + HtmlHelper.Tag("span", fi.Length.ToSizeString(config.BinaryUnits), "", "class=\"filesize\"");
|
||||
|
||||
return HtmlHelper.StartTag("li") + Helpers.HtmlEncode(fi.Name) + size + HtmlHelper.EndTag("li");
|
||||
return HtmlHelper.StartTag("li") + URLHelpers.HtmlEncode(fi.Name) + size + HtmlHelper.EndTag("li");
|
||||
}
|
||||
|
||||
protected override string GetFooter()
|
||||
|
|
|
@ -81,7 +81,7 @@ private void InitializeComponent()
|
|||
this.btnRefreshSources = new System.Windows.Forms.Button();
|
||||
this.cbShowError = new System.Windows.Forms.CheckBox();
|
||||
this.btnHelp = new System.Windows.Forms.Button();
|
||||
this.eiFFmpeg = new HelpersLib.UserControls.ExportImportControl();
|
||||
this.eiFFmpeg = new HelpersLib.ExportImportControl();
|
||||
((System.ComponentModel.ISupportInitialize)(this.nudx264CRF)).BeginInit();
|
||||
((System.ComponentModel.ISupportInitialize)(this.nudQscale)).BeginInit();
|
||||
((System.ComponentModel.ISupportInitialize)(this.nudVPxCRF)).BeginInit();
|
||||
|
@ -703,8 +703,8 @@ private void InitializeComponent()
|
|||
this.eiFFmpeg.ObjectType = null;
|
||||
this.eiFFmpeg.Size = new System.Drawing.Size(136, 24);
|
||||
this.eiFFmpeg.TabIndex = 12;
|
||||
this.eiFFmpeg.ExportRequested += new HelpersLib.UserControls.ExportImportControl.ExportEventHandler(this.eiFFmpeg_ExportRequested);
|
||||
this.eiFFmpeg.ImportRequested += new HelpersLib.UserControls.ExportImportControl.ImportEventHandler(this.eiFFmpeg_ImportRequested);
|
||||
this.eiFFmpeg.ExportRequested += new HelpersLib.ExportImportControl.ExportEventHandler(this.eiFFmpeg_ExportRequested);
|
||||
this.eiFFmpeg.ImportRequested += new HelpersLib.ExportImportControl.ImportEventHandler(this.eiFFmpeg_ImportRequested);
|
||||
//
|
||||
// FFmpegOptionsForm
|
||||
//
|
||||
|
@ -823,6 +823,6 @@ private void InitializeComponent()
|
|||
private System.Windows.Forms.CheckBox cbShowError;
|
||||
private System.Windows.Forms.CheckBox cbCustomCommands;
|
||||
private System.Windows.Forms.Button btnHelp;
|
||||
private HelpersLib.UserControls.ExportImportControl eiFFmpeg;
|
||||
private HelpersLib.ExportImportControl eiFFmpeg;
|
||||
}
|
||||
}
|
|
@ -28,7 +28,6 @@ You should have received a copy of the GNU General Public License
|
|||
using System.Diagnostics;
|
||||
using System.Drawing;
|
||||
using System.IO;
|
||||
using System.Linq;
|
||||
using System.Windows.Forms;
|
||||
|
||||
namespace ScreenCaptureLib
|
||||
|
@ -274,7 +273,7 @@ private void tbUserArgs_TextChanged(object sender, EventArgs e)
|
|||
|
||||
private void buttonFFmpegHelp_Click(object sender, EventArgs e)
|
||||
{
|
||||
Helpers.OpenURL("https://www.ffmpeg.org/ffmpeg.html");
|
||||
URLHelpers.OpenURL("https://www.ffmpeg.org/ffmpeg.html");
|
||||
}
|
||||
|
||||
private void btnDownload_Click(object sender, EventArgs e)
|
||||
|
@ -354,7 +353,7 @@ private void txtCommandLinePreview_TextChanged(object sender, EventArgs e)
|
|||
|
||||
private void btnHelp_Click(object sender, EventArgs e)
|
||||
{
|
||||
Helpers.OpenURL("https://docs.google.com/document/d/1aKLSqsouoeC5Tjf-Z3P880V3rpzvQU0A2Clayn9ElZo/edit?usp=sharing");
|
||||
URLHelpers.OpenURL("https://docs.google.com/document/d/1aKLSqsouoeC5Tjf-Z3P880V3rpzvQU0A2Clayn9ElZo/edit?usp=sharing");
|
||||
}
|
||||
|
||||
private object eiFFmpeg_ExportRequested()
|
||||
|
|
|
@ -55,32 +55,32 @@ private void AboutForm_Shown(object sender, EventArgs e)
|
|||
|
||||
private void lblProductName_Click(object sender, EventArgs e)
|
||||
{
|
||||
Helpers.OpenURL(Links.URL_VERSION_HISTORY);
|
||||
URLHelpers.OpenURL(Links.URL_VERSION_HISTORY);
|
||||
}
|
||||
|
||||
private void pbBerkURL_Click(object sender, EventArgs e)
|
||||
{
|
||||
Helpers.OpenURL(Links.URL_BERK);
|
||||
URLHelpers.OpenURL(Links.URL_BERK);
|
||||
}
|
||||
|
||||
private void pbBerkSteamURL_Click(object sender, EventArgs e)
|
||||
{
|
||||
Helpers.OpenURL(Links.URL_BERK_STEAM);
|
||||
URLHelpers.OpenURL(Links.URL_BERK_STEAM);
|
||||
}
|
||||
|
||||
private void pbMikeURL_Click(object sender, EventArgs e)
|
||||
{
|
||||
Helpers.OpenURL(Links.URL_MIKE);
|
||||
URLHelpers.OpenURL(Links.URL_MIKE);
|
||||
}
|
||||
|
||||
private void pbMikeSteamURL_Click(object sender, EventArgs e)
|
||||
{
|
||||
Helpers.OpenURL(Links.URL_MIKE_STEAM);
|
||||
URLHelpers.OpenURL(Links.URL_MIKE_STEAM);
|
||||
}
|
||||
|
||||
private void rtb_LinkClicked(object sender, LinkClickedEventArgs e)
|
||||
{
|
||||
Helpers.OpenURL(e.LinkText);
|
||||
URLHelpers.OpenURL(e.LinkText);
|
||||
}
|
||||
|
||||
#region Animation
|
||||
|
|
|
@ -169,7 +169,7 @@ private void btnOpenLink_Click(object sender, EventArgs e)
|
|||
|
||||
if (!string.IsNullOrEmpty(url))
|
||||
{
|
||||
Helpers.OpenURL(url);
|
||||
URLHelpers.OpenURL(url);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -177,7 +177,7 @@ private void btnOpenFile_Click(object sender, EventArgs e)
|
|||
{
|
||||
if (!string.IsNullOrEmpty(Info.FilePath) && File.Exists(Info.FilePath))
|
||||
{
|
||||
Helpers.OpenURL(Info.FilePath);
|
||||
URLHelpers.OpenURL(Info.FilePath);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -24,7 +24,6 @@ You should have received a copy of the GNU General Public License
|
|||
#endregion License Information (GPL v3)
|
||||
|
||||
using HelpersLib;
|
||||
using HelpersLib.UserControls;
|
||||
using HistoryLib;
|
||||
using ScreenCaptureLib;
|
||||
using ShareX.Properties;
|
||||
|
@ -895,7 +894,7 @@ private void tsbAbout_Click(object sender, EventArgs e)
|
|||
|
||||
private void tsbDonate_Click(object sender, EventArgs e)
|
||||
{
|
||||
Helpers.OpenURL(Links.URL_DONATE);
|
||||
URLHelpers.OpenURL(Links.URL_DONATE);
|
||||
}
|
||||
|
||||
private void lblDragAndDropTip_MouseUp(object sender, MouseEventArgs e)
|
||||
|
@ -990,7 +989,7 @@ private void niTray_BalloonTipClicked(object sender, EventArgs e)
|
|||
|
||||
if (!string.IsNullOrEmpty(url))
|
||||
{
|
||||
Helpers.OpenURL(url);
|
||||
URLHelpers.OpenURL(url);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -183,7 +183,7 @@ private void NotificationForm_MouseClick(object sender, MouseEventArgs e)
|
|||
break;
|
||||
case ToastClickAction.OpenFile:
|
||||
if (!string.IsNullOrEmpty(ToastConfig.FilePath))
|
||||
Helpers.OpenURL(ToastConfig.FilePath);
|
||||
URLHelpers.OpenURL(ToastConfig.FilePath);
|
||||
break;
|
||||
case ToastClickAction.OpenFolder:
|
||||
if (!string.IsNullOrEmpty(ToastConfig.FilePath))
|
||||
|
@ -191,7 +191,7 @@ private void NotificationForm_MouseClick(object sender, MouseEventArgs e)
|
|||
break;
|
||||
case ToastClickAction.OpenUrl:
|
||||
if (!string.IsNullOrEmpty(ToastConfig.URL))
|
||||
Helpers.OpenURL(ToastConfig.URL);
|
||||
URLHelpers.OpenURL(ToastConfig.URL);
|
||||
break;
|
||||
case ToastClickAction.Upload:
|
||||
if (!string.IsNullOrEmpty(ToastConfig.FilePath))
|
||||
|
|
|
@ -96,32 +96,32 @@ public void RefreshSelectedItems()
|
|||
|
||||
public void OpenURL()
|
||||
{
|
||||
if (IsItemSelected && SelectedItem.IsURLExist) Helpers.OpenURL(SelectedItem.Info.Result.URL);
|
||||
if (IsItemSelected && SelectedItem.IsURLExist) URLHelpers.OpenURL(SelectedItem.Info.Result.URL);
|
||||
}
|
||||
|
||||
public void OpenShortenedURL()
|
||||
{
|
||||
if (IsItemSelected && SelectedItem.IsShortenedURLExist) Helpers.OpenURL(SelectedItem.Info.Result.ShortenedURL);
|
||||
if (IsItemSelected && SelectedItem.IsShortenedURLExist) URLHelpers.OpenURL(SelectedItem.Info.Result.ShortenedURL);
|
||||
}
|
||||
|
||||
public void OpenThumbnailURL()
|
||||
{
|
||||
if (IsItemSelected && SelectedItem.IsThumbnailURLExist) Helpers.OpenURL(SelectedItem.Info.Result.ThumbnailURL);
|
||||
if (IsItemSelected && SelectedItem.IsThumbnailURLExist) URLHelpers.OpenURL(SelectedItem.Info.Result.ThumbnailURL);
|
||||
}
|
||||
|
||||
public void OpenDeletionURL()
|
||||
{
|
||||
if (IsItemSelected && SelectedItem.IsDeletionURLExist) Helpers.OpenURL(SelectedItem.Info.Result.DeletionURL);
|
||||
if (IsItemSelected && SelectedItem.IsDeletionURLExist) URLHelpers.OpenURL(SelectedItem.Info.Result.DeletionURL);
|
||||
}
|
||||
|
||||
public void OpenFile()
|
||||
{
|
||||
if (IsItemSelected && SelectedItem.IsFileExist) Helpers.OpenURL(SelectedItem.Info.FilePath);
|
||||
if (IsItemSelected && SelectedItem.IsFileExist) URLHelpers.OpenURL(SelectedItem.Info.FilePath);
|
||||
}
|
||||
|
||||
public void OpenThumbnailFile()
|
||||
{
|
||||
if (IsItemSelected && SelectedItem.IsThumbnailFileExist) Helpers.OpenURL(SelectedItem.Info.ThumbnailFilePath);
|
||||
if (IsItemSelected && SelectedItem.IsThumbnailFileExist) URLHelpers.OpenURL(SelectedItem.Info.ThumbnailFilePath);
|
||||
}
|
||||
|
||||
public void OpenFolder()
|
||||
|
@ -135,15 +135,15 @@ public void TryOpen()
|
|||
{
|
||||
if (SelectedItem.IsShortenedURLExist)
|
||||
{
|
||||
Helpers.OpenURL(SelectedItem.Info.Result.ShortenedURL);
|
||||
URLHelpers.OpenURL(SelectedItem.Info.Result.ShortenedURL);
|
||||
}
|
||||
else if (SelectedItem.IsURLExist)
|
||||
{
|
||||
Helpers.OpenURL(SelectedItem.Info.Result.URL);
|
||||
URLHelpers.OpenURL(SelectedItem.Info.Result.URL);
|
||||
}
|
||||
else if (SelectedItem.IsFileExist)
|
||||
{
|
||||
Helpers.OpenURL(SelectedItem.Info.FilePath);
|
||||
URLHelpers.OpenURL(SelectedItem.Info.FilePath);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -632,7 +632,7 @@ private void DoAfterUploadJobs()
|
|||
result = Info.Result.ToString();
|
||||
}
|
||||
|
||||
Helpers.OpenURL(result);
|
||||
URLHelpers.OpenURL(result);
|
||||
}
|
||||
|
||||
if (Info.TaskSettings.AfterUploadJob.HasFlag(AfterUploadTasks.ShowQRCode))
|
||||
|
@ -1026,7 +1026,7 @@ public void DoSocialNetworkingService()
|
|||
break;
|
||||
case SocialNetworkingService.GooglePlus:
|
||||
// The Google+ API currently provides read-only access to public data. So sharing with API not possible yet.
|
||||
Helpers.OpenURL("https://plus.google.com/share?url=" + url);
|
||||
URLHelpers.OpenURL("https://plus.google.com/share?url=" + url);
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -26,7 +26,6 @@ You should have received a copy of the GNU General Public License
|
|||
using HelpersLib;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Diagnostics;
|
||||
using System.Drawing;
|
||||
using System.IO;
|
||||
using System.Linq;
|
||||
|
@ -560,7 +559,7 @@ private void openURLToolStripMenuItem_Click(object sender, EventArgs e)
|
|||
{
|
||||
FtpListItem file = lvFTPList.SelectedItems[0].Tag as FtpListItem;
|
||||
string url = GetURL(file);
|
||||
Helpers.OpenURL(url);
|
||||
URLHelpers.OpenURL(url);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -27,11 +27,9 @@ You should have received a copy of the GNU General Public License
|
|||
|
||||
using HelpersLib;
|
||||
using Newtonsoft.Json;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Collections.Specialized;
|
||||
using System.IO;
|
||||
using System.Text.RegularExpressions;
|
||||
using UploadersLib.HelperClasses;
|
||||
|
||||
namespace UploadersLib.FileUploaders
|
||||
|
|
|
@ -28,8 +28,6 @@ You should have received a copy of the GNU General Public License
|
|||
using HelpersLib;
|
||||
using Newtonsoft.Json;
|
||||
using System.Collections.Generic;
|
||||
using System.Collections.Specialized;
|
||||
using System.ComponentModel;
|
||||
using System.IO;
|
||||
using System.Threading;
|
||||
using UploadersLib.HelperClasses;
|
||||
|
|
|
@ -25,8 +25,6 @@ You should have received a copy of the GNU General Public License
|
|||
|
||||
using HelpersLib;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Windows.Forms;
|
||||
using UploadersLib.HelperClasses;
|
||||
using UploadersLib.ImageUploaders;
|
||||
|
|
16
UploadersLib/Forms/UploadersConfigForm.Designer.cs
generated
16
UploadersLib/Forms/UploadersConfigForm.Designer.cs
generated
|
@ -50,7 +50,7 @@ private void InitializeComponent()
|
|||
this.lblCustomUploaderResponseType = new System.Windows.Forms.Label();
|
||||
this.cbCustomUploaderURLShortener = new System.Windows.Forms.ComboBox();
|
||||
this.gbCustomUploaders = new System.Windows.Forms.GroupBox();
|
||||
this.eiCustomUploaders = new HelpersLib.UserControls.ExportImportControl();
|
||||
this.eiCustomUploaders = new HelpersLib.ExportImportControl();
|
||||
this.lbCustomUploaderList = new System.Windows.Forms.ListBox();
|
||||
this.btnCustomUploaderRemove = new System.Windows.Forms.Button();
|
||||
this.btnCustomUploaderClear = new System.Windows.Forms.Button();
|
||||
|
@ -130,7 +130,7 @@ private void InitializeComponent()
|
|||
this.lblCopyPath = new System.Windows.Forms.Label();
|
||||
this.txtCopyPath = new System.Windows.Forms.TextBox();
|
||||
this.tpFTP = new System.Windows.Forms.TabPage();
|
||||
this.eiFTP = new HelpersLib.UserControls.ExportImportControl();
|
||||
this.eiFTP = new HelpersLib.ExportImportControl();
|
||||
this.btnFtpClient = new System.Windows.Forms.Button();
|
||||
this.lblFtpFiles = new System.Windows.Forms.Label();
|
||||
this.lblFtpText = new System.Windows.Forms.Label();
|
||||
|
@ -652,8 +652,8 @@ private void InitializeComponent()
|
|||
this.eiCustomUploaders.ObjectType = null;
|
||||
this.eiCustomUploaders.Size = new System.Drawing.Size(140, 26);
|
||||
this.eiCustomUploaders.TabIndex = 5;
|
||||
this.eiCustomUploaders.ExportRequested += new HelpersLib.UserControls.ExportImportControl.ExportEventHandler(this.eiCustomUploaders_ExportRequested);
|
||||
this.eiCustomUploaders.ImportRequested += new HelpersLib.UserControls.ExportImportControl.ImportEventHandler(this.eiCustomUploaders_ImportRequested);
|
||||
this.eiCustomUploaders.ExportRequested += new HelpersLib.ExportImportControl.ExportEventHandler(this.eiCustomUploaders_ExportRequested);
|
||||
this.eiCustomUploaders.ImportRequested += new HelpersLib.ExportImportControl.ImportEventHandler(this.eiCustomUploaders_ImportRequested);
|
||||
//
|
||||
// lbCustomUploaderList
|
||||
//
|
||||
|
@ -1474,8 +1474,8 @@ private void InitializeComponent()
|
|||
this.eiFTP.ObjectType = null;
|
||||
this.eiFTP.Size = new System.Drawing.Size(136, 24);
|
||||
this.eiFTP.TabIndex = 8;
|
||||
this.eiFTP.ExportRequested += new HelpersLib.UserControls.ExportImportControl.ExportEventHandler(this.eiFTP_ExportRequested);
|
||||
this.eiFTP.ImportRequested += new HelpersLib.UserControls.ExportImportControl.ImportEventHandler(this.eiFTP_ImportRequested);
|
||||
this.eiFTP.ExportRequested += new HelpersLib.ExportImportControl.ExportEventHandler(this.eiFTP_ExportRequested);
|
||||
this.eiFTP.ImportRequested += new HelpersLib.ExportImportControl.ImportEventHandler(this.eiFTP_ImportRequested);
|
||||
//
|
||||
// btnFtpClient
|
||||
//
|
||||
|
@ -4210,8 +4210,8 @@ private void InitializeComponent()
|
|||
private System.Windows.Forms.Button btnPicasaRefreshAlbumList;
|
||||
private OAuthControl oauth2Picasa;
|
||||
public System.Windows.Forms.TabControl tcUploaders;
|
||||
private HelpersLib.UserControls.ExportImportControl eiCustomUploaders;
|
||||
private HelpersLib.UserControls.ExportImportControl eiFTP;
|
||||
private HelpersLib.ExportImportControl eiCustomUploaders;
|
||||
private HelpersLib.ExportImportControl eiFTP;
|
||||
private OAuthControl oauth2Dropbox;
|
||||
private System.Windows.Forms.TextBox txtBitlyDomain;
|
||||
private System.Windows.Forms.Label lblBitlyDomain;
|
||||
|
|
|
@ -136,6 +136,7 @@ private void FormSettings()
|
|||
ttlvMain.FocusListView();
|
||||
|
||||
NameParser.CreateCodesMenu(txtDropboxPath, ReplacementVariables.n, ReplacementVariables.t, ReplacementVariables.pn);
|
||||
NameParser.CreateCodesMenu(txtCopyPath, ReplacementVariables.n, ReplacementVariables.t, ReplacementVariables.pn);
|
||||
NameParser.CreateCodesMenu(txtAmazonS3ObjectPrefix, ReplacementVariables.n, ReplacementVariables.t, ReplacementVariables.pn);
|
||||
NameParser.CreateCodesMenu(txtCustomUploaderArgValue, ReplacementVariables.n);
|
||||
|
||||
|
@ -620,7 +621,7 @@ private void btnImageShackOpenPublicProfile_Click(object sender, EventArgs e)
|
|||
{
|
||||
if (!string.IsNullOrEmpty(Config.ImageShackSettings.Username))
|
||||
{
|
||||
Helpers.OpenURL("https://imageshack.com/user/" + Config.ImageShackSettings.Username);
|
||||
URLHelpers.OpenURL("https://imageshack.com/user/" + Config.ImageShackSettings.Username);
|
||||
}
|
||||
else
|
||||
{
|
||||
|
@ -630,7 +631,7 @@ private void btnImageShackOpenPublicProfile_Click(object sender, EventArgs e)
|
|||
|
||||
private void btnImageShackOpenMyImages_Click(object sender, EventArgs e)
|
||||
{
|
||||
Helpers.OpenURL("https://imageshack.com/my/images");
|
||||
URLHelpers.OpenURL("https://imageshack.com/my/images");
|
||||
}
|
||||
|
||||
#endregion ImageShack
|
||||
|
@ -690,7 +691,7 @@ private void btnTinyPicLogin_Click(object sender, EventArgs e)
|
|||
|
||||
private void btnTinyPicOpenMyImages_Click(object sender, EventArgs e)
|
||||
{
|
||||
Helpers.OpenURL("http://tinypic.com/yourstuff.php");
|
||||
URLHelpers.OpenURL("http://tinypic.com/yourstuff.php");
|
||||
}
|
||||
|
||||
#endregion TinyPic
|
||||
|
@ -886,12 +887,12 @@ private void cbUpasteIsPublic_CheckedChanged(object sender, EventArgs e)
|
|||
|
||||
private void pbDropboxLogo_Click(object sender, EventArgs e)
|
||||
{
|
||||
Helpers.OpenURL("https://www.dropbox.com");
|
||||
URLHelpers.OpenURL("https://www.dropbox.com");
|
||||
}
|
||||
|
||||
private void btnDropboxRegister_Click(object sender, EventArgs e)
|
||||
{
|
||||
Helpers.OpenURL("http://db.tt/CtPYXvu");
|
||||
URLHelpers.OpenURL("http://db.tt/CtPYXvu");
|
||||
}
|
||||
|
||||
private void oauth2Dropbox_OpenButtonClicked()
|
||||
|
@ -937,12 +938,12 @@ private void cbDropboxURLType_SelectedIndexChanged(object sender, EventArgs e)
|
|||
|
||||
private void pbCopyLogo_Click(object sender, EventArgs e)
|
||||
{
|
||||
Helpers.OpenURL("https://copy.com");
|
||||
URLHelpers.OpenURL("https://copy.com");
|
||||
}
|
||||
|
||||
private void btnCopyRegister_Click(object sender, EventArgs e)
|
||||
{
|
||||
Helpers.OpenURL("https://copy.com?r=hC3DMW");
|
||||
URLHelpers.OpenURL("https://copy.com?r=hC3DMW");
|
||||
}
|
||||
|
||||
private void txtCopyPath_TextChanged(object sender, EventArgs e)
|
||||
|
@ -1521,7 +1522,7 @@ private void cbMegaFolder_SelectedIndexChanged(object sender, EventArgs e)
|
|||
|
||||
private void btnMegaRegister_Click(object sender, EventArgs e)
|
||||
{
|
||||
Helpers.OpenURL("https://mega.co.nz/#register");
|
||||
URLHelpers.OpenURL("https://mega.co.nz/#register");
|
||||
}
|
||||
|
||||
private void btnMegaRefreshFolders_Click(object sender, EventArgs e)
|
||||
|
@ -1540,7 +1541,7 @@ private void txtAmazonS3AccessKey_TextChanged(object sender, EventArgs e)
|
|||
|
||||
private void btnAmazonS3AccessKeyOpen_Click(object sender, EventArgs e)
|
||||
{
|
||||
Helpers.OpenURL("https://console.aws.amazon.com/iam/home?#security_credential");
|
||||
URLHelpers.OpenURL("https://console.aws.amazon.com/iam/home?#security_credential");
|
||||
}
|
||||
|
||||
private void txtAmazonS3SecretKey_TextChanged(object sender, EventArgs e)
|
||||
|
@ -1567,7 +1568,7 @@ private void txtAmazonS3BucketName_TextChanged(object sender, EventArgs e)
|
|||
|
||||
private void btnAmazonS3BucketNameOpen_Click(object sender, EventArgs e)
|
||||
{
|
||||
Helpers.OpenURL("https://console.aws.amazon.com/s3/home");
|
||||
URLHelpers.OpenURL("https://console.aws.amazon.com/s3/home");
|
||||
}
|
||||
|
||||
private void txtAmazonS3ObjectPrefix_TextChanged(object sender, EventArgs e)
|
||||
|
@ -2073,7 +2074,7 @@ private void btnCustomUploaderURLShortenerTest_Click(object sender, EventArgs e)
|
|||
|
||||
private void btnCustomUploaderHelp_Click(object sender, EventArgs e)
|
||||
{
|
||||
Helpers.OpenURL("https://docs.google.com/document/d/1TSttAfH-1970JNsu3i9tl6UY0a8KNbUCeGri0Fs-jcU/edit?usp=sharing");
|
||||
URLHelpers.OpenURL("https://docs.google.com/document/d/1TSttAfH-1970JNsu3i9tl6UY0a8KNbUCeGri0Fs-jcU/edit?usp=sharing");
|
||||
}
|
||||
|
||||
private void btnCustomUploaderShowLastResponse_Click(object sender, EventArgs e)
|
||||
|
@ -2091,7 +2092,7 @@ private void btnCustomUploaderShowLastResponse_Click(object sender, EventArgs e)
|
|||
|
||||
private void txtCustomUploaderLog_LinkClicked(object sender, LinkClickedEventArgs e)
|
||||
{
|
||||
Helpers.OpenURL(e.LinkText);
|
||||
URLHelpers.OpenURL(e.LinkText);
|
||||
}
|
||||
|
||||
#endregion Custom Uploaders
|
||||
|
|
|
@ -24,15 +24,11 @@ You should have received a copy of the GNU General Public License
|
|||
#endregion License Information (GPL v3)
|
||||
|
||||
using HelpersLib;
|
||||
using Newtonsoft.Json;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.IO;
|
||||
using System.Linq;
|
||||
using System.Net.FtpClient;
|
||||
using System.Net.NetworkInformation;
|
||||
using System.Text;
|
||||
using System.Threading;
|
||||
using System.Windows.Forms;
|
||||
using UploadersLib.FileUploaders;
|
||||
using UploadersLib.Forms;
|
||||
|
@ -59,7 +55,7 @@ public void ImgurAuthOpen()
|
|||
if (!string.IsNullOrEmpty(url))
|
||||
{
|
||||
Config.ImgurOAuth2Info = oauth;
|
||||
Helpers.OpenURL(url);
|
||||
URLHelpers.OpenURL(url);
|
||||
DebugHelper.WriteLine("ImgurAuthOpen - Authorization URL is opened: " + url);
|
||||
}
|
||||
else
|
||||
|
@ -173,7 +169,7 @@ public void FlickrAuthOpen()
|
|||
string url = flickr.GetAuthLink(FlickrPermission.Write);
|
||||
if (!string.IsNullOrEmpty(url))
|
||||
{
|
||||
Helpers.OpenURL(url);
|
||||
URLHelpers.OpenURL(url);
|
||||
btnFlickrCompleteAuth.Enabled = true;
|
||||
}
|
||||
}
|
||||
|
@ -236,7 +232,7 @@ public void FlickrOpenImages()
|
|||
string url = flickr.GetPhotosLink(userID);
|
||||
if (!string.IsNullOrEmpty(url))
|
||||
{
|
||||
Helpers.OpenURL(url);
|
||||
URLHelpers.OpenURL(url);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -257,7 +253,7 @@ public void PhotobucketAuthOpen()
|
|||
if (!string.IsNullOrEmpty(url))
|
||||
{
|
||||
Config.PhotobucketOAuthInfo = oauth;
|
||||
Helpers.OpenURL(url);
|
||||
URLHelpers.OpenURL(url);
|
||||
}
|
||||
}
|
||||
catch (Exception ex)
|
||||
|
@ -328,7 +324,7 @@ public void PicasaAuthOpen()
|
|||
if (!string.IsNullOrEmpty(url))
|
||||
{
|
||||
Config.PicasaOAuth2Info = oauth;
|
||||
Helpers.OpenURL(url);
|
||||
URLHelpers.OpenURL(url);
|
||||
DebugHelper.WriteLine("PicasaAuthOpen - Authorization URL is opened: " + url);
|
||||
}
|
||||
else
|
||||
|
@ -456,7 +452,7 @@ public void DropboxAuthOpen()
|
|||
if (!string.IsNullOrEmpty(url))
|
||||
{
|
||||
Config.DropboxOAuth2Info = oauth;
|
||||
Helpers.OpenURL(url);
|
||||
URLHelpers.OpenURL(url);
|
||||
DebugHelper.WriteLine("DropboxAuthOpen - Authorization URL is opened: " + url);
|
||||
}
|
||||
else
|
||||
|
@ -554,7 +550,7 @@ public void CopyAuthOpen()
|
|||
if (!string.IsNullOrEmpty(url))
|
||||
{
|
||||
Config.CopyOAuthInfo = oauth;
|
||||
Helpers.OpenURL(url);
|
||||
URLHelpers.OpenURL(url);
|
||||
DebugHelper.WriteLine("CopyAuthOpen - Authorization URL is opened: " + url);
|
||||
}
|
||||
else
|
||||
|
@ -658,7 +654,7 @@ public void GoogleDriveAuthOpen()
|
|||
if (!string.IsNullOrEmpty(url))
|
||||
{
|
||||
Config.GoogleDriveOAuth2Info = oauth;
|
||||
Helpers.OpenURL(url);
|
||||
URLHelpers.OpenURL(url);
|
||||
DebugHelper.WriteLine("GoogleDriveAuthOpen - Authorization URL is opened: " + url);
|
||||
}
|
||||
else
|
||||
|
@ -1194,7 +1190,7 @@ public void TwitterAuthOpen()
|
|||
acc.Description = Config.TwitterOAuthInfoList[Config.TwitterSelectedAccount].Description;
|
||||
Config.TwitterOAuthInfoList[Config.TwitterSelectedAccount] = acc;
|
||||
ucTwitterAccounts.pgSettings.SelectedObject = acc;
|
||||
Helpers.OpenURL(url);
|
||||
URLHelpers.OpenURL(url);
|
||||
btnTwitterLogin.Enabled = true;
|
||||
}
|
||||
}
|
||||
|
@ -1241,7 +1237,7 @@ public void GoogleURLShortenerAuthOpen()
|
|||
if (!string.IsNullOrEmpty(url))
|
||||
{
|
||||
Config.GoogleURLShortenerOAuth2Info = oauth;
|
||||
Helpers.OpenURL(url);
|
||||
URLHelpers.OpenURL(url);
|
||||
DebugHelper.WriteLine("GoogleURLShortenerAuthOpen - Authorization URL is opened: " + url);
|
||||
}
|
||||
else
|
||||
|
@ -1322,7 +1318,7 @@ public void BitlyAuthOpen()
|
|||
if (!string.IsNullOrEmpty(url))
|
||||
{
|
||||
Config.BitlyOAuth2Info = oauth;
|
||||
Helpers.OpenURL(url);
|
||||
URLHelpers.OpenURL(url);
|
||||
DebugHelper.WriteLine("BitlyAuthOpen - Authorization URL is opened: " + url);
|
||||
}
|
||||
else
|
||||
|
@ -1596,7 +1592,7 @@ public void JiraAuthOpen()
|
|||
if (!string.IsNullOrEmpty(url))
|
||||
{
|
||||
Config.JiraOAuthInfo = oauth;
|
||||
Helpers.OpenURL(url);
|
||||
URLHelpers.OpenURL(url);
|
||||
}
|
||||
}
|
||||
catch (Exception ex)
|
||||
|
@ -1646,7 +1642,7 @@ public void GistAuthOpen()
|
|||
if (!string.IsNullOrEmpty(url))
|
||||
{
|
||||
Config.GistOAuth2Info = oauth;
|
||||
Helpers.OpenURL(url);
|
||||
URLHelpers.OpenURL(url);
|
||||
}
|
||||
}
|
||||
catch (Exception ex)
|
||||
|
|
|
@ -23,8 +23,6 @@ You should have received a copy of the GNU General Public License
|
|||
|
||||
#endregion License Information (GPL v3)
|
||||
|
||||
using System.Collections.Specialized;
|
||||
|
||||
namespace UploadersLib.HelperClasses
|
||||
{
|
||||
public interface IOAuth2Basic : IOAuthBase
|
||||
|
|
|
@ -25,7 +25,6 @@ You should have received a copy of the GNU General Public License
|
|||
|
||||
using Newtonsoft.Json;
|
||||
using System.Collections.Generic;
|
||||
using System.Drawing;
|
||||
using System.IO;
|
||||
using System.Windows.Forms;
|
||||
using UploadersLib.HelperClasses;
|
||||
|
|
Loading…
Reference in a new issue